Search code examples
vb.netactivereports

Programmatically Adding a Barcode to a Page in ActiveReports


I have code which is implementing an interface giving me access to a DataDynamics.ActiveReports.Document.Document. From there I'm able to access the different Pages in the document. I've also created a DataDynamics.ActiveReports.Barcode.

I can't seem to find a way to add the barcode onto a Document or if it's possible at all.

I have some sample code which manages to do it by creating a brand new active report, adding the barcode, then exporting it as an image, croping the image, and drawing the image to the page, but I was hoping there was a more direct way.


Solution

  • once a report document is generated, it is a static snapshot of the report AFTER it was run. You cannot add control to that document anymore; you can still do document manipulation using the document/page api. for example, you can add/remove pages, draw text, borders on the pages and etcs..

    take a look at the page api here: http://tinyurl.com/nxv7wct

    If you want to add a barcode control to the report; you have to add it to to the report layout and then run the report again. it will then be available in the report document.