Search code examples
vb.netvisual-studio-2010datatablecrystal-reportsreport

VB.Net - Visual studio 2010 and Crystal Report, how to pass a query?


I'm looking for make a Report in vb.net using Crystal Report, but i don't understand how to pass a query and specify the target textlabel through a query. I means execute a query and render a datatable, how can i target the crystal report's fields as soon as i have made the query? Without connecting database through procedure, only with a connection string.

Thank you in advice and sorry for my bad english.


Solution

  • What you could do is first of all call your query and bind the binding source with the data table and have some text boxes or labels binded to this data source. Now create parameters in your crystal reports and pass these values stored in text boxes or labels into parameters. Look at this website for example on how to create and pass parameters:

    http://vb.net-informations.com/crystal-report/vb.net_crystal_report_parameter_string.htm

    I hope it works for you, I am sorry if I couldn't help.