Thursday, January 27, 2011
Cascading Date Range Parameters
Monday, December 20, 2010
Creating Birt Sub-Reports Using Dataset Parameter Binding
Saturday, August 7, 2010
Interactive Birt Chart Output Formats - Which one do you use?
I'll get some pictures up when I get a chance, plus some examples of the tooltips and hyperlinks code.
Tuesday, June 15, 2010
Birt Reports on Aim Desktop - Trailing 13 months
I like to show the trailing 13 complete months in chart reports that auto-load on the work desk so that the user can see the annual trend and the same month from the year prior. I riffed of the last second of the month sql discussed in my "nice looking date parameters" article to come up with the where clause for the chart dataset.
First, read up on the dateadd function here. http://www.w3schools.com/sql/func_dateadd.asp
Maybe there's a cleaner way to do this, but it works.
Here's a simple application:
select ph_workorder, ph_date_created
from phase
where ph_date_created > dateadd (m, -13, dateadd
(ss,-1, convert(datetime, convert(varchar,(dateadd (mm,1,getdate() - day (getdate())+2)-1), 101))) )
order by ph_date_created
Wednesday, June 9, 2010
Nice Looking Date Parameters in Birt
select distinct convert(datetime, convert(varchar,dateadd(day,-datepart(day,ae_p_pst_e.status_date)+1,ae_p_pst_e.status_date), 101)) as starting_date,
right(convert(varchar, status_date, 106), 8) as display_name
from ae_p_pst_e
order by date desc
right(convert(varchar, status_date, 106), 8) as display_name
from ae_p_pst_e
Friday, June 4, 2010
Report Item Visibility based on parameter
Multiple, Multi-Select Parameters

var endOfQuery = " WHERE workorder.proposal IN ('" + params["proposal"].replace(/,/g,"','") + "')";
this.queryText += endOfQuery;
Another way to view this would be:
var endOfQuery = " WHERE tablename.columnname IN ('" + params["parametername"].replace(/,/g,"','") + "')";this.queryText += endOfQuery;
This will append the where clause onto the end of the query. It may be possible to modify this script to accomodate additional where clauses. It's been a while since I used this method and I may have tried and failed or maybe I never tried it.
My current preferred method is to write the query, but to include the where clause. A script is still required, but write string variables in the where clause. The script replaces these strings with selected parameter values.
The where clause may be something like this:
where tablename1.columname1 in ('xxx') and tablename2.columname2 in ('yyy')
Here's the script.
this.queryText = this.queryText.replace("xxx",params["parameter1"].value.join("','" ))
this.queryText = this.queryText.replace("yyy",params["parameter2"].value.join("','" ))










