Change Bar Color at Threshold, Creating a Chart in Script, and more...
Posted by
mwilliams
, 20 August 2012 - 04:45 PM
The first post, for this week, is about coloring a bar based on a threshold value. The poster wanted to be able to color the portion of the bar that passed a threshold value. Say, there was a chart threshold of 50 and there were three bars valued at 75, 55, and 45. The first two bars would be one color up to 50, then another color above. The last bar would be entirely the first color. What is done in this case is to use two series. One that goes all the way up to the threshold, if the value is that high, and the other to continue above the threshold if needed. This allows for two colors at the threshold line. An example report can be found in the forum thread.
The next post, for this week, is about creating a chart in script. The poster wanted to know if it was possible to create a chart, on the fly, in script. An example can be found in the forum that shows how to create a chart, in script, using an existing dataSet.
Here are a few more :
- Alternating row colors for detail row?
- Create pie chart programmatically ?
- Compare date ranges
- Reading and setting the report-parameters in Birt Report Viewer jsp
- Setting Image on Runtime
Here are a few unanswered posts, from last week:
If you have a suggestion or solution for any of these, please post in the thread!
Thanks for reading this weeks blog! Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.
Last week in the Forums: Crosstab Scripting, Showing Different Masterpage Content on Different Pages, and more...
Posted by
mwilliams
, 18 June 2012 - 07:05 AM
The unanswered post from last week is about scripting in crosstabs. The poster has some script to set the format, depending on the value of a field in the crosstab. That is working fine for them. They also have some script where they're checking the value of another field and want to set the colors for the cell. This is not working for them. For more specifics, check out the thread. If you have suggestions or solutions, please post them.
The next topic for this week is about showing different content on the masterpage for different pages of the report. The poster wanted a grid on the first page and a different grid on the second page for printing customer invoices. An example report is provided in the thread that shows a way to achieve this. For it to work, the report must be ran using separate run and render tasks. See the thread for more information on this.
The last topic for this week is about setting the vertical position of a table footer. The poster wanted to know if they could determine the vertical position of the footer so they could push it to the bottom of the page. Unfortunately, I don't know that there's a way to do this, currently. The masterpage footer can be used with page or report variables to put page/report information. Another couple ways would be to add extra footer rows to your table and show/hide them, depending on your count of rows on the page or to use a HTML text box to force the footer down, also depending on your count of rows. Here are a couple devShare posts, showing the last two:
http://www.birt-exch...ting-row-color/
http://www.birt-exch...le-to-fit-page/
Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.
Last week in the Forums: Accessing Session Variables in BIRT, Adding Crosstab Page Break in Script, and more...
Posted by
mwilliams
, 12 March 2012 - 07:01 AM
The unanswered question for this week is about accessing a session variable from external application in BIRT report. The poster wants to be able to call their BIRT report in a JSP embedded viewer and pass a session variable into BIRT to be used in their where clause. If anyone has an example of this or a description of what needs to be done, please post in the thread.
The next topic I'll cover from last week is about setting a page break in a crosstab using script. The poster wanted to be able to dynamically add a page break in script, based on a parameter selected by the user. Usually you can set the page break interval on a group in the onPrepare method of the crosstab. However, in this case, the dimensions are being edited dynamically in the beforeFactory, so this simple solution didn't work. An example report showing a way to do this is included in the thread.
The last post I'll cover this week is about displaying "no data" when your csv source file is blank. If you're using a csv file as your source and your csv file will always have the header info, this won't happen to you. However, if your csv file is completely empty when there is no data, then you'll get errors if a report element uses the dataSet that tries to access this file. The solution offered in the thread to get around this involves reading in the file in script prior to running the dataSet, so you can drop any elements that might use this data from the report. This avoids any errors. An example can be found in the thread.
Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.
Last week in the Forums: Dynamically Build Chart using CEAPI, Determining if a Parameter is Multi-Select or not, and more...
Posted by
mwilliams
, 20 February 2012 - 07:01 AM
The unanswered post from last week is about creating charts in java. The poster wants to be able to create pie and bar charts in code, instead of in the designer. If anyone has any examples they've done or links on where they can find examples, please post in the thread.
The next topic for this week is about determining if a parameter is multi-select or not. The poster wanted to be able to step through their parameters in their report and determine if the parameter was a multi-select or not, so they'd know whether they needed to step through the parameter object or not. A solution is provided that grabs all the parameters, determines if they're multi-select or not, then steps through the selected value or values, and then displays them in the report.
The last topic for this week is about hiding the legend from a secondary axis. The poster had two series in their chart that had the same groupings, so they wanted to be able to remove the second series groups from the legend. An example report is available in the thread that shows one way that this can be achieved using chart scripting.
Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.
Last week in the Forums: Calling a Function in BIRT Script Area from HTML Button, Localization in Chart Not Working, and more...
Posted by
mwilliams
, 23 January 2012 - 08:20 AM
Last week's unanswered post was how to use a HTML button to call a function from the report script. The poster wanted to be able to use script in a HTML button to call a function that is declared in their report's initialize script. They know they can create a function within the HTML to call, but wanted to know if they could do this with a function within the BIRT script methods. If anyone has done this or has a suggestion. Please post in the thread!
The next topic I'll cover from last week is datetime localization not working in charts. The poster noticed an issue in 2.5.1 that their localization didn't affect their axis labels in their chart. In a newer version, 2.6.2, it did work. The issue ended up being that setting a format code in the chart wizard messed up the localization. The workaround solution was to apply the formatting in script. The necessary script is shown in the thread.
The last topic I'll cover is about where to find the new features for the latest release. This question gets asked often enough that I thought it would be a good one to cover. To find the newest features, the best place to look is at the project plan pages for BIRT on eclipse.org. You should be able to find all versions and what new features went in to each. You can also find the bugs that were addressed with each version.
Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.
Recent Entries
Plug In 2 BIRT Contest - Spring 2013 Ends Soon
Creating Derived Cube Measures and More with BIRT and ActuateOne
Drop Elements Depending on Output Format
Solving a TOC Bookmark Issue by Using Multiple Fields in a Single Group Expression
Visualizing the Impact of Database Changes with BIRT and ActuateOne
Actuate's 11SP4 Release Provides Many Powerful New Capabilities, Including HTML5 Charts and more!
Getting a Marker in the Middle of a Gantt Chart Bar, Multi-Level HTML List Numbering, and more...
Switch to a Default Table if no Values Returned in Query, Parameterize the From Portion of an SQL Query, and more...
Adding Text to an Image, Using Table Data for a Crosstab's Data, and more...
My Blog Links
Recent Comments
- mwilliams on Drop Elements Depending on Output Format
- donino on Drop Elements Depending on Output Format
- mwilliams on Creating a BIRT report as a calendar view
- lnallamalli on Creating a BIRT report as a calendar view
- For Birt on Last Week in the Forums: BIRT and R Statistical Language, Specified Sort Order for a Table, and more...
- Bhanwar on Last Week in the Forums: Filtering Blank Spaces from Distinct Count Aggregation, Adding a Line at 0 in a Chart with Negative Values, and more...
- Srividya Sharma on Sorting a Crosstab by a Field Not Displayed in the Crosstab
- mwilliams on Last Week in the Forums: Using the Concatenate Aggregate, Hiding a Column When There is No Data, and more...
- java032 on Last Week in the Forums: Using the Concatenate Aggregate, Hiding a Column When There is No Data, and more...
- java032 on Last Week in the Forums: Using the Concatenate Aggregate, Hiding a Column When There is No Data, and more...
0 user(s) viewing
0 member(s)
0 anonymous member(s)
Categories
- .rptdocument
- 11 SP4
- Actuate
- ActuateJavaComponent
- ActuateOne
- aggregating data
- aggregation
- alignment issues
- Alternating Highlight
- archived BIRT versions
- area chart
- axis label
- barcodes
- batch file
- BDPro
- BIRT
- BIRT Exchange
- BIRT functions
- BIRT Studio
- BIRT-Exchange
- bookmarks
- border
- border color
- bursting
- calendar
- cascading parameter
- CEAPI
- cell border
- chart
- charting
- charts
- client side script
- color
- color codes
- command line
- computed column
- connection profile
- contest
- crosstab
- CSS
- CSV
- CSV export
- custom group
- custom sort
- Data Analyzer
- data cube
- Data Object
- data point label spacing
- data row security
- data set filter
- data set parameters
- dataset parameters
- Date Format
- deapi
- deploy
- devShare
- display name
- drop
- drop series
- dynamic chart
- dynamic chart labels
- dynamic chart marker
- dynamic chart scale
- dynamic chart title
- dynamic column sort
- Dynamic Column Visibility
- dynamic data set
- dynamic grid content
- dynamic grouping
- dynamic labels
- dynamic min/max
- dynamic scale
- Dynamic Text
- Dynamic Width
- Eclipse
- elapsed time format
- embedded grid
- empty csv error
- Event Handlers
- exception handling
- export data
- expression builder
- filter
- Firefox
- flash map
- Forum
- Forums
- fragmented schema
- gantt
- gantt chart
- global function
- GMT date
- grids
- group numbering
- grouping
- hide label
- hide measure detail
- hide series
- Hierarchy
- hierarchy report
- highlight
- highlight negative numbers
- HTML
- HTML listbox
- html lists
- HTML select form
- HTML Table
- HTML5
- https
- hyperlink
- image
- Impact Analysis
- Import Elements
- Ineractive Viewer
- Information Objects
- Interactive Viewer
- invalid dates
- iServer
- JAX-WS
- joint data set
- jquery
- jsapi
- JSF
- JSP
- legend
- legend color
- Library
- line height
- locale
- localization
- marker range color
- master page
- masterpage
- Maximo
- merge data
- multi-line text
- multi-select parameter
- multi-select parameters
- multi-value parameter
- multiple series
- NetWeaver
- newspaper
- newspaper layout
- optional y-series grouping
- osgi
- overlaying elements
- page break
- parameter
- parameters
- parameters in query
- PDF Complete
- Perl
- Pie Chart
- plug-in
- postgresql encoding issue
- progress bar
- property file
- R Statistical Language
- refresh report
- relative path
- reorder table
- report engine
- report viewer title
- reporting
- Reports
- Rolling Sum
- rotated text
- rptdesign
- rptlibrary
- runtime
- scatter plot
- script
- scripted dataset
- scroll bars
- Seam
- secure connection
- series color
- series name
- session variable
- sort
- Sort Order
- SP4
- special characters
- SQL
- SQL injection
- stacked bar
- stored procedure
- Styles
- Sub Report
- summing values from two different elements
- SVG
- tabbed report
- table
- table footer
- Themes
- TOC
- TOC with page numbers
- tomcat
- Tooltip
- transient report cache
- truncated text
- user parameters
- Vaadin
- value-of format
- version features
- Viewer
- viewer title
- visibility
- Web Service
- web viewer
- Webshpere
- Word
- xls
- XML data source


