Conditional printing based on copy number

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

Conditional printing based on copy number

Post by Fabio Pagano »

I have a report printed in three copies. On the first copy i need to print a text "Copy for the customer", on the second copy i need to print "Internal use copy" and on the third i need to print "Accounting use copy".

I have seen the "Conditions" in text editor but doesn't seem to be something like "IfCopyNumber=1 then".

Any suggestion?

Thanks.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Conditional printing based on copy number

Post by EDV Gradl »

I use a variable which I set before each printing.

Just define a variable CopyNo int

and set it before printing

report["CopyNo"] = 1

Now you can use if or switch to set the right text in an GeValue event of a textbox.

I hope that helps.

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

Conditional printing based on copy number

Post by Fabio Pagano »

In my case the printing is from a serialized report (.mdz or .mdc), so GetValue event is not fired.

Thanks.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Conditional printing based on copy number

Post by EDV Gradl »

Then you could use the

StiPage.PagePainted
StiPage.PagePainting

events.

There you can add anything to the already rendered report.

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

Conditional printing based on copy number

Post by Fabio Pagano »

Ok, thanks, but i was hoping in something more automatic, eg. a condition on the component (something like "Print only on copy n. 1").
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Conditional printing based on copy number

Post by Edward »

In that case you need to Call report.Print() 3 times without showing Standard Printing dialog.

We cannot control printing procedure with multi copies because we do not process this procedure this really controls Windows.

Thank you.
Post Reply