Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
using two datasets
Ronak
Hi,
I have two tables.
Table1 is 'Repparam' and table 2 is 'supply'.
Table1 have columns : ID , WHERE_PART....it belogs to dataset1
Table2 have columns : ID, Name1,Name2,TElephone...it belongs to dataset2
Now in table1..I entered some data..like..table1(2,'where Name1' = 'abc')
inserting another data like table1(2,'where Name2' = 'xyz')
--the below code shows what I did
start
For Dataset1 we have query like...Select * from repparam where ID = ?...we have one parameter here..its ID
For Dataset2 we have query like...Select * from supply....
In dataset2...before open script I added line....this.query[text] = this.query[text]+ " "+ WHERE_PART...there may be mistake in this.query format
end
Now we are generatting the layout of the report in the FORM mannerlike
ID: [ID]
Name1: [Name1]
Name2: [Name2]
Now what I want is as I enter the ID value for the parrameter specialized in dataset 1, all the respective values for dataset1..should come to the report..
EG:
If parameter ID = 2..as above
O/P should be
ID:2
Name1:abc
Name2:xyz
How can I do this...Is there any demo example available...then please forward it. I am using BIRT 3.7
Thanks
Ronak
Find more posts tagged with
Comments
Ronak
Hi,
I have two tables.
Table1 is 'Repparam' and table 2 is 'supply'.
Table1 have columns : ID , WHERE_PART....it belogs to dataset1
Table2 have columns : ID, Name1,Name2,TElephone...it belongs to dataset2
Now in table1..I entered some data..like..table1(2,'where Name1' = 'abc')
inserting another data like table1(2,'where Name2' = 'xyz')
--the below code shows what I did
start
For Dataset1 we have query like...Select * from repparam where ID = ?...we have one parameter here..its ID
For Dataset2 we have query like...Select * from supply....
In dataset2...before open script I added line....this.query[text] = this.query[text]+ " "+ WHERE_PART...there may be mistake in this.query format
end
Now we are generatting the layout of the report in the FORM mannerlike
ID: [ID]
Name1: [Name1]
Name2: [Name2]
Now what I want is as I enter the ID value for the parrameter specialized in dataset 1, all the respective values for dataset1..should come to the report..
EG:
If parameter ID = 2..as above
O/P should be
ID:2
Name1:abc
Name2:xyz
How can I do this...Is there any demo example available...then please forward it. I am using BIRT 3.7.
I am attaching one .rptdesing file...which I made..It is not working for me. Please check it..Is it ok or any change is needed.
Thanks
Ronak
mwilliams
To pass a value from one table to the one that relies on that value, you can embed table 2 into table 1 and use the dataSet binding parameter button on the binding tab of the property editor for the inner table to pass the value from the outer table to the inner table.