Switch to a Default Table if no Values Returned in Query, Parameterize the From Portion of an SQL Query, and more...
Posted by
mwilliams
, 17 September 2012 - 06:45 PM
The first post, for this week, is about showing a default result set if the main one is empty. The poster wanted to be able to show a default table if the parameter entered by the user returned no results. An example is posted in the thread that shows how to set the visibility of the two tables based on a variable that is set in the onFetch of the parameterized dataSet.
The next post, for this week, is about how to parameterize the from portion of an SQL query. The poster wanted to be able to use a parameter value to choose which table to use in the from portion of an SQL query. The solution provided was to use the report parameter in the beforeOpen of the dataSet, like:
this.queryText = "select * from " + params["myparameter"];
Here are a few more :
- Why so many date-time datapoints on chart?
- how to get a chart svg output as an object
- Dynamic Report Based on User Selection
- Cant Startup the OSGI Framework in BIRT
- Serial number for newspaper columns
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.
Only Highlight Bars of a Certain Series in a Chart, Reordering a Table's Columns, and more...
Posted by
mwilliams
, 03 September 2012 - 05:16 PM
The first post, for this week, is about highlighting bars in a single series of a chart, only. The poster was using script in the beforeDrawDataPoint to color their data point. The problem is that they were highlighting all series, not just the one they wanted. The solution to this is to check the series with dph.getSeriesDisplayValue() before setting the color.
The next post, for this week, is about reordering columns in a table. The poster has a table already in their design, but they'd like to reorder the columns based on a condition. An example is provided in the forum thread with beforeFactory code that switches the order of columns in a table based on a parameter.
Here are a few more :
- Alternating row background color in Crosstab
- Using numeric values from a data set in a global Variable
- How to Sort a chart on Dates
- Integrating Maximo reports into Birt Viewer
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.
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: JAX-WS Data Source Issue, Issue with Scatter Plot and LOTS of Data, and more...
Posted by
mwilliams
, 16 July 2012 - 06:43 AM
The unanswered post, from last week, that I'll cover, is about using a JAX-WS (axis 2) data source, with BIRT. The poster is currently running into issues with getting the schema from the response, while using Geronimo. If anyone has set something like this up or has any web services wisdom to pass along, please post in the thread.
The next topic I'll discuss is about using lots of data in a scatter plot. The poster was having troubles plotting the data they had. Using a line chart, they ended up with weird straight lines running across the chart where they shouldn't be. With this happening, they turned to a scatter plot, but the smallest size of marker was too big to show the intricate details of the plot, as there was lots and lots of data and multiple series close together. A solution is provided that shows the output of using a 1 pixel image as the marker with the size set at 0. With this setting, the marker truly is a 1 pixel dot, which allows the plot to render clearly, even with lots of data. The poster ended up using a different route, that required more work, to get around the issue. Their solution is detailed step by step, in the thread.
The last topic, for this week, is about using row data to auto-fill values in a standard text. The poster had several rows of data and wanted to use the values from their dataSet rows to personalize a text. One solution to this is detailed in the thread. It is to use a text box in a table bound to the dataSet and use the <value-of> tag inside the HTML text box to be able to call the current row's data to complete the text. Within the table, this will dynamically fill in the appropriate information into the text, for each row.
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: Integrating BIRT with Vaadin, Strings in Crosstabs, and more...
Posted by
mwilliams
, 04 June 2012 - 07:05 AM
The unanswered post for this week is about integrating BIRT reports in Vaadin portlet. The poster is wanting to be able to integrate birt reports into their Vaadin portlet. They are new to Vaadin and they can't figure it out. If anyone has done this or has suggestions, please post in the thread!
The next topic, from last week, that I'll cover, is about having a string field as a crosstab measure. The default aggregation performed on a crosstab element is SUM. If you've tried using a string and didn't know where to change this or have ever tried to sum with a string field, before, you know you end up with an error. When you want to use a string, the other thing you need to do is to change the aggregation to FIRST. To do this, double click on the measure in the crosstab wizard and change SUM to FIRST in the drop down. There is an example in the thread that shows this.
The last question, for this week, is about changing the colors of the series in a chart and setting the legend color to match. This is a very common question. I may have covered this in a past edition of LWITF, but it's worth covering again. In the forum thread, you'll see script that can be added to the chart script to change both the series color and the legend block color, to match, based on the series.
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: PostgreSQL Function Issue, Exporting Charts to XLS, and more...
Posted by
mwilliams
, 28 May 2012 - 06:02 AM
The unanswered post, for this past week, is about an encoding issue while running a postgresql function in BIRT. When they run the function in pSQL or pgAdmin, they don't have an issue, just when running the function from BIRT. They get the following error:
22021: invalid byte sequence for encoding "UTF8": 0xf6206f72
If anyone has seen this before or has a suggestion for them to try, please post in the thread!
The next issue I'll discuss is about exporting charts to XLS. The standard BIRT XLS emitter doesn't export images. Since charts are images in the BIRT output, the XLS emitter skips over them. There are several third party emitters created to export XLS outputs. Several of the options available can be found linked in this forum thread!
The last topic I'll discuss is about displaying the series name on top of a bar when optional grouping is used. When you use optional y-series grouping, in your chart, the series identifier you have available to you in the data point functions of the chart script will show you the grouped series, not the original series name. The poster wanted to be able to place the original series name at the top of the bar. An example is provided, in the thread, that shows how you can access the original series name and place it over the appropriate stacked bar.
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: Word Output Issue, Creating Separate Rows Using a Scripted DataSet for a SSV Field, and more...
Posted by
mwilliams
, 21 May 2012 - 06:01 AM
The unanswered post I'll cover, this week, is about truncated text in Word output when dynamically hiding columns. The poster is having issues when they hide columns in their report and export to Word. The output is fine, if they don't hide the columns, but if they do there is truncated text. If anyone has experienced this issue or has a suggestion for the poster to try, please post in the forum thread!
The next topic I'll cover, this week, is about creating multiple rows out of a dataSet that has a SSV field for a column. The poster had a dataSet that had a SSV field, i.e. 234;227;24;86, that they wanted to turn into multiple rows. In the example field above, it'd be 4 rows, with all other data fields repeating, for each row. A solution is attached in the thread that uses a scripted dataSet to achieve this result. The data from the first dataSet is stored into arrays, then the scripted dataSet separates the original data into separate rows.
The last topic I'll cover, for this week, is about overlaying charts across a grid. The poster wanted to have a couple grid columns with pie charts "laying across them", so they laid over the grid border lines. A solution is provided that uses grids, cell borders, and merged grid cells to make it appear that the chart is overlaying the grid. The example can be found 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.
Last week in the Forums: Setting the Marker Range Border Color in Script, Aggregating Data, and more...
Posted by
mwilliams
, 30 April 2012 - 05:55 PM
The unanswered post, from last week, that we'll cover is about setting the color of the marker range border, in script. The poster is setting a marker in their gantt chart, in script, but when they set the color, the border line doesn't change. They're wanting to change the border color and width. If anyone has code that will allow them to do this, please post in the thread.
The next post I'll cover this week is about creating start and end date fields for a given ID, from a single date column. The poster had data like:
ID,absent,date
11,oui,12/02/2012
11,oui,13/02/2012
11,oui,14/02/2012
11,oui,15/02/2012
22,oui,12,02/2012
22,oui,13/02/2012
22,oui,14/02/2012
and wanted to get:
ID,absent,startDate,endDate
11,oui,12/02/2012,15/02/2012
22,oui,12/02/2012,14/02/2012
A query solution is offered in the thread that helped them achieve this. It can be seen in the thread.
The last topic I'll cover today, is about finding the difference between two rows. A link to a past forum post was posted in the thread that has a script solution to this type of issue. Take a look.
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: Importing Elements from Library Using Code, Calculating Days Between Two Dates, and more...
Posted by
mwilliams
, 23 April 2012 - 05:49 PM
The unanswered post for this week is about importing an element from a library, using code. They have some code that they're trying to use. They don't get an exception, but the report comes up blank. If anyone has experience with doing this. Please comment in the thread!
The next post I'll cover for this week is about calculating the number of datys between two dates. If you have two dates and you want to compute the number of days between them, you can simply use the BIRT DateTimeSpan function, DateTimeSpan.days(startDate, endDate), to do this. Just use this in an expression builder in a computed column or any other expression builder.
The last topic for this week is about getting multiple series on the same axis. This question has come up a few times, lately, so I figured I'd cover it. When you're creating a chart where you'll have multiple series, you don't need to select the option to have multiple axes, even if you're using different chart series types. To add a new series, wait til the select data tab and select the drop down next to the y-axis field and choose to add a new series. If you want to change the type, go to the series section in the format chart tab and choose a new type in the drop down for the series you want to change.
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: "Processing" Bar for PDF Reports, Stacked Bar Chart "Total" Label, and more...
Posted by
mwilliams
, 09 April 2012 - 06:49 AM
The unanswered post, from last week, that I'll discuss is about adding a processing bar when generating a PDF report. The poster is wanting to know if there's a way in which they can add a "processing, please wait" bar to let the user know the PDF is still processing. If anyone has experience with this issue or has a suggestion to something that could work, please post in the forum thread!
The next post I'll cover, this week, is about putting the total on top of a stacked bar chart. The poster was wanting to find a way to show the total bar value in a label on the top of a stacked bar, rather than just the individual stacked bar values. An example report design is posted in the thread that shows how script can be used to achieve this, by hiding the label for the bottom series and changing the value of the top series's label to be the sum of the bar.
The last topic we'll cover, from last week, is about truncating a long URL, but keeping the hyperlink. The poster was wanting to know how they could truncate a long URL in their table, for clean design purposes, but still keep the value of the entire URL for the hyperlink. One way to do this is given in the forum thread. It is to use the following script:
var myaction = this.createAction(); myaction.setHyperlink(this.getValue(),"_blank"); this.action = myaction; this.setDisplayValue(this.getValue().substr(0,20));
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


