Page 1 of 1

WebViewer Export Problem

Posted: Wed Mar 24, 2010 10:19 pm
by jifriz
Hi

using Stimulsoft Reports.Net 2010.1

I have a report and an asp.net web page

the report loads perfectly

and export goes fine

I have a drop down list that regenerate the report based on selection

every time I select another item from the list , the report renders fine based on selection

but if I clicked export as PDF it export the first initial created report


here is my code for generating the report:

Code: Select all

      void LoadReport()
        {

            DataSet ds = new DataSet();

            SqlDataAdapter ada = new SqlDataAdapter("select * from [vwTimeTable] where SEID=" + ddlSEID.SelectedValue, ConfigurationManager.ConnectionStrings["netTiersConnectionString"].ConnectionString);

            ada.Fill(ds);

            ds.DataSetName = "Connection";
            ds.Tables[0].TableName = "vwTimeTable";


            StiReport rtp = new StiReport();

            rtp.Load(Server.MapPath("~/Reports/rptTimeTable.mrt"));
       

            rtp.Dictionary.Databases.Clear();
            rtp.DataSources.Clear();

            rtp.RegData("vwTimeTable", ds.Tables["vwTimeTable"]);
            rtp.RegData("Connection", ds);



            rtp.Dictionary.Synchronize();
        
            StiWebViewer1.Report = rtp;


        }

WebViewer Export Problem

Posted: Fri Mar 26, 2010 1:32 am
by Vladimir
Hello,

Currently selected value of the combo box is saved into ViewState, but the ViewState is not saved when exporting in Ajax mode. For solving this problem, you can save selected value in other place: for example, in server cache or in url string.

Thank you.

WebViewer Export Problem

Posted: Fri Mar 26, 2010 6:54 am
by jifriz
The dropdownlist is set to autopostpack="true"
there are no updatepanels or ajax stuff on web page

also the new report is generated fine based on my dropdownlist selection
but the problem is in the exported report
because it always export to the first report generated

as if it export it from cache or something similar

WebViewer Export Problem

Posted: Mon Mar 29, 2010 12:53 am
by Vladimir
Hello,

Please try to set the RenderMode property to AjaxWithCache:
Thank you.

WebViewer Export Problem

Posted: Mon Mar 29, 2010 3:35 pm
by jifriz
Thanks it worked

WebViewer Export Problem

Posted: Mon Mar 29, 2010 10:57 pm
by Andrew
Great! :biggrin: