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: Passing Parameters to BIRT from JSF pages, Summing Values from Two Different Elements, and more...
Posted by
mwilliams
, 09 January 2012 - 07:26 AM
The unanswered topic from last week is about passing parameters from JSF pages with Seam. The poster is having issues passing parameters to BIRT from their JSF pages. They're able to send static values, but not dynamic values. If anyone has encountered this issue or have a suggestion or solution, please post it in the thread!
The next topic for this week is summing two values from separate grids and displaying the sum in the report. One way to sum values from two different elements in a report is to use persistent global variables to store the values and then recall them and add them together where you want to display the sum. There are probably several ways that this can be done, but this is one of them. In this question, the poster also wanted to display the value before the elements the actual data is in. To do this, you can store the values in PGVs in your onCreate script and recall them in your onRender script to display the sum. You'll have to run the run and render tasks separately for this to work.
The last topic for this week is how to hide the details of a report based on a parameter. The poster had a grouped table with details. They wanted to be able to hide the detail section based on a user parameter. To do this, all you need to do is add visibility script to the detail row. A simple script is included in the thread that shows how to do so. The visibility settings can be found in the property editor of the element you're wanting to hide.
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: Web Services Parameter Issue, Hiding Columns Based on a Parameter, and more...
Posted by
mwilliams
, 07 November 2011 - 07:30 AM
For this week's unanswered post, I'll cover one about problems with parameters in a web service data source. The poster has a web service that they can get to work correctly when testing in soapUI, but when they create a dataSource in BIRT, they are not getting their SOAP parameters for the WebMethod to show up in the dataSource wizard. If anyone has experienced a similar issue and knows how to get around it or knows what might be going wrong, feel free to provide a suggestion or solution to help this community member out! Thanks!
The next topic I'll discuss for this week is about dynamically hiding columns based on a parameter. This is a common question in the forums. How can you let your user choose which columns they want to see with a parameter. In the referenced thread, there is a link to a devShare article that should help with this. Here is a link to the example:
Dynamic Columns Based on Parameter
The last topic for this week is about formatting dates in a dynamic text box. The question was initially just how to format a date within a dynamic text box. A link to another forum thread with an answer to the same question was provided. Then, it was added that the formatting in the text box must be dynamic for US or European date format. A solution is provided that shows some rough code that shows how to use a parameter to decide which format to use. This code can be seen in the example. If anyone follows the rough code in this example and creates working code, please feel free to post the working code to the example.
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: Getting Today's String Day in a Chart's Title, Passing Data Between Queries in a Report, and more...
Posted by
mwilliams
, 26 September 2011 - 06:45 AM
The first topic for this week is how to get today's string day (Monday, Tuesday, etc.) into your chart title. The poster wanted to grab the day of week from today's date and create their chart title with this value. This can be done by creating a date format that only shows the string day of week and then using the value in your chart script to set the title of the chart. An example is shown in the forum thread that shows how to do this. If you're not interested in setting the day of week in the title, but just want to dynamically set your chart title, this example will also be helpful.
The second topic for this week is about passing data between queries in a report. Sometimes you need to use data from one dataSet to get the appropriate data from another for your report. One way to do this is to create a joint dataSet to join all of the data, but if you have large amounts of data, this can cause processing to be very slow. The ideal way to do this is to take the data from the first dataSet and pass it as a parameter in the second query. There are at least a couple ways to do this in BIRT. One is to use a dataSet parameter in the second dataSet, embed a table for this dataSet into a table for the first dataSet, and use the dataSet parameter binding feature to pass the value from the outer table to the inner table's query to grab only the appropriate data. Another way, that is described in the forum thread is to embed the second dataSet's table into the first dataSet's table and in the onCreate script of the outer table, you'd set a global variable to have the value you want to limit your inner query by, and then in the beforeOpen of the inner dataSet, you can use this variable to set your where clause in your queryText.
The last topic for this week is how to create a rolling sum in your dataSet. There are standard aggregations to create a sum for an entire column or to keep the running sum, but a rolling sum for a specified period is not a standard aggregation. The poster wanted to be able to keep a sum of their data fro the last 12 months. When they reached the 13th month, they wanted to disclude the first month from the total. To do this, you can create a computed column in your dataSet that uses an array to keep track of the previous values so you can create your rolling sum. An example is included in the forum 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.
Recent Entries
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...
Only Highlight Bars of a Certain Series in a Chart, Reordering a Table's Columns, and more...
My Blog Links
Recent Comments
- 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...
- 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
- 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
- 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


