Posts

Showing posts from August, 2021

Sorting Chart Legends

Image
 Using Birt 4.2 I struggled with finding a solution to sorting the legend of a stacked bar chart in Birt.  After much googling it seems I saw there was a lot of comments on custom/script answers, which I am sure is need in some circumstances. I wanted to share how I finally figured out how to do it. There is the chart with the legend sorted top to bottom.  Originally by default it is sorted in the opposite direction, bottom to top. Under the  Select Data  tab where the  Optional Y Series Grouping  is used to create the stacked bar, click on the icon to the right (see image) which will go to the sorting option. Sort the grouping in a  Descending Mode  or whichever mode works for your chart legend. Then choose the element that is being displayed to  Sort On . I hope this helps some and somehow gets out.

Global Variables

Image
 I had a report where I wanted to pass the values from one table to another so that I could do a calculation.  What I did was create a global variable.  Following is the process I took to do so: Initialize your global variables On the report level, using Scripting select the Initialize method Use the  reportContext.setPersistentGlobalVariable("variable_name", "variable_value")  function for initializing the variable Populating your variable with the value in the report Select the element in the report that will have the value for the variable and then go into the Scripting tab:

Display Parameter Text

   Parameters usually provide the option to put two items in a drop down list, the value and the description of the value.  If you want to grab either of the two items to put in a report, say the header, the reference to either of the two items is as follows: Displaying the parameter list item value:    params[" your_parameter_name "].value Displaying the parameter list item description:    params[" your_parameter_name "].displayText

Installing Birt Reports

Each time I need to install Birt Reports designer on a new machine I seem to forget the various elements needed. First off - you do not need to install the Eclipse program.  All you need is the version of the Birt reports designer that is compatible with whatever software you are associating the reports with. In my case I needed version 4.8 (as of July 2021).  This is because the program being used was only approved up to version 4.8. The following link was helpful in dealing with when you get the java exit code 13 when trying to start Birt https://appuals.com/fix-java-was-started-but-returned-exit-code13-eclipse/ For installing Birt version 4.8 you need the following: The latest version of Birt 4.8  birt-rcp-report-designer.   https://download.eclipse.org/birt/downloads/drops/     Check the date on the directory link.  At this time I selected  I-R1-4.8.0-201905212138 .  Because I had previously selected an earlier version it would not r...