Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Challenges in getting automated printing of reports WPF
posted

Hi

I finally had enough of Crystal and decided to give Infragistics Reports a go for a new WPF project using Visual Studio 2010.  I realise we are in CTP (I'm using the CTP version obviously), but still have a few issues I'm trying to sort out:

1) In Crystal I usually write a wrapper class that can load a report (from filename or Uri), get passed some data (dataset or datatables usually) and can either export to PDF, or print based on the methods chosen .. all of this without any UI .. can't get this to work with Reporting CTP .. any ideas?

2) I have a UI showing with a XamReportViewer and can successfully see the report in preview.  The report has a special "bar code" font .. just another font really.  When I export to PDF it works perfectly.  When I print - the bar code font gets converted to something like Wing Dings .. not my barcode!  The bar code "text" is simply the barcode wrapped in asterisks .. eg. "1234" would be "*1234*" and printed using my "3 of 9 barcode" TruType font.

3) From the UI with the XamReportViewer showing beautifully, I'd like to use my own button (or another trigger) to print the report to s specified printer .. a) how can I ask it to print programmatically, and (b) how do I choose the printer to print to ?

It looks really promising as I got my report designed in no time at all, and I am guessing it will be a much smaller footprint and deployment that Crystal.  Nice work!

Any speedy replies would be appreciated .. thanks

Gary   2011.1 + CTP (not as per below signature)!

Parents
No Data
Reply
  • 3070
    posted

    Hi Gary,

    Thanks for your feedback.

    Regarding your questions:

    1)      In the CTP we only support exporting through the XamReportViewer. The viewer will need to be in the visual tree in order to do that. You can hide the XamReportViewer and use its API to do the export. For V1 we will support server-side exporting, which does not need the XamReportViewer.

    2)      We successfully reproduce the problem you mention. It may be related to the font you are using. We can reproduce the problem using this http://www.dafont.com/3of9-barcode.font font. It is weird since if we print the document to the XPS printer and then you print the XPS document it is correctly printed. We also try with this font " http://www.barcodesinc.com/free-barcode-font/ " and it works ok when we print the report directly to the printer. Which font are you using?

    3)      Currently we don’t provide a way of invoking printing programmatically; we will provide one for V1.

    Thanks,

    Leo

Children
No Data