Passing parameter to a report from a program

I followed this

I am trying to pass a parameter from a program.

I made the Parameter

Made the DB connection

select * from TableName where ID =?

Added the main report paramter into the SQL parameter expression label

When I hit next it gives me a Incorrect syntax near '?'


  • What is your version of FR?

    What database do you use?

  • gpigpi Volnovakha, Ukraine

    Assign parameter with report's variable in the parameter's editor. Pass variable to report

    frxReport1.Variables.Variables['YourNumVariableName'] := 123;

    frxReport1.Variables.Variables['YourStringVariableName'] := '''' + 'test' + '''';

  • the error says that you can not send and add parametre to sql. Please check your fastreport sql in which you should add YourNumVariableName property

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.