Report preview differ from print preview

Stimulsoft Dashboards.JS discussion
Post Reply
csrt
Posts: 5
Joined: Thu Jan 17, 2019 12:38 pm

Report preview differ from print preview

Post by csrt » Wed Sep 18, 2019 10:53 am

I am trying to print a report. In the viewer it shows 8 pages, but when I try to print it via Print with/without preview - data doesn't fit on one page, or sometimes empty pages appear.
However, if I use report.printToPdf();, it prints 8 pages as shown in preview.

Questions:
1) Why report.printToPdf() is working, and simple Ctrl+P doesn't?
2) Why the data that doesn't fit just won't create an extra page (9 pages instead of 8 etc)?
3) Is there a way to force Scale to Fit?

Enclosed there are screenshots, report and report data.
Attachments
report_3.png
report_3.png (320.66 KiB) Viewed 541 times
report_2.png
report_2.png (250.49 KiB) Viewed 541 times
report_1.png
report_1.png (73.67 KiB) Viewed 541 times
invent.json.mrt
(124.44 KiB) Downloaded 5 times
Report.csv
(26.59 KiB) Downloaded 3 times
Lech Kulikowski
Posts: 1863
Joined: Tue Mar 20, 2018 5:34 am

Re: Report preview differ from print preview

Post by Lech Kulikowski » Thu Sep 19, 2019 8:43 am

Hello,

report.printToPdf(); - is exporting to PDF.
Print with/without preview - is printing with browser feature and results depend on the browser printing settings (margins, headers, footers, etc.)
Unfortunately, due to the browser security police, these settings cannot be set from the viewer.

Thank you.
csrt
Posts: 5
Joined: Thu Jan 17, 2019 12:38 pm

Re: Report preview differ from print preview

Post by csrt » Thu Sep 19, 2019 9:06 am

But how about this particular report I've attached? Can you take a look and say what we are doing wrong, so the result in the viewer and print preview doesn't match? Maybe we are setting the report wrong, or we are missing some key settings?
HighAley
Posts: 8065
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report preview differ from print preview

Post by HighAley » Thu Sep 19, 2019 9:02 pm

Hello.

The page size in your report is custom. The margins are set to zero.

We don't see the page size on the print settings. Maybe they are different.
The browser adds additional margins that can move content of the page to the next one.

Thank you.
csrt
Posts: 5
Joined: Thu Jan 17, 2019 12:38 pm

Re: Report preview differ from print preview

Post by csrt » Fri Sep 20, 2019 10:04 am

Hello, I've modified the report, so that the size would be A4, and margins 1cm each. In the printer settings I've set margins to default and custom(1cm each), and the problem still persists.
I even made a report with only the data band - no header, no footer, just data. And the problem is present. I've attached the reports and screenshots.

So maybe the problem is in some settings of the data band? Because, how I understand it, if the data doesn't fit - it should go on another page. But in my case I get next behavior - in the viewer it shows 8 pages, but in print it shows more (some content doesn't fit).

I would appreciate if you take a loot at the attached reports (especially that with the data band only), and could suggest me a solution to this situation. Thank you.
Attachments
report-margins.mrt
(101.32 KiB) Downloaded 4 times
report-onlyData.mrt
(66.59 KiB) Downloaded 4 times
report_4.png
report_4.png (175.01 KiB) Viewed 528 times
report_5.png
report_5.png (293.36 KiB) Viewed 528 times
report_6.png
report_6.png (185.15 KiB) Viewed 528 times
report_7.png
report_7.png (269.75 KiB) Viewed 528 times
HighAley
Posts: 8065
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report preview differ from print preview

Post by HighAley » Sat Sep 21, 2019 7:35 am

Hello.

Sorry, we can't reproduce the issue without data.
Please, try the Print To PDF feature.
If the report is right there then the issue is in print settings of the browser.

The same margins in the browser don't guarantee that the report fit in page.
Make the margins smaller.

Thank you.
csrt
Posts: 5
Joined: Thu Jan 17, 2019 12:38 pm

Re: Report preview differ from print preview

Post by csrt » Wed Oct 02, 2019 11:42 am

Hello again. I've attached again the report and data in csv. Can you please take a look at this report with data, and point me what seems to be the problem? Thank you in advance.
Attachments
invent.json.mrt
(124.44 KiB) Downloaded 3 times
Report.csv
(26.59 KiB) Downloaded 3 times
Lech Kulikowski
Posts: 1863
Joined: Tue Mar 20, 2018 5:34 am

Re: Report preview differ from print preview

Post by Lech Kulikowski » Fri Oct 04, 2019 2:29 pm

Hello,

We need some additional time to investigate the issue.

Thank you.
Post Reply