Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Formula error in reports in excel format in birt
Formula error in reports in excel format in birt [message #366344] Wed, 17 December 2008 05:38
Roopa  is currently offline Roopa
Messages: 20
Registered: July 2009
Junior Member
Hi,

Am using birt-2.3.2. I am able to generate the report in excel format.
But the problem is am getting a formula error for the grids which are
numeriacal in nature.
I have the fields like SSN, zipcode which are always numeric. But i cant
set the datatype for these fields as 'Integer'. It shows the values like
eg: 2,234 which is not sensible for these fields. For these fields i have
set the datattype as String . But get the error on the excel sheet like- "
The number in this cell is formatted as text or preceded by apostrophe."
Can anybody tell me , how do i get rid of this error.

Her is my code below. Is there anything which can handle the errorcheck
while generating reports in excel format.

IReportEngine engine = null;
EngineConfig config = null;

config = new EngineConfig();
config.setEngineHome(RPTENGINEPATH);
config.setLogConfig(LOGDIR, Level.FINE);
config.setResourcePath(RPTLIBPATH);

Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E NGINE_FACTORY);
engine = factory.createReportEngine(config);

IReportRunnable design = null;
// Open the report design
design = engine.openReportDesign(RPTBASEPATH + HBSReportName
+ WebReport.RPTExtension);


// Create task to run and render the report,
IRunAndRenderTask runRenderTask = engine.createRunAndRenderTask(design);
EXCELRenderOption options = new EXCELRenderOption();
options.setOutputFileName(RPTOUTPUTDIR + HBSReportName + ".xls");
options.setOutputFormat("xls");
runRenderTask.setRenderOption(options);
EngineConfig config = new EngineConfig();
HashMap hm = config.getAppContext();
hm.put("PatContactDS", patContactData);

// Set parameters
HashMap<String, String> parameters = new HashMap<String, String>();
WebReport.setCommonReportParameters(parameters, params, dateFormat);
runRenderTask.setParameterValues(parameters);
runRenderTask.setAppContext(hm);
runRenderTask.setEmitterID(engine.getEmitterInfo().toString( ));
runRenderTask.run();
runRenderTask.close();
engine.destroy();
Platform.shutdown();
Report.ReportLogger.info("Finished");

Thanks,
Roopa.
Previous Topic:Birt 2.3.1 and OnFetch script of the Dataset
Next Topic:Dynamic text with HTML is missing strikethrough in PDF?
Goto Forum:
  


Current Time: Wed May 22 03:42:33 EDT 2013

Powered by FUDForum. Page generated in 0.10401 seconds