Home Analytics Designing reports
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Change/Rotate Text Direction in Birt Grid/Table/Crosstab using Labels or Text Item

prince_iamprince_iam BIRT & Oracle Developer

Dear Folks,
I am just wandering around the internet to look for a very simple solution to change/rotate the text direction in Birt Grid and achieve the result illustrated below, though it seems very simple yet I couldn't find any workable solution to achieve this result.

Comments

  • You can rotate text by using a plugin in BIRT.
    Make sure BIRT is completely closed out.
    Then download the following 3 jar files and place them in your BIRT "/plugins/" folder:

    https://github.com/innoventsolutions/innoventsolutions.github.io/tree/master/2.5.2/plugins

    Then start BIRT back up (might take a bit longer to load than normal).
    Once loaded, in your Palette tab you should now see "RotatedText" and "DotBar" in your Report Items category.
    The Rotated Text element works similar to a "Data" element but with rotation abilities.

    For reference, here is how to call the element using JavaScript:

    //http://code.google.com/a/eclipselabs.org/p/birt-controls-lib/
    //https://github.com/innoventsolutions/innoventsolutions.github.io/tree/master/2.5.2/plugins rotatedText=elementFactory.newExtendedItem("ex1", "RotatedText"); rotatedText.setProperty("rotationAngle", "90"); rotatedText.setProperty("text", "\"BIRT\""); rotatedText.setProperty("wrapPoint", "0in"); rotatedText.setProperty("linkURL", "\"www.Actuate.com\""); rotatedText.setProperty("fontFamily", "sans-serif"); rotatedText.setProperty("fontSize", "30pt"); rotatedText.setProperty("fontStyle", "italic"); rotatedText.setProperty("fontWeight", "bold"); rotatedText.setProperty("color", "#FF0000"); reportContext.getReportRunnable().designHandle.getBody().add(rotatedText);
    Matthew L.
    Developer
    OpenText
  • prince_iamprince_iam BIRT & Oracle Developer

    Thanks, Matthew,

    It really worked on my local installation I am just afraid that whether will it work on Birt Report Engine (Birt Viewer) on my web server or not?

  • prince_iamprince_iam BIRT & Oracle Developer

    Dear Matthew,

    After placing the said 3 jar files in eclipse plugin directory, My eclipse worked very well on day one. Now, When I am trying to open the eclipse today resulted in an error despite trying so many times. I am receiving the following error. I have attached the generated log file.

  • Not sure why that happened, as I've used those plugins in about 30 different BIRT versions (Pro and OpenSource) without issues.
    You can try running BIRT using the "-clean" method to see if that fixes the issue: https://stackoverflow.com/a/2030092
    Another idea is to startup into another workspace or remove the 3 jar files to see if BIRT will start.

    As for the web-server deployment, you would place the 3 jar files in the same resource folder as other BIRT web-resource jar files to allow its functionality to work in that deployment.
    For example, on iHub Server (v16.0.0), they would be deployed to: C:\OpenText\InformationHub\modules\BIRTiHub\iHub\web\birtservice\WEB-INF\platform\plugins\

    Matthew L.
    Developer
    OpenText
  • prince_iamprince_iam BIRT & Oracle Developer

    Dear Matthew,

    I was able to run the eclipse, but now I am facing the problem when I deployed my built-in report using the suggested plugin on the web server, where birt viewer is installed on tomcat apache server I am getting the following error. Could you please help to fix this issue where should I paste the required JAR files to birt viewer plugin installed on the web server.

  • Sorry, the error message didn't come across.
    Could you post the error message again?

    Matthew L.
    Developer
    OpenText
  • prince_iamprince_iam BIRT & Oracle Developer

    Sorry, I forgot to post the error screenshot, following error has been displayed.

    org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report.
    at org.eclipse.birt.report.service.ReportEngineService.throwDummyException(ReportEngineService.java:1115)
    at org.eclipse.birt.report.service.ReportEngineService.renderReport(ReportEngineService.java:1561)
    at org.eclipse.birt.report.service.BirtViewerReportService.getPage(BirtViewerReportService.java:204)
    at org.eclipse.birt.report.service.actionhandler.BirtChangeParameterActionHandler.doRenderPage(BirtChangeParameterActionHandler.java:82)
    at org.eclipse.birt.report.service.actionhandler.AbstractChangeParameterActionHandler.__execute(AbstractChangeParameterActionHandler.java:102)
    at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
    at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
    at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
    at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleChangeParameter(BirtDocumentProcessor.java:100)
    at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)

Sign In or Register to comment.