How to print service call from code
Paul Witmond
Hi,We want to generate a PDF of a service call
This is the code we use
LayoutHelper.LayoutOpener.ExecutePrintDef("T0031004",LayoutHelper.LayoutOpener.OpenLayoutModes.Preview ,"callID","1722","CardCode","LDRS")
We expect the preview of service call 1722 from customer LDRS but the report is empty
Who knows what I'm doing wrong ?
Thanks,
Paul
Paolo Manfrin
Hi Paul,are you using the printDefId or name?
Can you try with this overload
[color=red][size=4][color=#660066]LayoutHelper[/color][/size][/color][color=#666600].[/color][color=#660066]LayoutOpener[/color][color=#666600].[/color][color=#660066]ExecutePrintDef[/color][color=#666600]([/color][color=#660066]GetData[/color][color=#666600]([/color][color=#008800]"LD.SysPar.PrintDefId"[/color][color=#666600]),[/color][color=#000088]True[/color][color=#666600],[/color][color=red][size=4][color=#660066]LayoutHelper[/color][/size][/color][color=#666600].[/color][color=#660066]LayoutOpener[/color][color=#666600].[/color][color=#660066]OpenLayoutModes[/color][color=#666600].[/color][color=#000000]PDF[/color][color=#666600],[/color][color=#008800]"DocEntry"[/color][color=#666600],[/color][color=#000000] [/color][color=#660066]GetData[/color][color=#666600]([/color][color=#008800]"LD.Par.DocEntry"[/color][color=#666600]),[/color][color=#008800]"AddMode"[/color][color=#666600],[/color][color=#000000] [/color][color=#660066]GetData[/color][color=#666600]([/color][color=#008800]"LD.Par.AddMode"[/color][color=#666600]))
and specify the "true" if using the printdef name?
hth
paolo[/color]
Paul Witmond
Hi Paolo,I'm using the printdefid
I'm trying to print a service call so DocEntry must be callID but the result is the same, blank page
Thanks,
Paul
Paolo Manfrin
Hi Paul,if you start the report from the Service Call itself does it get print correctly?
Please could you attach as well the ParameterLayoutDef when you do the printing and compare the result of such report with the parameters you are passing to the function?
If still it does not work please attach here the result of the ParameterLayoutDef.
Thank You,
paolo
Paolo Manfrin
Hi Paul,to be more clear about the printDef Name Id please check the attached file [attachment=329:printDefNameId.png].
and it should be used as:
[color=#282828][font=helvetica, arial, sans-serif]LayoutHelper.LayoutOpener.ExecutePrintDef("MyPrintDefName",True, LayoutHelper.LayoutOpener.OpenLayoutModes.Preview ,"callID","1722","CardCode","LDRS")[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]hth[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]paolo[/font][/color]
0
Please sign in to leave a comment.
Comments
0 comments