I checked back on some previous posts, and I think I know the answer but just wanted to double check. A supplier is requesting that I upload a PDF copy of our Pack Slip to their FTP site - no problems, I’ve already got code that can upload a file to FTP using C#. I just need to generate the PDF…
Using the below code obtained from a previous post works on a data directive, and pops the report to screen. I know of PREVIEW and PRINT as methods for the AutoAction - is there one called “EXPORT” or “GENERATE” for Crystal?
(I know this will be easier in SSRS, and have already got our pack slip created in SSRS but it needs to be made to look a bit prettier and checked before deployment, and I’d like to get this auto upload working before that)
var service = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.PackingSlipPrintSvcContract>(Db); var ds = service.GetNewParameters(); service.PackNumDefaults(ref ds); //Set required values in ds ds.PackingSlipParam.PackNumList = "128581"; ds.PackingSlipParam.AutoAction = "PREVIEW"; ds.PackingSlipParam.WorkstationID = "BV-PC-001 MarkDamen"; ds.PackingSlipParam.ReportCurrencyCode = "GBP"; ds.PackingSlipParam.ReportCultureCode = "en-GB"; service.SubmitToAgent(ds, "SystemTaskAgent", 0, 0, "Erp.UIRpt.PackingSlip");