Showing posts with label reporting. Show all posts
Showing posts with label reporting. Show all posts

Tuesday, June 7, 2011

BIRT! Column! Width! Must! Be! Set!

Alright, just to show you how ugly it may look in Excel (I have the 2010 version installed) if a BIRT report does not have the width property set for the column:
Ugly ugly ugly ugly (actually, the first two are alright, they DO have the width set to 40 mm).

It's but a simple change, but the difference is subtle:


Oh, by the way, I tried out the Tribix XLS emitter for BIRT. It actually worked, but I decided to remove it because it created bad looking XLS files.

Monday, January 17, 2011

Dynamically changing datetime format in BIRT

It's really easy to change the format of a datetime data value. One may change the onPrepare function of the data item, and then

switch (params["d1"].value) {
 case "YE": this.getStyle().dateTimeFormat = "YYYY"; break;
 case "MO": this.getStyle().dateTimeFormat = "YYYY MMMM"; break;
 //case "WK": row["dtWeek"]; break;
 case "DY": this.getStyle().dateTimeFormat = "YYYY MMMM DD"; break;
 case "HO": this.getStyle().dateTimeFormat = "YYYY MMMM DD hh:00:00"; break;
 case "HH": this.getStyle().dateTimeFormat = "YYYY MMMM DD hh:mm:00"; break;
 //default: row["dtHalfHour"]; break;
}
So based on the value of the parameter named d1, the report will format the datetime value as year, year and month etc etc.

Wednesday, March 10, 2010