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)
Need Help: Error Logging and How to get dataset result through script?
NehaAgrawa
Hi All,
I am new to BIRT and need help for creating a report.
Requirement :
Report has to display the information using two different data sources i.e. Flat file and MS SQL. Flat file contains the list of input parameters like customer id and cstomer ids related other information like Name, address etc is stored in MS SQl db.
Report has to read customer information from MS SQl for all those ids listed in flat file. A error logging is also required to be done of all those customer ids for which no record found in MS SQL.
Applied Solution :
To achieve this, I have created a report with 2 different data sets and created inner join between them which results in third data set. Inner join made on Customer ID. This fullfills my one requirement i.e. reading all parameters in one shot but I am not sure how to do error logging for "Not Matched" customer ids.
Problem Summary :
1) How to do error logging for "Not Matched" customer ids.
2) Is there any way to get dataset query's result values through script? So that it can passed to parameter and used further.
Please help me.
Find more posts tagged with
Comments
mwilliams
Hi NehaAgrawa,
So, you're wanting to display all of the names and their info and then have a list of those where no info was found somewhere else in your report? Is this the case? Or something else? As for question number 2, can you explain what you're trying to do with this?
NehaAgrawa
Hey Michael,<br />
<br />
Yes, you got it right. I want to display all of the names and their info and then have a list of those where no info was found somewhere else in the report.<br />
<br />
With Question no 2, I am trying to get all the data listed in the CVS text file ( i.e. dataset's result) and assigning it to a parameter and then usig this parameter can filter the result of another dataset i.e. MS SQl one. I am not sure about this approach But this is just what I thought. Please correct me and guide me if you have any other better approach.<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi NehaAgrawa,<br />
<br />
So, you're wanting to display all of the names and their info and then have a list of those where no info was found somewhere else in your report? Is this the case? Or something else? As for question number 2, can you explain what you're trying to do with this?</p></blockquote>
mwilliams
NehaAgrawa,
You could do a check in your table to count the records returned for a certain value. If there are 0, you could add the value to a comma separated string stored in a variable and then display this variable later in the report.
As for question 2, if you're wanting to bring the values in from one dataSet and use the values of it to filter/query another dataSet, you could embed the second dataSet table into the first dataSet table and then use the dataSet parameter binding option on the binding tab of the inner table to pass each "outer" value to the query. Let me know if I didn't explain this enough.
NehaAgrawa
Michael,
Can you please elaborate this, I am not clear about how to embed the datasets and then binding dataset parameter thing.
It would be great if you can explain all these with some example report (for checking the returned records and embedding data set both).
Thank You
mwilliams
NehaAgrawa,
What version of BIRT are you using? I'll make one with the sample database.
NehaAgrawa
Michael,
I am using BIRT Designer and Runtime 2.5.2, with Eclipse Galelio.
mwilliams
NehaAgrawa,
Take a look at the attached report. You'll see the dataSet parameter in the detail query, '?'. If you click on the inner table in the report design, go to the binding tab of the property editor, and click on the dataSet parameter binding button, you'll see that I assigned the dataSet parameter the value from the outer table. This way the query only returns those values. In the onCreate script of the inner table, you can see where I add the values of the table that return no data to a comma separated string. I then display this string in the footer. Let me know if you have any questions!