Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Can not access dataset row across datasources
Yufan
Hi,
Currently we have faced a problem.
Below is our scenario, you can jump over if you want to see problems:
The data is separated to 2 parts.
The customer sequence number is coming from a messaging API, and the mobile number and customer sequence number are from JDBC database data source.
The goal is only displaying customer mobile numbers which equals to customer sequence numbers in the response xml which was returned by calling messaging API.
Example:
Database:
SeqNo Mobile
001 12345678
002 22220000
003 33330000
004 98765432
Report:
[Customer Seq No.] [Customer Mobile]
[001] [12345678]
[004] [98765432]
Where 001 and 005 are exists in the message queue response XML.
What I have done in BIRT:
2 datasources were created in BIRT report design, the "scripted data source" and the "jdbc data source". The scripted datasource will fetch the datasetRow["customerNo"] which stands for customer sequence number and the the JDBC datasource will provide the datasetRow["mobile"] and datasetRow["custSeqNo"].
The next step, a filter was created in "jdbc data source". The filter is ["customerNo"] "equalsto" datasetRow["seqNo"].
The problem is coming:
When I access datasetrow[seqNo](scripted data source mapping) from the jdbc datasource, the BIRT complier does NOT throw any error.
But there is an error when I run the report on application server, which says "invalid field name 'customerNo'".
Please help to look into this across datasource accessing datasetRow error, which does not display as an error in BIRT designer but throws an error after running the report.
Thank you.
Regards,
Yufan
Find more posts tagged with
Comments
mwilliams
<p>Can you post your design? Or better yet, can you create a simple example that I can run that will show the issue? This will make it easier to test.</p>
Yufan
<p>Hi William,</p><p> </p><p>Thank you for your reply.</p><p> </p><p>I wish to share my solution:</p><p> </p><p>1. Create an java class named CustomerInfo.java.</p><p> </p><p>2. In the servlet, we create an array list of this object.</p><p> </p><p>2.5 Open JMS and JDBC connections, read data into the array list.</p><p> </p><p>3. Parse this list as an parameter in same servlet.</p><p> </p><p>4. Open the report design in the eclipse, create a script data source. </p><p> </p><p>5. In the default methods of script ds, loop the array list and get attributes into chart mappings.</p><p> </p><p>6. The data is displaying in the chart!</p><p> </p><p>Thank you again.</p>
mwilliams
Glad you got it working! Let us know whenever you have questions!