Page 1 of 1
Option stopped working - StiWebViewer1.ViewMode
Posted: Tue Jul 19, 2016 2:51 pm
by agent005
Hello,
It looks like in couple of latest builds (tested on UL_2016.07.15) code below stopped working
Code: Select all
StiWebViewer1.ViewMode = Stimulsoft.Report.Web.StiWebViewMode.WholeReport;
Viewer shows option One Page selected and not the Whole report as I specify in backpage. It used to work just fine for years and stopped last month or so.
Is there a new option to handle this or is it just a bug that needs to be fixed?
Re: Option stopped working - StiWebViewer1.ViewMode
Posted: Wed Jul 20, 2016 4:24 pm
by Alex K.
Hello,
We couldn't reproduce this bug.
Can you please send us a simple project which reproduces the issue for analysis.
Thank you.
Re: Option stopped working - StiWebViewer1.ViewMode
Posted: Thu Jul 21, 2016 11:44 pm
by agent005
Here is sample project. It's not a huge deal, but I think the issue is a follows - prior to last couple builds if I set ViewMode to WholeReport, load the page, show run button, and when user clicks run - it would not set ViewMode again, but viewer would remember the option set on page load. Now it seems like viewer no longer remembers that option, I have to set it right before showing the report.
Sample project attached, but I think that's check for IsPostBack causing the issue
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
StiWebViewer1.ViewMode = Stimulsoft.Report.Web.StiWebViewMode.WholeReport;
}
}
protected void btnRender_Click(object sender, EventArgs e)
{
String missingFields = "";
string appDirectory = HttpContext.Current.Server.MapPath(string.Empty);
// Prepare data
DataSet dataSet = new DataSet();
dataSet.ReadXml(appDirectory + "\\Data\\Demo.xml");
dataSet.ReadXmlSchema(appDirectory + "\\Data\\Demo.xsd");
// Load report
StiReport report = new StiReport();
report.Load(appDirectory + "\\Reports\\SimpleList.mrt");
report.RegData(dataSet);
// View report
StiWebViewer1.Report = report;
}
Re: Option stopped working - StiWebViewer1.ViewMode
Posted: Fri Jul 22, 2016 12:38 pm
by Alex K.
Hello,
Need some additional time for investigating the issue.
At the current moment, please try to remove (!IsPostBack) check:
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
StiWebViewer1.ViewMode = Stimulsoft.Report.Web.StiWebViewMode.WholeReport;
}
Thank you.
Re: Option stopped working - StiWebViewer1.ViewMode
Posted: Fri Jul 22, 2016 5:52 pm
by agent005
OK, I've made the change already, so this issue is solved for me. My main concern is that some other users may see unexpected behavior change so it may be worth to correcting it, but this is not a big deal.
Re: Option stopped working - StiWebViewer1.ViewMode
Posted: Fri Jul 22, 2016 6:34 pm
by Alex K.
Hello,
Ok. We understood the issue.
Need some additional time for investigating the issue.
Thank you.