English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to make a report in Visual Basic. But I do not know the number of columns at design time as it will be created druing run time.To be more specific, I want to display the marks of students in a row but there are different subject is the class with options.The classes may have any subject and I have to display all in a line.

2007-01-10 04:01:25 · 3 answers · asked by rohit 1 in Computers & Internet Programming & Design

3 answers

You can build the report to dynamically react to additional columns...especially if you know what the maximum number of columns would be.

Set up headers SCORE 1, SCORE 2, ....SCORE 10 and make the visible property of them all false. Bind them to the matching Db columns. When you run the query, if the value of column 5 for example is not null then show the header and data for SCORE 5.

Does that help?

2007-01-10 04:12:26 · answer #1 · answered by rod 6 · 0 0

First off you need to set your specifications so you can start your project. If you are always changing the specs you will never complete the project.

Next you can make your columns a variable based upon an input parameter that will take care of your run time columns.

It sounds as if you need more clarity as to the requirements.

2007-01-10 12:09:38 · answer #2 · answered by Questioner 3 · 0 0

You should use Microsoft Word for this. You didn't say what version of Visual BASIC you are using, so I am assuming you are using VB-6. http://www.amazon.com/Learn-Program-Visual-Basic-Objects/dp/1929685165/sr=11-1/qid=1168451226/ref=sr_11_1/103-0726574-9119040 - This book has an excellent example of how to do it using MS Word and VB-6.

Your specific example is discussed in great detail in the book I linked to above.

2007-01-10 12:47:49 · answer #3 · answered by Richard H 7 · 0 0

fedest.com, questions and answers