|
Re: XML datasource with dynamic URL [message #713697 is a reply to message #713685] |
Mon, 08 August 2011 20:22 |
|
Have you tried changing the url using a beforeOpen script like:
this.setExtensionProperty("FILELIST", params["myxmllocation"].value);
If you want to change the query you need to set query text in the
beforeOpen of the dataset like
this.queryText = "table1#-TNAME-#table1#:#[/companies/company[@id='" +
params["companyid"].value
+"']/employee]#:#{id;STRING;/@id},{companyid;STRING;../@id}"
Jason
On 8/8/2011 3:36 PM, Tuco wrote:
> Hello,
> I am trying to use an XML datasource in the BIRT reports.
>
> We have REST webservices which expose the data in the form of
> "http://<serverName>/subject/{Id}.xml?user=<User>&token=<token>".
>
> When i try in Eclipse, i need to give the whole URL but i want to avoid
> that because the server url, id, user and the token will be dynamic.
>
> Is it possible to use report parameters in the URL of the XML so that
> they could be set dynamically as the report task parameters?
>
> I know how to set the report task parameters but can i set the
> parameters in the URL of the XML datasource?
>
> Is there a way?
>
> Thank you
>
> Tuco
|
|
|
Re: XML datasource with dynamic URL [message #713699 is a reply to message #713685] |
Mon, 08 August 2011 20:22 |
|
Have you tried changing the url using a beforeOpen script like:
this.setExtensionProperty("FILELIST", params["myxmllocation"].value);
If you want to change the query you need to set query text in the
beforeOpen of the dataset like
this.queryText = "table1#-TNAME-#table1#:#[/companies/company[@id='" +
params["companyid"].value
+"']/employee]#:#{id;STRING;/@id},{companyid;STRING;../@id}"
Jason
On 8/8/2011 3:36 PM, Tuco wrote:
> Hello,
> I am trying to use an XML datasource in the BIRT reports.
>
> We have REST webservices which expose the data in the form of
> "http://<serverName>/subject/{Id}.xml?user=<User>&token=<token>".
>
> When i try in Eclipse, i need to give the whole URL but i want to avoid
> that because the server url, id, user and the token will be dynamic.
>
> Is it possible to use report parameters in the URL of the XML so that
> they could be set dynamically as the report task parameters?
>
> I know how to set the report task parameters but can i set the
> parameters in the URL of the XML datasource?
>
> Is there a way?
>
> Thank you
>
> Tuco
|
|
|
Powered by
FUDForum. Page generated in 0.04007 seconds