SQL paramater not updating
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?
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
Create a FastReport parameter (param1) in the Data window. Set the expression of your SQL parameter to your FastReport parameter.
http://www.fast-report.com/documentation/U...passvalueto.htm