Dynamic Query from combo

Posted by: ozmagic on 3 August 2017, 4:01 pm EST

  • Posted 3 August 2017, 4:01 pm EST

    The web project has a combo with several tables where the customer selects one plus a date range selection with. How do I make the connection dynamically?

    Best Regards.
  • Replied 3 August 2017, 4:01 pm EST

    Abhishek,

    The example is fine, but the client wants to apologize select tables from a grid-down then select radio button day or month and finally a period with two combolist then just connect. The whole system is in sqlserver. Grateful if you could explain.

    Best Regards,
    ozmagic

    PD. Sorry, do not speak English.
  • Replied 3 August 2017, 4:01 pm EST

    ozmagic,

    Can you please add some additional description to your use case scenario like which type of datasource are you using example Relation DataSource,XML ,MDX or an Unbound datasource?

    I would suggest you to go through this link which provides information regarding "Connect to Data Sources in Web Projects"

    http://helpcentral.componentone.com/nethelp/ActiveAnalysis2WebHelp/ConnectToDataSourcesOnTheWeb.html

    Best Regards,
    Abhishek
  • Replied 3 August 2017, 4:01 pm EST

    It connects to a sql related by a datasource.
    The database is enormous over 85gb.
    1 - Show all tables
    2 - Select a table over a date range
    3 - Connect the pivot with a button


    Best Regards,
    ozmagic
  • Replied 3 August 2017, 4:01 pm EST

    ozmagic,

    I have created a sample application on the same lines , please go through the sample application and let me know if this helps.

    Best Regards,
    Abhishek

    2012/10/GCAAWebApp.zip
  • Replied 3 August 2017, 4:01 pm EST

    Sorry, forgot to tell you is in the webform vb
  • Replied 3 August 2017, 4:01 pm EST

    ozmagic,

    I am not sure I understand what you mean by selecting tables from grid-down and then select a radio button for day or month and then finally a period. Do you have a database that you can share and explain with an example how you would want this to be accomplished.

    Best Regards,
    Abhishek
  • Replied 3 August 2017, 4:01 pm EST

    Although not running the database to assemble the example.
    I can attach a basic design would be like.
    Basically it's arm: "Select * From table where dates" but everything executable code dynamically as the customer table as the selected dates prior to connection to the pivot.
    Summarizing the sql query needs to be dynamic.

    Demo.zip

    Best Regards,
    ozmagic

  • Replied 3 August 2017, 4:01 pm EST

    ozmagic,


    I understand your design now , you would like the query string to be on the user selected values from the Drop Down box for Tables and Dates. The sample that I have shared with you earlier also can accomplish the same. You will just need to build your query string now from both values i.e Table Dropdown and Date DropDown. I have attached a snippet of code to get you started.

    Best Regards,
    Abhishek

         

    2012/10/Code.txt
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels