Page 1 of 1
Interaction in Web Report not working
Posted: Sun Nov 18, 2012 12:12 pm
by Ink
I have a simple multi web report, with interactive sorting set on several columns. In the designer preview, when the columns are click, they sort as expected.
When I load the report into the web viewer & click a header to sort, it clears all the data from the report and shows only a blank page. Do I need to set up interaction in code if I load the report at runtime into the web viewer? If so, can you help with how I do this?
Thanks,
Jon.
Re: Interaction in Web Report not working
Posted: Mon Nov 19, 2012 11:32 am
by HighAley
Hello.
You should use the RenderMode="AjaxWithCache" of the Web Viewer.
Thank you.
Re: Interaction in Web Report not working
Posted: Mon Nov 19, 2012 1:57 pm
by Ink
Hi Aleksey,
I am using AjaxWithCache. But when I click a header, the report rerenders with no data?
Thanks,
Jon.
Re: Interaction in Web Report not working
Posted: Tue Nov 20, 2012 1:36 pm
by HighAley
Hello.
You should use the GetReportData event to register data in the report.
Here is a sample code:
Code: Select all
protected void StiWebViewer1_GetReportData(object sender, StiReportDataEventArgs e)
{
DataSet data = new DataSet();
data.ReadXml(appDirectory + "\\Data\\Demo.xml");
e.Report.RegData(data);
}
Thank you.
Re: Interaction in Web Report not working
Posted: Tue Nov 27, 2012 9:16 am
by Ink
Hi Aleksey,
I have tried this but it is still not working.
I am not using xml. I am using a DataTable populated via a SqlDataAdapter/Stored Procedure. Could this be the issue?
Thanks.
Jon.
Re: Interaction in Web Report not working
Posted: Thu Nov 29, 2012 7:38 am
by Alex K.
Hello,
In this case please try to use the following code:
Code: Select all
DataSet data = new DataSet();
sqlDataAdapter.Fill(data);
e.Report.RegData(data);
...
If it does not help, please send us a sample project which reproduces the issue for analysis.
Thank you.