Page 1 of 1

Report preview differ from print preview

Posted: Wed Sep 18, 2019 10:53 am
by csrt
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.

Re: Report preview differ from print preview

Posted: Thu Sep 19, 2019 8:43 am
by Lech Kulikowski
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.

Re: Report preview differ from print preview

Posted: Thu Sep 19, 2019 9:06 am
by csrt
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?

Re: Report preview differ from print preview

Posted: Thu Sep 19, 2019 9:02 pm
by HighAley
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.

Re: Report preview differ from print preview

Posted: Fri Sep 20, 2019 10:04 am
by csrt
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.

Re: Report preview differ from print preview

Posted: Sat Sep 21, 2019 7:35 am
by HighAley
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.

Re: Report preview differ from print preview

Posted: Wed Oct 02, 2019 11:42 am
by csrt
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.

Re: Report preview differ from print preview

Posted: Fri Oct 04, 2019 2:29 pm
by Lech Kulikowski
Hello,

We need some additional time to investigate the issue.

Thank you.

Re: Report preview differ from print preview

Posted: Thu Nov 07, 2019 2:21 pm
by csrt
Hello. Did you manage to check the issue? Can you tell me if there is a problem in the report itself, or some browser-library interaction issues, that doesn't allow the library to manipulate the browser print settings?

Re: Report preview differ from print preview

Posted: Tue Nov 12, 2019 7:57 am
by Lech Kulikowski
Hello,

It is not possible to change browser print settings from any library, it is the browser limitation (Security Policy).

Thank you.