facebook

BIRT native XLS Emitter in Myeclipse?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #342888 Reply

    bocedv
    Member

    Hi, the XLS emitter of original BIRT isn’t native one, it only exports actually an “XML” files, I found a plugin (http://code.google.com/a/eclipselabs.org/p/native-excel-emitter-birt-plugin/) which can support to export XLS as a native xls file(in binary), but I don’t know how can I install it or migrate it into the current BIRT environment in myeclispe (they provide only how to install in ecplise), Does anyone have ideas?

    I use Myeclipse bling 10.6.
    Thanks a lot.

    #342914 Reply

    support-tony
    Keymaster

    bocedv,

    You can install the plugin by placing the jar file in the dropins folder of your MyEclipse install folder. The install folder is the one that contains the myeclipse executable (myeclipse-blue.exe).

    Then, when you launch MyEclipse, wait a little while and you will see a pop-up informing you that the new plug-in has been installed. After that, when you select XLS in the View Report menu, you will get the native XLS output.

    Please let us know if this works for you.

    #342918 Reply

    bocedv
    Member

    Thanks.
    I want it work in runtime environemnt, copy files in lib, doesn’t work. Any ideas else?

    #342967 Reply

    support-tony
    Keymaster

    bodedv,

    Sorry, I didn’t check the runtime use. That is a bit trickier. I’m not sure how you are running your reports in runtime but I managed to get it to work after reading these two documents:

    Replacing the default BIRT XLS emitter
    NativeExcelPluginSampleReportDemo.doc

    The information in those wasn’t directly applicable but what I did was this:

    • Close MyEclipse then go to your project folder in your workspace, in Windows Explorer (or equivalent, if you’re not running Windows), then open the WEB-INF\lib folder. Copy the org.eclipse.birt.runtime jar file as a backup, somewhere and then open the original in Winzip, or some other archive program that allows you to modify the archive. Now delete the org.eclipse.birt.report.engine.emitter.config.excel and org.eclipse.birt.report.engine.emitter.excel packages. Close the archive program.
    • From the native Excel emitter jar file, extract the jar files within the lib folder into your project’s WEB-INF\lib folder. Also, add the whole native Excel emitter jar file to your project’s class path.
    • Create a new sample report access web page to create a JSP which displays a link to the report in XLS format. Select the report in the Package Explorer (the rptdesign file) and right click; select MyEclipse->Generate Sample Report Access Webpage; in the wizard, leave the default Generate option (to generate an HMTL link) and select the XLS format and click Finish.
    • Edit this new sample web page and add a parameter to the link for the report. It should look something like:
      <a href="<%= path + "/run?__report=reports/new_report.rptdesign&__emitterid=org.eclipse.birt.report.engine.emitter.nativexls&__format=XLS" %>">View Report (reports/new_report.rptdesign)</a>

      Note the extra __emitterid parameter added.

    • Relaunch MyEclipse, refresh the report project and launch it as a web application. Clicking on the report link should now provide a native XLS file.

    If you run the report in other ways, check those links I gave above to help work out what you may need in your particular situation.

    Please let us know if this helps.

    #343125 Reply

    bocedv
    Member

    Thank you for your reply. I will try as you said.

    #343169 Reply

    support-tony
    Keymaster

    bocdev,

    OK. Please let us know if it works for you, as that may help others.

    #343221 Reply

    bocedv
    Member

    Thanks.

    But I got an error.

    
    org.eclipse.birt.report.service.api.ReportServiceException: EmitterID org.eclipse.birt.report.engine.emitter.nativexls for render option is invalid.
    
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
     faultSubcode: 
     faultString: org.eclipse.birt.report.service.api.ReportServiceException: EmitterID org.eclipse.birt.report.engine.emitter.nativexls for render option is invalid.
     faultActor: 
     faultNode: 
     faultDetail: 
        {http://xml.apache.org/axis/}stackTrace:org.eclipse.birt.report.service.api.ReportServiceException: EmitterID org.eclipse.birt.report.engine.emitter.nativexls for render option is invalid.
        at ........
    

    I think it’s a buildpath problem, I do exactly what you wrote me. I’m weired now. How could this error occur.

    BTW, I use a jsp frame to link the report with emitterId in tag <birt:viewer>. But I’ven also tried with an URL request, I got the same error.

    #343223 Reply

    support-tony
    Keymaster

    bocedv,

    Just to be clear:

    • Did you ensure that the Birt runtime jar file, that is deployed with your project,has no excel emitter classes?
    • Did you extract the jar files from the lib folder of the native Excel emitter jar file, and place them in your WEB-INF/lib folder?
    • Did you also add the native Excel emitter jar file to your project’s build path?

    It might help to remove the project deployment first, before re-deploying it.

    If you’ve done all of these things then can you send us your project for us to try to replicate your issue? If the archived project is greater than 5 MB, please send me a private message (PM) first so I can give you an email address to send it to. If you can’t send your source code, you could strip out the source folder and send the rest of the project.

    #343224 Reply

    bocedv
    Member

    Hi Tony,

    I redeployed my project and then it works, I use jrebel, maybe because of jrebel I cannot get through just now. but I think it’s only the beginning, I must firstly get the report displayed in webbrowser (HTML/JSP), and then make the webviewer being capable of exporting the xls using the native xls emitter. I must modify the js files in report-viewer folder. I will come back to you, when I have questions.

    Thanks for your help again. Have a nice day.

    #343225 Reply

    support-tony
    Keymaster

    bocedv,

    I’m glad you got it working, thanks for letting us know.

    We’ll certainly try to help if you have more problems with this.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: BIRT native XLS Emitter in Myeclipse?

You must be logged in to post in the forum log in