Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem with getOutputFormat
AlanC
I have been trying to resize a chart depending on the output format used. I wanted to have one size for html and a different size for others. I wasn't having any success, so I "stripped" the report down to the bare minimum to check on the output format.
When running from the report designer, it didn't matter what output format I used, it always came out as "html".
Does anyone have any idea why?
I am using Birt Charting version 2.3.2.v20081204-1200.
The Eclipse platform is Version: 3.4.1, Build id: M20080911-1700
The Actuate Information Object Designer is Version: 10 (Build 100B081204)
I have attached the "stripped down" version of the report. There are no elements on it.
Find more posts tagged with
Comments
AlanC
I have managed to find out where I was going wrong in this. I had the code in the wrong area!
The following lines of code in the beforeGeneration() function of the chart can be used to modify the width of the chart depending on the output format (any of the lines can be changed as required)...
function beforeGeneration( chart, icsc )
{
// Change the chart width from the default to 8 inches
// if the output format is pdf
if( icsc.getExternalContext().getScriptable().getOutputFormat() == "pdf" )
{
chart.getBlock().getBounds().setWidth(576);
}
}
mwilliams
Hi AlanC,
Glad you found the solution. Sorry to have missed your post go through!