Skip to main content



      Home
Home » Archived » BIRT » Variable database name
Variable database name [message #88123] Mon, 07 November 2005 09:58 Go to next message
Eclipse UserFriend
Originally posted by: nospam.mail.com

Hi,

Is it possible to change the database name of a report giving this name
through a report parameter ?
I'd like to use the same report definition with several databases having
the same schema.

Regards

--
A. ROY
Re: Variable database name [message #88196 is a reply to message #88123] Mon, 07 November 2005 10:24 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C5E385.6F5341D0
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable


Gary Xue posted something similar in the FAQ
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:=20
=20
extensionProperties.odaUser =3D "sesame";
extensionProperties.odaPassword =3D "open";
extensionProperties.odaURL =3D "jdbc:my_data_source:....";
extensionProperties.odaDriverClass =3D "com.mycompany.jdbc.Driver";
=20
If you change the odaURL, this should work. You may get an error in the =
designer, if you use a report parameter in this method, but the report =
will still run.Jason WeathersbyBIRT PMC"AR" <nospam@mail.com> wrote in =
message news:op.szvk7bj9lswvks@ar.intranet.sylob.com...
>=20
> Hi,
>=20
> Is it possible to change the database name of a report giving this =
name =20
> through a report parameter ?
> I'd like to use the same report definition with several databases =
having =20
> the same schema.
>=20
> Regards
>=20
> --=20
> A. ROY
------=_NextPart_000_000C_01C5E385.6F5341D0
Content-Type: text/html;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Gary Xue posted something similar in =
the=20
FAQ</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The best way to achieve this is to edit =
the=20
beforeOpen script of the data source object to set the runtime =
information of=20
the data source. To do this, right click on your JDBC data source and =
select=20
"Edit Code". In the method dropdown list, select "beforeOpen". In the =
code=20
editor, write a script like this: </FONT><PRE><FONT face=3DArial =
size=3D2>=20
extensionProperties.odaUser =3D "sesame";
extensionProperties.odaPassword =3D "open";
extensionProperties.odaURL =3D "jdbc:my_data_source:....";
extensionProperties.odaDriverClass =3D "com.mycompany.jdbc.Driver";
=20
</FONT></PRE><PRE><DIV><FONT face=3DArial size=3D2>If you change the =
odaURL, this should work.&nbsp; You may get an error in the designer, if =
you use a report parameter in this method, but&nbsp;the report&nbsp;will =
still run.</FONT></DIV></PRE><PRE><FONT face=3DArial size=3D2>Jason =
Weathersby</FONT></PRE><PRE><FONT face=3DArial size=3D2>BIRT =
PMC</FONT></PRE><PRE><FONT face=3DArial =
size=3D2></FONT>&nbsp;</PRE><PRE><FONT face=3DArial =
size=3D2></FONT>&nbsp;</PRE><PRE><FONT face=3DArial =
size=3D2></FONT>&nbsp;</PRE><PRE><FONT face=3DArial =
size=3D2></FONT>&nbsp;</PRE></DIV>
<DIV><FONT face=3DArial size=3D2>"AR" &lt;</FONT><A=20
href=3D"mailto:nospam@mail.com"><FONT face=3DArial=20
size=3D2>nospam@mail.com</FONT></A><FONT face=3DArial size=3D2>&gt; =
wrote in message=20
</FONT><A href=3D"news:op.szvk7bj9lswvks@ar.intranet.sylob.com"><FONT =
face=3DArial=20
size=3D2>news:op.szvk7bj9lswvks@ar.intranet.sylob.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; <BR>&gt; =
Hi,<BR>&gt;=20
<BR>&gt; Is it possible to change the database name of a report giving =
this=20
name&nbsp; <BR>&gt; through a report parameter ?<BR>&gt; I'd like to use =
the=20
same report definition with several databases having&nbsp; <BR>&gt; the =
same=20
schema.<BR>&gt; <BR>&gt; Regards<BR>&gt; <BR>&gt; -- <BR>&gt; A.=20
ROY</FONT></BODY></HTML>

------=_NextPart_000_000C_01C5E385.6F5341D0--
Previous Topic:subreports?
Next Topic:is a List the best way to go?
Goto Forum:
  


Current Time: Wed Jul 16 23:42:48 EDT 2025

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

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

Back to the top