SQL paramater not updating

bdrbdr
edited 10:18PM in FastReport .NET
I am writing some reports and I need to pass in values from the report into the SQL statement to get the right values out of the function. I am however having the issue when I do Report.SetParameterValue("param1", value) the value for the SQL parametre is not getting updated. I have read through all the documentation and done it as they have said in the example and it still isn't working for me.

My SQL statement is:

SELECT *
FROM trUsers
Where UserName = @Param1

The parameter is then defined in the next section with a default value to see if something is happening.

I then try to update said parameter on document load via

Report.SetParameterValue("Param1", "Joe Ganim");

But the value is staying as the old default value.

I am also not seeing Param1 in the list of parameters. Should it show up if I have made it as part of the SQL parameters or is there something more that i am missing out on?

Comments

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.