Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
How to set the port for birt ?
Migrateduser
hello...
I visit here, so much and have searched about birt report settings...but I couldn't find one ..
so I'm leaving this.
" the question is .."
in java source, a data renders to xlsx format..
it works on localhost....as localhost:8080 ..
but problem is ...it doesn't work on https ...
it uses two different port numbers ...
443 and 9090 ..
443 is for web ..
and 9090 will be used for birt ! , I need help ..
========the source is like this ..
public void publish(String designDocPath, Object parameters, String format, HttpServletRequest req, OutputStream fos)
throws EngineException {
designDocPath = BirtParameter.getDesignDocPath(designDocPath);
IReportRunnable runnable = engine.openReportDesign(designDocPath);
IRunAndRenderTask runAndRenderTask = engine.createRunAndRenderTask(runnable);
if (req != null) {
runAndRenderTask.getAppContext().put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST, req);
}
DataSet ds = (DataSet) parameters;
try {
runAndRenderTask.getAppContext().put("REPORT_DATASET", ds);
} catch (java.lang.ClassCastException cee) {
cee.printStackTrace();
}
if("xlsx".equals(format)) {
EXCELRenderOption option = new EXCELRenderOption();
option.setOutputStream(fos);
/*option.setOutputFormat("xls");
//option.setOutputFileName("output/native.xls");
//option.setOption( IExcelRenderOption.OFFICE_VERSION, "office2007");
//option.setOption("excelRenderOption.hideGridlines",true);
option.setOption(IExcelRenderOption.OFFICE_VERSION, "office2007");
option.setOption(IRenderOption.EMITTER_ID,"org.eclipse.birt.report.engine.emitter.nativexls");
runAndRenderTask.setRenderOption(option);*/
//option.setWrappingText(true);
//option.setEnableMultipleSheet(true);
option.setOutputFormat("xlsx");
option.setEmitterID("uk.co.spudsoft.birt.emitters.excel.XlsxEmitter");
runAndRenderTask.setRenderOption(option);
} else {
PDFRenderOption option = new PDFRenderOption();
option.setOutputStream(fos);
option.setOutputFormat(format);
runAndRenderTask.setRenderOption(option);
}
try {
runAndRenderTask.run();
} finally {
Logger.info.println("BirtPublisher render format:" + format);
runAndRenderTask.close();
}
}
========================================================================================================
is there something wrong ? or missing ?
Find more posts tagged with
Comments
There are no comments yet