Skip to main content



      Home
Home » Archived » BIRT » how to define as data source a passed jdbc connection
how to define as data source a passed jdbc connection [message #484392] Mon, 07 September 2009 07:19 Go to next message
Eclipse UserFriend
Hi

I am very new to BIRT and I want to create a sort of "hello world" report.
I'm trying to see how difficult it would be to switch our company's
reporting app from jasper to BIRT.

I have seen the tutorials and all seems great, until I realized I have to
pass the jdbc connection from my app to the report. So in my code I set:

task.getAppContext().put("OdaJDBCDriverPassInConnection", conn);

but then how do I define the data source in the report designer? I imagine
it would have to be a scripted data source, but the given examples suggest
that a scripted data source is a completely different thing.

So - how can I use the connection that I set in the IRunAndRenderTask task?
Re: how to define as data source a passed jdbc connection [message #484555 is a reply to message #484392] Tue, 08 September 2009 04:36 Go to previous messageGo to next message
Eclipse UserFriend
In report designer use the standard "jdbc datasource" und "jdbc dataset".

In your app first call
task.getAppContext().put("OdaJDBCDriverPassInConnection", conn);
and then
"runAndRender()"
your connection "conn" is used instead of the connection and/or datasource you defined directly in your rptdesign-file.

There's a bug in birt 2.5 that you cannot use OdaJDBCDriverPassInConnection with crosstab reports.

Scripted data source is completley different - we use it to pass in java objects from our apps to birt.

John

Diana Pop schrieb:
> Hi
>
> I am very new to BIRT and I want to create a sort of "hello world"
> report. I'm trying to see how difficult it would be to switch our
> company's reporting app from jasper to BIRT.
>
> I have seen the tutorials and all seems great, until I realized I have
> to pass the jdbc connection from my app to the report. So in my code I set:
>
> task.getAppContext().put("OdaJDBCDriverPassInConnection", conn);
>
> but then how do I define the data source in the report designer? I
> imagine it would have to be a scripted data source, but the given
> examples suggest that a scripted data source is a completely different
> thing.
>
> So - how can I use the connection that I set in the IRunAndRenderTask task?
>
Re: how to define as data source a passed jdbc connection [message #484596 is a reply to message #484555] Tue, 08 September 2009 08:54 Go to previous message
Eclipse UserFriend
thank you !!
Previous Topic:ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Next Topic:Performance problem
Goto Forum:
  


Current Time: Wed Jul 23 20:10:38 EDT 2025

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

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

Back to the top