Query Parameter - Report Parameter
I'm working with FastReport and SQLite database.
With FastReport Design I created a query, and I created 2 parameters for the query. (Query Parameters)
Query1:
SELECT E.CLTE_EMPRESA, E.CLTE_CLIENTE, E.CLTE_NOMBRE
FROM `EPALI_CLIENTE` E
WHERE CLTE_NOMBRE = :parNombre
I have a project in C # .net. From this project I assign value to the parameters and I run a report:
? ? ? ? ? ? ? ? ? ? ? ? using (Report report = new Report ())
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? report.Load ("C: \\ temp \\Client-Sucursal2.frx");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Report.SetParameterValue ("parNombre" "MARSHALLS");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? report.Show ();
? ? ? ? ? ? ? ? ? ? ? ? }
But to launch the report will not return data. (MARSHALLS exists in my database).
Where is the error ??
How is done parameter passing from the application to the query of the report ??
Is it necessary to create the Report Parameters in FastReport Desing??
I just do not understand the use of Query Parameter or Report Parameter.
How the parameters are passed to the query of the report ??
Thanks
With FastReport Design I created a query, and I created 2 parameters for the query. (Query Parameters)
Query1:
SELECT E.CLTE_EMPRESA, E.CLTE_CLIENTE, E.CLTE_NOMBRE
FROM `EPALI_CLIENTE` E
WHERE CLTE_NOMBRE = :parNombre
I have a project in C # .net. From this project I assign value to the parameters and I run a report:
? ? ? ? ? ? ? ? ? ? ? ? using (Report report = new Report ())
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? report.Load ("C: \\ temp \\Client-Sucursal2.frx");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Report.SetParameterValue ("parNombre" "MARSHALLS");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? report.Show ();
? ? ? ? ? ? ? ? ? ? ? ? }
But to launch the report will not return data. (MARSHALLS exists in my database).
Where is the error ??
How is done parameter passing from the application to the query of the report ??
Is it necessary to create the Report Parameters in FastReport Desing??
I just do not understand the use of Query Parameter or Report Parameter.
How the parameters are passed to the query of the report ??
Thanks
Comments
Firstly Add a report parameter in Report Designer and add value to the report parameter using this
Report.SetParameterValue ("parNombre" "MARSHALLS");
Then create the Data connection and after entering the Query Statement , in the next step you need to add a Query Parameter and give a name to it same as the name used in the sql query parameter and set that parameter expression ,and select report parameter.
Hope this helps you.