ASP.NET Reports
Hi there,
I m a newbie in Fast Report.. I m using asp.net (vs2005-c#) and looking for a powerful report tool and some friends tell me about fast report..
now i have some problems for begin to work with fast report.net. For example;
i dropped a webreport component from my tool box to may page and then designed a report and add a parameter like this,
[vwMyTable.TableId]==[TableId] -- > Int32 parameter
in here, TableId is an Id field that must get its value from code behind.. so i add some code in Page Load like this;
WebReport1.Report = new Report();
WebReport1.Report.Load(Server.MapPath("MyReport.frx"));
WebReport1.Report.SetParameterValue("TableId", 42); // test Id = 42
WebReport1.Report.Prepare();
and then i run code.. But i see a blank report, there is no data..
How can i set a parameter in code behind..
and a suggestion; if you can add some sample asp.net projects, it will be helpful..
thanks in advance..
I m a newbie in Fast Report.. I m using asp.net (vs2005-c#) and looking for a powerful report tool and some friends tell me about fast report..
now i have some problems for begin to work with fast report.net. For example;
i dropped a webreport component from my tool box to may page and then designed a report and add a parameter like this,
[vwMyTable.TableId]==[TableId] -- > Int32 parameter
in here, TableId is an Id field that must get its value from code behind.. so i add some code in Page Load like this;
WebReport1.Report = new Report();
WebReport1.Report.Load(Server.MapPath("MyReport.frx"));
WebReport1.Report.SetParameterValue("TableId", 42); // test Id = 42
WebReport1.Report.Prepare();
and then i run code.. But i see a blank report, there is no data..
How can i set a parameter in code behind..
and a suggestion; if you can add some sample asp.net projects, it will be helpful..
thanks in advance..
Comments
You have to use WebReport.StartReport event to pass a value to the report parameter. The report can be accessed through the WebReport.Report property:
webReport1.Report.SetParameterValue("MyParam", 10);