469,917 Members | 1,829 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Dynamic Report Generator

77
Hi all,
I have to create a dynamic report in vb.net.
I never had done something like this before.Users want to see tables name and when they choose the table they will select which fields should appear in report.

How should I do tha?
Aug 25 '08 #1
4 2355
Curtis Rutland
3,256 Expert 2GB
What DB are you using? There should be stored procedures to list table names and field names that you can bind to dropdowns or checklists or whatever. Then it is just a matter of building the query string based on the user's input. If you used a checkboxlist, you could loop through all the items, and if it is checked, add that field to your query string.

The hard part might be the conditional statements. Study the format that Access uses for it's query designer. That might help.

Also, you should look into premade programs for this. For example, if you are using MSSQL 2005, you should look into SSRS.

Good luck.
Aug 25 '08 #2
Sep410
77
What DB are you using? There should be stored procedures to list table names and field names that you can bind to dropdowns or checklists or whatever. Then it is just a matter of building the query string based on the user's input. If you used a checkboxlist, you could loop through all the items, and if it is checked, add that field to your query string.

The hard part might be the conditional statements. Study the format that Access uses for it's query designer. That might help.

Also, you should look into premade programs for this. For example, if you are using MSSQL 2005, you should look into SSRS.

Good luck.
Hi,
Thanks for reply, I as far as I know in vb.net I have to create Dataset and connect that dataset to my crystal report. If I want to give the user the ability to select the fields in run time how can I create dataset before(In design time)?

The other concern is how to design the crystal report? For example there may be a time user only select 3 fields to have report how can I put this 3 field in my report? What happens if user chooses to have 10 fields? I don't know how can I move columns in crystal report in order to have a good looking report?
I am using SQL2005 as database.
Please Help me to learn.
Aug 26 '08 #3
Curtis Rutland
3,256 Expert 2GB
You should have mentioned that you were using Crystal Reports in the first place.

I've noticed that you post a lot, but rarely provide enough information in your first post. Please remember that we need to know this information for every post:

Platform: Forms, ASP.NET, console, etc
Language: VB.NET, C#
Database Platform (if applicable): MSSQL Server, MySql, Access, Oracle, etc
Other Important Software: Crystal Reports, 3rd party DLLs, AJAX extensions, AJAX toolkit, etc.

Please remember to provide these in every thread you start.

MODERATOR
Aug 26 '08 #4
Sep410
77
You should have mentioned that you were using Crystal Reports in the first place.

I've noticed that you post a lot, but rarely provide enough information in your first post. Please remember that we need to know this information for every post:

Platform: Forms, ASP.NET, console, etc
Language: VB.NET, C#
Database Platform (if applicable): MSSQL Server, MySql, Access, Oracle, etc
Other Important Software: Crystal Reports, 3rd party DLLs, AJAX extensions, AJAX toolkit, etc.

Please remember to provide these in every thread you start.

MODERATOR
I will do that but I should make it clear that I am using crystal report viewer in vb.net.
Aug 26 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Mir Nazim | last post: by
1 post views Thread by Nathan Bloomfield | last post: by
3 posts views Thread by deejayquai | last post: by
2 posts views Thread by deejayquai | last post: by
7 posts views Thread by Dan Palm | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.