1

I have a problem that I can't seem to get rid of.

When a customer of mine prints a specific QRP, he gets a "WARNING. This report may extend beyond the printer page margins. Text may be clipped, depending on the printer in use. Do you wish to continue?"

While of course in no way critical, it's a problem due to the sheer number of prints per day this customer has, having to confirm this dialog every time.

I've had this issue before and seemed to be able to fix it by setting the report format to "Custom", but I've recently updated the QRP and the problem is back despite being still set to "Custom". I have also tried A4 (which is the printer's standard page format) and A5, to no avail. Is there maybe a way to suppress this error in code? The report itself is way smaller than A4 (it's an A5 format packaging label) so there is no way it would lead to any problems with the print margins, and the prints do come out perfectly fine.

Skjoldson
  • 41
  • 4
  • Clarification: I don't get the error message when testing locally, it only happens at the customer. – Skjoldson Jan 14 '20 at 08:27
  • This can happen when an element (a line, label etc.) is too close to the margins. Even if it is not visible. Try to find those elements. Have you also tried to increase the page margins in the qrp (menu Format / Report / Page Margins)? – Thomas Uttendorfer Jan 15 '20 at 10:04
  • Ah, that could indeed explain it. I suspect the margin values (0.5 in my case) are added on the right of the top ruler's zero mark, making it possible to cross them? – Skjoldson Jan 15 '20 at 10:24

1 Answers1

1

You can use the constant RPT_PrintNoWarn along with SalReportPrint function. The constant is used for suppressing warnings about margin overflow and tiled pages. It can be combained with constant RPT_PrintNoErrors using pipe symbol.

SalReportPrint ( hWndFrm, strTemplate, strVariables, strInputs, nCopies, RPT_PrintNoWarn|RPT_PrintNoErrors, nFirstPage, nLastPage, nErr )
Chandralal
  • 559
  • 2
  • 11
  • 26