Skip to main content



      Home
Home » Archived » BIRT » Drill down with engine API
Drill down with engine API [message #122591] Wed, 01 February 2006 07:45 Go to next message
Eclipse UserFriend
Originally posted by: jan.tanis.coas.com

Hi,

I'm trying to implement the runtime engine into our company framework.
And now have the result of a report embedded into a JSP. The report
contains links to other reports, so called drill-down, but the links are
NOT displayed in my embedding. How do I set up the engine so it
generated the right links to the other reports? Do I have to use
IHTMLActionHandler or something like that and can you provide me with an
example? Thanks in advance.

Regards, Jan.
Re: Drill down with engine API [message #122621 is a reply to message #122591] Wed, 01 February 2006 08:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rams.gmail.com

hi jan,
its not answer to ur query but its once again question

as u told ur displaying reports in jsp.

let me know which version of birt ur using for that. and aslo

we are also integrated birt with our company framework and its working
fine with birt 1.0.1
after that we replaced all the 1.0.1 jars with 2.0.0 but its showing NULL
POINTER EXCEPTION when we executing the folloing statement.

reportObj = engine.openReportDesign(reportname);

here reportname is like this : e:\Reports\test.rptdesign

which are created using birt 2.0.0 designer

could help me regarding this plz.
Re: Drill down with engine API [message #122671 is a reply to message #122621] Wed, 01 February 2006 09:02 Go to previous message
Eclipse UserFriend
Originally posted by: jan.tanis.coas.com

rams wrote:
> hi jan,
> its not answer to ur query but its once again question
> as u told ur displaying reports in jsp.
>
> let me know which version of birt ur using for that.
2.0.0 release build

and aslo
> we are also integrated birt with our company framework and its working
> fine with birt 1.0.1 after that we replaced all the 1.0.1 jars with
> 2.0.0 but its showing NULL POINTER EXCEPTION when we executing the
> folloing statement.
>
> reportObj = engine.openReportDesign(reportname);
>
> here reportname is like this : e:\Reports\test.rptdesign
>
> which are created using birt 2.0.0 designer
> could help me regarding this plz.

Well, I did use the example code for generating report from Java code,
so you can just view that code from the BIRT website, at least it used
to be there:

public void run(OutputStream outputStream) {
EngineConfig config = new EngineConfig();

config.setEngineHome(engineHome);
if (tempDir != null) {
config.setTempDir(tempDir);
}
String format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
if(formatType.equalsIgnoreCase("PDF")) {
format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
}
HTMLEmitterConfig hc = new HTMLEmitterConfig();
HTMLCompleteImageHandler imageHandler
= new HTMLCompleteImageHandler();
hc.setImageHandler(imageHandler);
config.setEmitterConfiguration(
format
, hc);

ReportEngine engine = new ReportEngine(config);

IReportRunnable report = null;
try {
report = engine.openReportDesign(input);
} catch (EngineException e) {
System.err.println("Report not found!\n");
engine.destroy();
return;
}

if (format != null) {

parseParams(engine, report, parameters);

IRunAndRenderTask task =
engine.createRunAndRenderTask(report);
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat(format);
options.setOutputStream(outputStream);
options.setEmbeddable(embeddable);
task.setRenderOption(options);
task.setParameterValues(parameters);

// Run the report.

try {
task.run();
} catch (EngineException e1) {
System.err.println("Report run failed.\n");
System.err.println(e1.toString());
}
}

engine.destroy();
}

Good luck with the integration, it works fine here now:) Besides the
drill-down linking.

Regards, Jan.
Previous Topic:Query Parameters Question
Next Topic:How to migrate birt 1.0.1 to 2.0.0
Goto Forum:
  


Current Time: Tue Jul 15 07:42:50 EDT 2025

Powered by FUDForum. Page generated in 0.05401 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top