Using BIRT with a J2EE application [message #104014] |
Wed, 04 January 2006 11:20  |
Eclipse User |
|
|
|
Hi
We are planning to use BIRT bundled along with our Application that runs on
a J2EE server.
The reports will be integrated along with the application. I need to know
how to pass the authorization
and authentication information (login info into birt so that I can restrict
the data based on the user login).
Regards
Dwarakanath
|
|
|
|
|
Re: Using BIRT with a J2EE application [message #104953 is a reply to message #104806] |
Thu, 05 January 2006 14:37  |
Eclipse User |
|
|
|
Dwarakanath,
You can call out to Java from BIRT. From the FAQ
Is it possible getting database's information from a DataSource? object with
the API?
Gary Xue
The best way to achieve this is to edit the beforeOpen script of the data
source object to set the runtime information of the data source. To do this,
right click on your JDBC data source and select "Edit Code". In the method
dropdown list, select "beforeOpen". In the code editor, write a script like
this:
extensionProperties.odaUser = "sesame";
extensionProperties.odaPassword = "open";
extensionProperties.odaURL = "jdbc:my_data_source:....";
extensionProperties.odaDriverClass = "com.mycompany.jdbc.Driver";
Another way that 2.0 RC gives you is by using the Property Binding selection
in the Edit Data Source Wizard. You could set the User Name to a
parameter.This would require no code.Jason"Dwarakanath"
<dcheyyur@orangescape.com> wrote in message
news:dpj588$uit$1@utils.eclipse.org...
> Hi Jason,
>
> I think I didn't convey my requirement properly. At present we
> Use the BIRT IDE to develop reports and deploy them as web applications.
> It is necessary to obtain the current user (i.e, the user
> who is executing the report at runtime - which is an instance of
> javax.security.Principal) information so that I can restrict the data
> being shown in the report. I assume, I need to add some kind of scripting
> code during report design. where and how is what I don't know.
> I hope I am clear now.
>
> Regards
>
> Dwarakanath
>
>
> "Jason Weathersby" <jweathersby@actuate.com> wrote in message
> news:dph3gs$mh3$1@utils.eclipse.org...
>> Dwarakanath,
>>
>> You have a couple of options.
>> You can set the username and password as parameters
>> and use this from the faq
>>
>> Is it possible getting database's information from a DataSource? object
>> with the API?
>>
>> Gary Xue
>> The best way to achieve this is to edit the beforeOpen script of the data
>> source object to set the runtime information of the data source. To do
>> this, right click on your JDBC data source and select "Edit Code". In the
>> method dropdown list, select "beforeOpen". In the code editor, write a
>> script like this:
>>
>>
>> extensionProperties.odaUser = "sesame";
>> extensionProperties.odaPassword = "open";
>> extensionProperties.odaURL = "jdbc:my_data_source:....";
>> extensionProperties.odaDriverClass = "com.mycompany.jdbc.Driver";
>> OR
>>
>> add a Java object with the credentials and use JavaScript within BIRT to
>> set the username and password
>> look at birtworld.blogspot.com
>> "Using Embedded Java Objects within BIRT"
>>
>> You can also look at writting or extending your own ODA
>> look at birtworld.blogspot.com
>> "Using a supplied connection with BIRT "
>> and
>> BPS35
>> http://www.eclipse.org/birt/wiki/index.php?n=BPS.BPS35
>>
>> Hope this helps
>>
>> Jason Weathersby
>> BIRT PMC
>>
>>
>>
>>
>> "Dwarakanath" <dcheyyur@orangescape.com> wrote in message
>> news:dpgsko$a32$1@utils.eclipse.org...
>>> Hi
>>>
>>> We are planning to use BIRT bundled along with our Application that runs
>>> on a J2EE server.
>>> The reports will be integrated along with the application. I need to
>>> know how to pass the authorization
>>> and authentication information (login info into birt so that I can
>>> restrict the data based on the user login).
>>>
>>> Regards
>>> Dwarakanath
>>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03378 seconds