Dynamic Report Generator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sep410
    New Member
    • Jul 2008
    • 77

    Dynamic Report Generator

    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?
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    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.

    Comment

    • Sep410
      New Member
      • Jul 2008
      • 77

      #3
      Originally posted by insertAlias
      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.

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        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

        Comment

        • Sep410
          New Member
          • Jul 2008
          • 77

          #5
          Originally posted by insertAlias
          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.

          Comment

          Working...