Page 1 of 2

Print renders nothing in 2013.1

Posted: Fri May 31, 2013 6:50 pm
by RossAFaneuf
We are having problems with Print without Preview in 2013.1. For all reports, only a blank page is printed. The Title shows the aspx page url instead of the actual title.

Printing works correctly with these reports using 2011.1, with no code changes.

I downloaded 2013.2.05.31, and it has the same problem as 2013.1.

What has changed such that identical code prints successfully in 2011.1 and not in the newer releases? Is a code change required?

Thank you

Re: Print renders nothing in 2013.1

Posted: Mon Jun 03, 2013 7:36 am
by Alex K.
Hello,

Can you please send us your report with test data or a sample project which reproduce the issue for analysis.

Thank you.

Re: Print renders nothing in 2013.1

Posted: Mon Jun 03, 2013 1:15 pm
by RossAFaneuf
The project is about .5 million lines of code, and I can't send it all to you. Same with the reports, and the user data is confidential.

The circumstances by themselves should provide enough information:
- Link application with StimulSoft 2011.1. Print without Preview and Print to PDF work correctly.
- Link application with StimulSoft 2013.1 (no code changes). Print without Preview and Print to PDF do not work correctly.

In all cases the reports have rendered correctly in a browser (FireFox, IE, Chrome), and the application itself has no code to interact with the print operation.

Is there a possibility the Stimulsoft code interacts differently with the browser to located controls? The page in question is an ASPX master page, which adds additional decoration to control IDs. I can send you the source for a page if that would be helpful.

Clearly some difference between the two needs to be compensated for. You know what changed between 2011.1 and 2013.1. All you need to do is figure it out and tell me.

Re: Print renders nothing in 2013.1

Posted: Tue Jun 04, 2013 7:30 am
by Alex K.
Hello,

We made some improvements after release. Please check the latest prerelease build.

Thank you.

Re: Print renders nothing in 2013.1

Posted: Tue Jun 04, 2013 3:35 pm
by RossF
I've already tried 2013.05.31 and it still has the same printing problem. Is there a more recent prerelease?

Re: Print renders nothing in 2013.1

Posted: Tue Jun 04, 2013 3:37 pm
by RossAFaneuf
I've tried 2013.05.31 and the same error is present.

Re: Print renders nothing in 2013.1

Posted: Thu Jun 06, 2013 1:31 pm
by Vladimir
Hello,

We have checked the report printing on a different browsers, print the report without previewing works correctly. Please check the attached sample project. If it works correctly, please try make changes to it (viewer options, a way to load the report), such as in your project, that would reproduce the error.
WebViewer.zip
(2.25 MiB) Downloaded 914 times
Thank you.

Re: Print renders nothing in 2013.1

Posted: Thu Jun 06, 2013 4:35 pm
by RossAFaneuf
Thank you for providing the sample project; I will work with it if all else fails.

Meanwhile, I have found a code change which makes printing work. Perhaps you can explain the issue, and further guesswork will not be needed.

1. Printing succeeded with 2013.2.05.31, but not the release 2013.1.

2. The problem is fixed if I comment out the 'ResetReport' call in the following lines of code:

_CurrentStiReport.Compile();
_CurrentStiReport.RegData(reportDS);
_CurrentStiReport.Render(true);

//StiReportWebViewer.ResetReport();
StiReportWebViewer.Report = _CurrentStiReport;

Where:
_CurrentStiReport is any valid StiReport instance
StiReportWebViewer is the StiWebViewer instance

The code can load different reports selected by the user into the StiWebViewer, and that is why we have the ResetReport() call. Should this be done differently, or in a different place, or is this an unexpected behavior?

Thank you

Re: Print renders nothing in 2013.1

Posted: Fri Jun 07, 2013 12:52 pm
by Vladimir
Hello,

We tested the ResetReport() function on the example sent earlier, in the various events - Button1_Click, Page_Load - in all cases, report printing worked correctly. Please check that your project has the latest version of the dlls, try to use the libraries from the sample project. It is also possible, that other options set in your project affects the print?

Thank you.

Re: Print renders nothing in 2013.1

Posted: Wed Jun 12, 2013 12:30 am
by RossAFaneuf
I have made a little progress after looking at your code sample. The following code prints correctly in 2013.2 05-31 but still does not work in 2013.1

_CurrentStiReport.Compile();
_CurrentStiReport.RegData(reportDS);

StiReportWebViewer.ResetReport();
StiReportWebViewer.Report = _CurrentStiReport;

Where:
_CurrentStiReport is any valid StiReport instance
StiReportWebViewer is the StiWebViewer instance. The WebViewer is set to AjaxWithCache.

The difference is that I removed a call to CurrentStiReport.Render(true).

When is Render() needed? When a report is not being show in a WebViewer? Is the Compile() call above needed?