SOPickList how to specify number of copies to print?


I want to generate the SOPickList report in code, and sometimes I need to print more than one copy as the shipment may be sent on multiple trucks. They would want the paperwork for each truck. Say there is 3 trucks for the shipment, I know I can print 3 times one after another, but this generates 3 PDF’s. I want to generate 1 PDF containing the 3 copies.

I know that is I specify an orderList in the parameters seperated by ~ , if the orders are different, they will all print as one PDF. But I tried to generate using this syntax: “38270~38270~38270” but only one copy gets printed… (the Epicor code evaluates being the same order, and do not generate the copies…)

So, is there a way to generate copies within the same PDF ?



PS here is the code I use:

private void LaunchLPC(string order, DateTime dtmin, DateTime dtmax)
	            Erp.Proxy.Rpt.SOPickListReportImpl report = WCFServiceSupport.CreateImpl<Erp.Proxy.Rpt.SOPickListReportImpl>((Ice.Core.Session)oTrans.Session, Epicor.ServiceModel.Channels.ImplBase<Erp.Contracts.SOPickListReportSvcContract>.UriPath);
	            var ds = report.GetNewParameters();
				ds.SOPickListReportParam[0].ToDate = dtmax; 
				ds.SOPickListReportParam[0].FromDate = dtmin; 
	            ds.SOPickListReportParam[0].OrderList = order;
				ds.SOPickListReportParam[0].ArchiveCode = 0;
				ds.SOPickListReportParam[0].AgentID = "SystemTaskAgent";
	            ds.SOPickListReportParam[0].AutoAction = "SSRSPREVIEW";
	            ds.SOPickListReportParam[0].SSRSRenderFormat = "PDF";
				ds.SOPickListReportParam[0].WorkstationID = WorkID;
				ds.SOPickListReportParam[0].ReportStyleNum = 1001;
				ds.SOPickListReportParam[0].DateFormat = "mm/dd/yyyy";
			    ds.SOPickListReportParam[0].NumericFormat = ",.";
				ds.SOPickListReportParam[0].TaskNote = "Du menu contexte de la commande: " + ds.SOPickListReportParam[0].OrderList + " par " + UserName ;
				ds.SOPickListReportParam[0].ReportCultureCode = "en-CA";
				string dquote = "\""; string dbakslash = @"\\"; string bakslash = "\\";

				ds.SOPickListReportParam[0].RptPageSettings = "Color=True,Landscape=True,Margins=[Left=25 Right=25 Top=25 Bottom=25],PaperSize=[Kind=" + dquote + "Letter" + dquote + " PaperName=" + dquote + "Lettre" + dquote + " Height=1100 Width=850],PaperSource=[SourceName=" + dquote + "Sélection automatique" + dquote + " Kind=" + dquote + "AutomaticFeed" + dquote + "],PrinterResolution=[Kind=" + dquote  + "Custom" + dquote + " X=600 Y=600]";
				string info = "";
				report.SubmitToAgent(ds, "SystemTaskAgent", ds.SOPickListReportParam[0].AgentSchedNum, 0, "Erp.UIRpt.SOPickListReport");
	        catch (Exception ex)

I don’t see the point of a PDF with multiple copies in it. It’s not like the PDF could only be printed once, or attached to a single email. Is there some other aspect of the process that requires the printout to go to PDF first, and then to a printer?

And FTR - I’d be against shipments on separate trucks using the same paperwork. Granted you said this is for SOPickList, do the picked items end up on separate packers? And how do you keep the same item from being picked multiple times?

  1. It is not an obligation to preview first…
  2. The report is the same, but what is written on it si pertinent to each truck. Who did the load, time duration etc…
    It is paperwork for us, not the driver…

I could send 3 repetitive calls to print, I was wandering if there was a setting for a number of copies that was existing… thats all.

The actual process is user is looking at the list of shipping orders, and selects which one to print from a dashboard, my goal was to generate the pdf that contains all the selected orders to print, and for an order requiring copies, well generated them within the same pdf… Resulting as OrderA, OrderB, OrderB, OrderC etc…part of the same pdf.

Why not sending directly? our current users have no direct access via Epicor to their local printers, using Remote Desktop on XP…, They are using preview, to print to their local printers. (but soon that will change…but for now it is how it is… )


When you say “written on it”, this actual hand written notes on the printout?

And on your dashboard, user selects orders to pick (and a print count for each?), then your code generates the task to print them? Do all the orders end up in one PDF? If the dashboard was

Selected  OrderNum   Copies
YES       12300      1
YES       12301      1
NO        12302      1
YES       12303      3
YES       12304      1

Youd want a single PDF with (assuming each Pick list is a single page):

Page 1  Order 12300 (copy 1 of 1)
Page 2  Order 12301 (copy 1 of 1)
Page 3  Order 12303 (copy 1 of 3)
Page 4  Order 12303 (copy 2 of 3)
Page 5  Order 12303 (copy 3 of 3)
Page 6  Order 12304 (copy 1 of 1)

That’s what you’d like to have happen? But only one copy of 12303 prints, and order 12304 is page 4 (the last page). ??

Or would you want 4 PDFs (one each for order, with the one for 12303 having 3 pages??

FWIW - I did some experimenting, and even when I “Print” (with copy count set to 3) to a PDF printer, it just makes one PDF with 1 copy of the report.



I see you’re using the RptPageSettings, have you tried using RptPrinterSettings? That’s where you can specify number of copies the printer prints.

In the picture of your dashboard, SO 38270 is shown 5 times (first 3 have unique ship by dates, #'s 4 and 5 have same Ship By date). In this example, you want the first line to be just items shipped by 12-11, and the 2nd for items with ship by of 12-12, etc … And with the last two being just two copies of the same one for 12-17?

Also, It tried just printing a SOPickList multiple times by adding it to the list on the Print SOPickList form, but get:

And Even If I put them out of order (made the OrderList = “2191110~2191126~2191128~2191110”, it still only makes 3 pages.(I was hoping that 2191110 would be on page 1 and page 4)

So I don’t see how you could include the same OrderNum multiple times, in code.

What you could do, what would be a real hack, would be to make the RDL print several times based on a value UD value in the OrderHed table.

Good point,

it was commented out as I was using PrintPreview…

ds.SOPickListReportParam[0].RptPrinterSettings = "PrinterName=" + dquote +  ds.SOPickListReportParam[0].PrinterName  +  dquote + ",Copies=1,Collate=False,Duplex=Simplex,FromPage=0,ToPage=0";

I will give it a try…tks


Sorry, the list is repeated because of different release dates of same order.
It was to show thqat a user would select what date to print, then number of copies if necessary.

The unique value that what I tought was happening… I will try the print copies idea to see if it drives ok. But I like also your hack of the report itself… Isint there a number of copies report parameter? I will check that as well…



Ah, looked over the SSRSPreview bit. You would need to switch to SSRSClientPrint I think for this to work. Also specify a printer in the printer settings.