Interaction in Web Report not working

Stimulsoft Reports.WEB discussion
Post Reply
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Interaction in Web Report not working

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Interaction in Web Report not working

Post by HighAley »

Hello.

You should use the RenderMode="AjaxWithCache" of the Web Viewer.

Thank you.
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Re: Interaction in Web Report not working

Post by Ink »

Hi Aleksey,

I am using AjaxWithCache. But when I click a header, the report rerenders with no data?

Thanks,

Jon.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Interaction in Web Report not working

Post 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.
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Re: Interaction in Web Report not working

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Interaction in Web Report not working

Post 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.
Post Reply