Combining reports dynamically - print blanks the report

Stimulsoft Reports.NET discussion
User avatar
midspace
Posts: 27
Joined: Tue Sep 10, 2013 12:20 am
Location: Melbourne, Australia

Combining reports dynamically - print blanks the report

Post by midspace »

We are working on a complex Letters solution, which is supposed to combine Compiled Template's during processing, to create a single Report for the user.
We plan to allow straight through printing, PDF generation, Previewing, and minor editing.

We are having trouble with the Preview. When I try the 'Print' button from the preview, the combined Report disappears, and we are left with a blank report.

We are using 2013.2.1700.0

Attached is a cut down sample of our project in C# WinForms .Net 4.
https://dl.dropboxusercontent.com/u/262 ... ewTest.zip
Attachments
FormViewTest.zip
(28.72 KiB) Downloaded 301 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Combining reports dynamically - print blanks the report

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please try to check the last build.

Thank you.
Attachments
Capture.PNG
Capture.PNG (65.32 KiB) Viewed 3293 times
User avatar
midspace
Posts: 27
Joined: Tue Sep 10, 2013 12:20 am
Location: Melbourne, Australia

Re: Combining reports dynamically - print blanks the report

Post by midspace »

Updated to latest version of Stimulsoft.
Retested issue. The bug still exists.
Pressing the 'print' button causes Report to disappear.

I have attached a video (animated GIF) of the issue.
StimulsoftPrintIssue.gif
StimulsoftPrintIssue.gif (985.92 KiB) Viewed 3290 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Combining reports dynamically - print blanks the report

Post by HighAley »

Hello.

You should add two lines of code to your project:

Code: Select all

            newreport = new StiReport();
            newreport.ReportCacheMode = StiReportCacheMode.On;
            newreport.ReportCachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "StimulsoftReportsCache");
            newreport.RenderedPages.CanUseCacheMode = true;
            newreport.RenderedPages.CacheMode = true;
            newreport.RenderedPages.Clear();
            newreport.NeedsCompiling = false;   // add 
            newreport.IsRendered = true;        // add
Without this properties the report is compiled and rendered again. In your case this is the empty report.

Thank you.
User avatar
midspace
Posts: 27
Joined: Tue Sep 10, 2013 12:20 am
Location: Melbourne, Australia

Re: Combining reports dynamically - print blanks the report

Post by midspace »

Thank you, that worked great!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Combining reports dynamically - print blanks the report

Post by Andrew »

Great!

Have a nice day.
User avatar
midspace
Posts: 27
Joined: Tue Sep 10, 2013 12:20 am
Location: Melbourne, Australia

Re: Combining reports dynamically - print blanks the report

Post by midspace »

Sorry, I have one additional question with this code.
How do I get the "Edit Page" button to appear?

I've been trying what was suggested in here, but to no avail.
http://forum.stimulsoft.com/viewtopic.php?f=8&t=36868


I already have:
report.PreviewSettings = (int)StiPreviewSettings.All;

And I have tried the following in the Form Load event.
StiOptions.Viewer.Windows.ShowPageDesignButton = true;

Has this feature been removed?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Combining reports dynamically - print blanks the report

Post by Alex K. »

Hello,

Please check the last prerelease build and let us know about th result.

Thank you.
User avatar
midspace
Posts: 27
Joined: Tue Sep 10, 2013 12:20 am
Location: Melbourne, Australia

Re: Combining reports dynamically - print blanks the report

Post by midspace »

Aleksey wrote:Hello,

Please check the last prerelease build and let us know about th result.

Thank you.
I've just tried the Build Stimulsoft Reports.Ultimate 2013.12.30 [2014.1.1803.0]
I still cannot get the "Edit Page" button to appear.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Combining reports dynamically - print blanks the report

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please try to checkthat you uses the last prerelease build.
Also please try to remove the settings folder:
c:\Users\[userName]\AppData\Local\Stimulsoft\

Thank you.
Post Reply