Conditionaly print second page in layout
Joeri Vlemmings
Hi,I have created a layout with 2 pages. But depending on the doctype (Item or Service) I need to print the second page or not.
I have made it this far that I don't see the second page in the preview mode, but great was my suprise when it did get printed!
If Document("DocType") = "S" Then
Engine.TemplatePage.Controls.RemoveAt(1)
page2.PaperKind = PerpetuumSoft.Reporting.DOM.PaperKind.Custom
page2.CustomSize = New PerpetuumSoft.Framework.Drawing.Vector(0, 0).ConvertUnits(PerpetuumSoft.Framework.Drawing.Unit.Centimeter, PerpetuumSoft.Framework.Drawing.Unit.InternalUnit)
End If
It is not possible to create 2 separate layoutdefinitions and call them using a copy query, because when printing a batch, my printserver can mix the printjobs and so the first and second page don't stay together.
I also tried the following code but then I get an errormessage (Print Error in Layout: Engine is not available in current state) when I try to print it.
If Document("DocType") = "S" Then
Engine.TemplateDocument.Pages.RemoveAt(1)
End If
Can you help met with this?
Greetz,
Joeri
Philipp Knecht
Hi JoeriPrinting of Printorders as you do is asynchron in 1.52.
We've changed that now in beta and next version so the order within the Printorder will be ok.
I've tested your script with the beta.
There is still the issue that i gets printed physically.
I'll try to get an answer from the Perpetuum Team and let you know.
hth
Mario Höfer
Hi Philipp,any news on that issue ?
Philipp Knecht
Hi JoeriIf it's the same printer but different trays you can use the printer & tray setting in the layoutdefinition this way its gurantedd that print orders doesn't get mixed.
hth
0
Please sign in to leave a comment.
Comments
0 comments