Passing parameters

epfepf
edited 5:24PM in FastReport .NET
Passing parameters

I need open report from .net passing Sql query and value parameters. I'm working with SQLite database.

report.Load("C:\\temp\\FastReport\\Clientes.frx");
// do it after loading the report, before running it find the table by its alias
TableDataSource table = report.GetDataSource("EPALI_CLIENTE") as TableDataSource;
report.SetParameterValue("parNombre", "MARSHALLS");
table.SelectCommand = "SELECT CLTE_CLIENTE, CLTE_NOMBRE FROM EPALI_CLIENTE WHERE CLTE_NOMBRE = :parNombre ";
report.Show();

When execute report.Show return SQLiteException:
Insufficient parameters supplied to the command

What is the problem?? Is it necessary to create the parameter in the report?

Thank you

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.