FastReport Query Parameter
Hi, I hope you can help me. I need to assign a value to a parameter in FastReport. But this value can change. For example:
string x = ((String)Report.GetColumnValue("SQL"));
if(x== 1)
{
Report.SetParameterValue("@Parameter",x);
txtCom.Text = ((String)Report.GetColumnValue("SQLTABLE.NAME"))
}
if(x==2)
{
Report.SetParameterValue("@Parameter",x);
txtCom.Text = ((String)Report.GetColumnValue("SQLTABLE.NAME"))
}
My problem is that it only runs the first time
This discussion has been closed.
Comments
Hello!
A single call to `Report.SetParameterValue(“@Parameter”, x)` within the `BeforePrint` method is not enough to automatically restart an already open SQL data source (SQLTABLE). After changing the parameter, you need to force a reinitialization of the data source: