In a new .mrt file the <PaperSize> tag is missing

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

In a new .mrt file the <PaperSize> tag is missing

Post by Fabio Pagano »

Using version 2009.1.335.0 of 2 February 2009.

In a newly created report design (i leave it empty to make a simple test), when i print from the designer preview on a certain printer i have the error "Handle not valid" (the error seems to come from the printer driver). Using another printer, it works ok. Using a design made with a previous version (i don't know what version) it works fine on every printer.

So i've matched the two .mrt files (the one created with the old version of StimulReport - that works on every printer - and the one created with the new version 2009.1.335.0 of 2 February 2009 that gives the "Handle not valid" error on a certain printer).

I've seen that in the non working file the following line is missing:

A4

Manually adding this line (in the appropriate place) in the non working mrt, everything has printed fine.

I've seen that if i in design i explicitly set the "A4" paper size through user interface, the "A4" tag is correctly written in the .mrt file.

It seems that when i create a new .mrt file it has no default paper size set and this gives some problem on some printer driver.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

In a new .mrt file the <PaperSize> tag is missing

Post by Edward »

Hi Fabio,

Thank you very much for this useful information. We will check it and let you know our results.

Please inform us about the printer models you used.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

In a new .mrt file the <PaperSize> tag is missing

Post by Fabio Pagano »

The color printer is a Konica Minolta bizhub C350.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

In a new .mrt file the <PaperSize> tag is missing

Post by Edward »

Hi Fabio,

Sorry, but we can not help you in this case. You have to set the size of the page in the BeforePrintEvent of the report for all those pages which do not have a page size parameter. It is the only workaround possible.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

In a new .mrt file the <PaperSize> tag is missing

Post by Fabio Pagano »

Ok. Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

In a new .mrt file the <PaperSize> tag is missing

Post by Jan »

Hello Fabio,
Fabio wrote: It seems that when i create a new .mrt file it has no default paper size set and this gives some problem on some printer driver.

Thank you.
You can change paper size with help of following static property:

Code: Select all

StiOptions.Engine.DefaultPaperSize
Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

In a new .mrt file the <PaperSize> tag is missing

Post by Fabio Pagano »

Good, thank you very much.
Post Reply