Just thought I’d let you guys know we’ve been able to get the report to come out clear via our custom code and pass with an A from Epicor.
It all revolved around setting the AttachmentType and SSRSRenderFormat to “EMF” instead of “PDF”
See below:
...
bqRptDS.BAQReportParam[0].AttachmentType = "EMF";
bqRptDS.BAQReportParam[0].ReportCurrencyCode = "USD";
bqRptDS.BAQReportParam[0].ReportCultureCode = "en-US";
bqRptDS.BAQReportParam[0].SSRSRenderFormat = "EMF";
...
Also, from the BAQ Report Test Form we weren’t able to force all the correct parameters to RptPageSettings and RptPrinterSettings, but in our custom code we do.
Still haven’t figured out quite how to do that directly from the BAQ Report Test Form, and it would be nice if we could.
Example settings below:
Custom Code:
bqRptDS.BAQReportParam[0].RptPageSettings = Color=False,Landscape=False,Margins=[Left=0 Right=0 Top=0 Bottom=0],PaperSize=[Kind="4x1.5" Height=150 Width=400],PaperSource=[SourceName="unknown" Kind="Custom"],PrinterResolution=[X=300 Y=300]
bqRptDS.BAQReportParam[0].RptPrinterSettings = PrinterName="xxx_xxx_xxx_xxx",Copies=2,Collate=True,Duplex=Simplex,FromPage=0,ToPage=0
BAQ Report Test Form (obtained via trace):
RptPageSettings = Color=False,Landscape=False,PaperSize=[Kind="Custom" PaperName="Custom" Height=150 Width=400],PaperSource=[SourceName="Manual feed" Kind="Manual"],PrinterResolution=[Kind="Custom" X=300 Y=300]
RptPrinterSettings = PrinterName="xxx_xxx_xxx_xxx",Copies=2,Collate=False,Duplex=Simplex,FromPage=1,ToPage=0
The first noticeable difference between the custom code and the BAQ Report Test Form I picked up here is the Kind option for PaperSize. I have found that it must be set to a stock size available to the printer, otherwise who knows what will render. As I’ve seen without this, when you print preview or print in EMF format it distorts and stretches the label so that it looks like it’s trying to make it a 4"x6" label.
The other differences (PaperSource SourceName and Kind) I don’t think matter much, but they work with “unknown” and “Custom” in our custom code so I left them as is.
Suffice to say, I don’t know how to “force” the correct parameters to be set via the BAQ Report Test Form. Has anyone been able to do this?
One other thing - from SSRS, as I mentioned earlier, we are able to print clearly too. However, in the interest of comparing Apples to Apples here, is there some way to print in EMF format from SSRS Developer Studio directly so we know we are doing the same thing there we are doing in our customization?