|
Re: Reg dynamic parameter [message #896041 is a reply to message #896010] |
Tue, 17 July 2012 02:55   |
|
Do you have a table that stores the highest number?
Jason
On 7/16/2012 5:47 PM, A R wrote:
> For one specific requirement I need to come up a quesry as follows for
> my dataset.
>
> select * FROM ASSET_REQUEST_29 UNION ALL
> select * FROM ASSET_REQUEST_31 UNION ALL
> select * FROM ASSET_REQUEST_32 UNION ALL
> select * FROM ASSET_REQUEST_33 UNION ALL
> select * FROM ASSET_REQUEST_34 UNION ALL
> select * FROM ASSET_REQUEST_36
>
> Problem here is there is possibility of that ifin future new version of
> the "ASSET_REQUEST" is created like "ASSET_REQUEST_37, ASSET_REQUEST_38"
> then my report won't be able to capture the informaiton from the same. I
> need to modify the report.
>
> Please suggest me , how can i be able to achieve the approach where I
> can dynamically over come this issue.
>
> Let me know if I need to provide any details further.
>
> Thanks
> AR
|
|
|
|
Re: Reg dynamic parameter [message #896244 is a reply to message #896236] |
Tue, 17 July 2012 17:01   |
|
You have a couple of options. Before you use the main dataset you could
add a hidden table that returns the all of the tables you want to union
and then store these in js vars which you then access in the beforeOpen
of your main dataset to modify the query. Or call the data engine api
directly and get the values to modify your query. I am attaching a
simple data engine api example in the beforeFactory.
Jason
On 7/17/2012 12:33 PM, A R wrote:
> No Jason, besides the versions are random sometime depending on
> architecture. I mean sometimes we may disbale few versions depending on
> situation.
>
> For your question of highest number, I assume I can caluculate the same
> in same dataset or in another dataset...
>
> Please let me know, if I am missing answer to ur Q'n
>
> Thanks
> AR
|
|
|
|
|
Re: Reg dynamic parameter [message #896806 is a reply to message #896787] |
Thu, 19 July 2012 21:20   |
|
In your main data set that will get the data you will need to enter a
query that gets all the expected column names. Say like:
select * FROM ASSET_REQUEST_29
Then in the beforeFactory you will create the rest of the query like:
mymodquery = "";
var ri = qr.getResultIterator( );
while ( ri.next( ) )
{
mymodquery = mymodquery + " UNION ALL ";
col1=ri.getValue("PRODUCTLINE");
mymodquery = mymodquery + " select * from " + col1
}
Then in the beforeOpen of the main data set put in
this.queryText = this.queryText + mymodquery;
Jason
On 7/19/2012 2:48 PM, A R wrote:
> Thanks for the response Jason. I am not clear with how to proceed the suggested option.
>
> I have attached the modified example. In which I have created the dataset where I can access all the tables that I need to union. Creted parameter and variable, included one table where I have included the view_name.
>
> Thanks
> AR
>
|
|
|
|
|
|
|
|
|
Re: Reg dynamic parameter [message #900075 is a reply to message #899929] |
Fri, 03 August 2012 19:55  |
|
I am not certain on the issue you are having. I thought from your last
post you had it working.
Jason
On 8/2/2012 6:22 PM, A R wrote:
> Hi Jason - I am not able to workout the solution. Please suggest.
>
> Thanks
> AR
|
|
|
Powered by
FUDForum. Page generated in 0.03574 seconds