Report data/preview not working in 12.3 release

Stimulsoft Reports.UWP discussion
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Report data/preview not working in 12.3 release

Post by adamaka »

I had several .mrt report files made in the previous release that were working. I was able to use the StiReport.RegBusinessObject(category, name, value) method to pass in data and bind to that data in my label.
After upgrading, my reports will not load data and the "Print Preview" window in the print charm fails to load a preview when printing. What has changed and what has to be done to pass in data with the new release?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report data/preview not working in 12.3 release

Post by HighAley »

Hello.

Please, send us a working sample project to reproduce the issue for analysis.
Also send us a step-by-step instruction how to reproduce it.

Thank you.
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Report data/preview not working in 12.3 release

Post by adamaka »

I think I've narrowed down the problem... it seems as though the way I was using the PrintAsync() method does not work the same. I have a Print function as follows:

Code: Select all

public async Task PrintReport(StiReport report)
{
    StiPrintReport pr = new StiPrintReport(report);
    pr.RegisterForPrinting();
    await pr.PrintAsync();
    pr.UnregisterForPrinting();
}
When I step through the code, it looks like the UnregisterForPrinting method is getting called before the user prints the report. If I comment out the last line, the report previews/prints fine, but if I try to print something else (effectively re-registering for printing), the application crashes.

What's the new way to go about printing? Apparently awaiting the PrintAsync() doesn't wait until the printer is selected and the user clicks print anymore.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report data/preview not working in 12.3 release

Post by HighAley »

Hello.

This feature was disabled by default to comply with the Windows 8 development recommendations. To access the printing feature you should swipe in from the right.
But you could also enable old print button by setting next option:

Code: Select all

StiOptions.Viewer.Elements.ReportPrintButtonVisibility
Thank you.
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Report data/preview not working in 12.3 release

Post by adamaka »

But what if I'm not using the StiViewer? In my app the user clicks a button and I want a report to print. If you're viewing the report with the StiViewer it would makes sense to swipe in and choose "Devices" etc, etc... to print. But in that situation you have context. So are you saying you've removed all non-viewer print functionality?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report data/preview not working in 12.3 release

Post by HighAley »

Hello.

There is some limitations that we are trying to get round. At this moment there is no possibility to print report without Viewer.

Thank you.
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Report data/preview not working in 12.3 release

Post by adamaka »

Why on earth would you do that? We just purchased your software after building the entire app on the previous version, and now you just COMPLETELY REMOVE functionality in the new version? I'm glad some of the printing issues are fixed, but at least with the previous version you can print AT ALL (without viewer). We are building LOB apps that aren't released to marketplace, and could honestly care less about what Windows 8 RECOMMENDS. What I liked about your product is it WORKED, which is more than I can say now.

PLEASE add print functionality sin-viewer back in. As a business user, I don't care to preview every report I'm about to print in the viewer... I get a preview when I select a printer before I print. To navigate away from the page I'm on to get to the viewer, swipe for the app bar or charm bar, click print, select a printer, tap print, then navigate back to where I was...it's a nuisance and in my opinion a much worse user experience. I just want it to GO.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Report data/preview not working in 12.3 release

Post by Andrew »

Hello,

I am sorry for inconvenience.
We will return the method with a detailed description how to use it, so that no errors occur in working with this.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Report data/preview not working in 12.3 release

Post by Alex K. »

Hello,

Sorry for mistake.
Please check the sample in attachment.

Thank you.
Attachments
PrintingFromCode.zip
(666.86 KiB) Downloaded 594 times
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Report data/preview not working in 12.3 release

Post by adamaka »

This is about what I was trying to do last week. I added something similar to my service, but this didn't solve when trying to print from the viewer as well... in my app a user may print from a screen (code), or navigate to the viewer to print other things. The missing piece was to bring in my service to my report viewer view model and unregister the StiPrintReport residing there OnNavigatedTo so the viewer could then do its thing.

Thanks for the help. In the next rev it'd be nice to have that Async call working again, but this is a decent workaround.
Locked