Print -> sends wrong report to printer

Stimulsoft Reports.WEB discussion
Post Reply
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Print -> sends wrong report to printer

Post by brianj774 »

Hi,

I'm at a complete loss to resolve this issue. I post it here so that maybe you can give me some ideas on how I might get to the bottom of it.

The issue at stake is that we are presenting receipts on screen to the users, who then click the print button to send the receipt (report) to the printer. In normal, slow usage scenarios, everything works as expected. But, in high volume situations (not really high...like 10 or 15 simultaneous users), the receipt rendered to the monitor is correct, but when they send to the printer, sometimes, they get a completely different receipt.

In one test scenario, we had users creating orders in 3 distinct geographical areas (Minnesota, Illinois, Texas....places seperated by HUNDEREDS of miles from each other). Occasionally, one of the receipts printed would be from one of the OTHER areas (Texas printer outputting an Illinois receipt, for example).

Our setup is ASP.Net MVC, using stimulsoft 2013.2.1617.0.

The print callback is setup like this:

Code: Select all

		ActionPrintReport = "ReportPrint",
And here's the entire callback:

Code: Select all

		public ActionResult ReportPrint() {
			// Return the exported report file
			return StiMvcViewer.PrintReportResult(httpCtx);
		}
So, the question is, what COULD cause this crazy behavior. There doesn't appear to be any mechanism by which the users could be getting a new receipt for printing.

Totally, utterly, completely.....

Lost.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Print -> sends wrong report to printer

Post by Vladimir »

Hello,

By default, for viewing, exporting, and printing the report the server cache is used, where saving the rendered report after the first rendering. As the cache key the viewer ID and report guid is used. For each report it is unique. If the report uses a Request from User variables, it is also used a checksum of variable values. The StiMvcViewer.PrintReportResult method uses the same method of getting the report from the cache as methods for viewing or exporting the report. It does not use any global variables.

For a more detailed analysis, please specify the value of the ServerCacheMode property, and please provide the code for the ActionGetReportSnapshot method in which you load the report.

Also, since the release 2013.2 we fixed a bug with caching reports that use variables – users can get a report with variables whose values are set by another user. Please try to update to the release 2014.1 or test the Trial version.

Thank you.
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: Print -> sends wrong report to printer

Post by brianj774 »

we ran another test today, trying a number of different things (changing the menuprintdestination, removing some javascript that we thought might be affecting things, etc)... nothing made any difference...it happened within a few moments every time.

BUT, when I flipped the switch to change from using the "StiMvcViewerFx" (instead of the 'StiMvcViewer'), the problem mysteriously went away.

Please help! My company is really upset over this issue, and I've got nothing to give them.....
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Print -> sends wrong report to printer

Post by Vladimir »

Hello,

Please give us the following information:
Are you testing the new release 2014.1? Does the problem persist?
Which printing option are you using – Print to PDF, Print with Preview, Print without Preview? Does the problem occur with any of the printing options?
Which web browser are you using? Does the problem depend on the web browser?
Does the problem occur when exporting a report?

Thank you.
mesha792
Posts: 7
Joined: Sun Aug 23, 2015 2:05 pm

Re: Print -> sends wrong report to printer

Post by mesha792 »

Hello,

I have same problem when users concurrent print report wrong report show them on preview .
i used release 2014.3 and had problem in print to pdf , with preview , without preview in all browser.
i solved my problem with define ServerCacheMode to None and new method for print and return StiMvcViewer.PrintReportResult(HttpContext, report) to ActionPrintReport
but it is Not optimal because in view and print should access server to get query and post to client.
please help me to solve problem in Optimization.

Thank you
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Print -> sends wrong report to printer

Post by HighAley »

Hello.

We have added a new property to avoid issue with wrong printing.
Please, upgrade to our latest prerelease build and use next property:

Code: Select all

                    Server =
                    {
                        GlobalReportCache = false
                    },
Thank you.
Post Reply