Custom Emitter

RainerRainer Member
edited December 31, 1969 in Developing Analytics Applications
Hi all,

i am using birt RE API in my own webapp. Everything works fine, reports can be rendered as html, pdf and xls. My customer needs the ability to download table-contents also in csv-format. There are few examples about custom emitters on the web and also in the book by Jason Weathersby and others. I have downloaded the example from actuate website and followed the instructions but unfortunatly i am not able to get the example running. I have read, some changes must be done to the engine api.
Does somebody got an working example on custom emitter to use with BIRT? My environment is BIRT 2.2.2 with eclipse 3.3

Thanks in advance

Rainer

Comments

  • IrethIreth Junior Member
    edited December 31, 1969
    I have the same problem with that example.

    I try to add the XML Emitter, but i receive the following error:

    EmitterID org.eclipse.birt.report.engine.emitter.xml for render option is invalid.



    I followed the steps described here -> Developing an Eclipse BIRT XML Report Rendering Extension and here ->The Digital Voice: BIRT: Writing an Emitter, but still get the same error.



    Any solution?
  • mwilliamsmwilliams BIRT Guru
    edited December 31, 1969
    Ireth,



    This post in the devShare may help with your XML emitter problem:



    BIRT - Writing an XML emitter - Articles - BIRT Exchange

    Regards,

    Michael Williams

    eSignLive Evangelism & Community Manager | eSignLive by VASCO
     
    Find me on:
    Twitter
    Facebook
    Blog

    LinkedIn

    eSignLive Developer Community
     
    Email me:
    Google: [email protected]

  • Hi,


     


    Apologies if this has been mentioned already. Just wanted to check how can I get these Devshare Sample reports. As most of the dev share link I click from older posts, the post itself looks like removed.


     


    Could you help me with new link to look out for.


     


    Thanks


  • Hi,


     


    Here are a couple of links, including I believe the one you are looking for:


     


    Writing an XML Emitter


     


    Writing BIRT Emitters :XML and JPEG Emitter


     


    Hope this helps,


     


    P.


    Pierre Richer

    Solutions Consultant, Analytics & Reporting

    OpenText

     

  • Hi, I'm trying to get the output in JPEG format and I used the sample code provided in this link,


    Tutorial : Writing BIRT Emitters: XML and JPEG Emitter.


    But I'm not able to see the images included in the report appearing in output JPEG format.


     


    I found that the reason for this is because both the drawImage() (overloaded) methods are not implemented.


     


    Can you please help me to implement this method ?? I only have the URI, I don't understand how to create the Image object, as the canvas.drawImage() needs the Image and the ImageObserver as input parameters


  • Hi All,


    I further extended Jcomponent and implemented as below,


    public class Jpeg extends JComponent implements IPage


    {


     private Graphics2D canvas;


     private double scale;


     


    public void drawImage(String imageId, byte[] imageData, String extension, int imageX, int imageY, int height, int width, String helpText, Map params) throws Exception


    {


       Image img = Toolkit.getDefaultTookit().getImage(imageId);


       this.canvas.drawImage(img, scale(imageX), scale(imageY), scale(width), scale(height), this);


    }


    }


    When I try to debug, I can see the image object loaded and proper values for the position variables. Still I do not see the images on documents.


     


    Can someone please give some pointers on how to proceed with this ??


     


    Thanks for your help in advance !


Sign In or Register to comment.