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)
Syntex to trigger sub/external report in a method
Xuechang
Hi there,
I work on converting Actuate reports to BIRT reports. There is a problem. In Actuate, there is a Conditional Section in which the report will run the section based on the condition. However, in BIRT, there is no such a function. Thus, I am thinking to make some script in OnCreate method to run sub report or external report based on the value I can get from column in the sql statement.
Is there anybody know what syntex I can use to run the sub/external report?
Here is the example:
I can make the script in OnCreate method.
var report_to_run = getColumn("FAILURECODE");
--here FAILUERECODE is the column from the sql in the report.
if (report_to_run = 'A') {
run A report;
} else if (report_to_run = 'B') {
run B report;
}
Here I don't know what syntex I can use to replace 'run A report'.
Please help!
Richard
Find more posts tagged with
Comments
mwilliams
Hi Richard,
Are you talking about a drill through type report setup where the user clicks on a value to run a subreport?
Xuechang
You are right. I guess drill through report you mentioned may work. The value is not click by the user but get from the column in the table in the main report sql. For example, the simplified sql statement in the main report is "select failurecode from workorder". In OnCreate method, I could get the value from the failurecode. If the value is 'A', I run A report; if failurecode is 'B', I run B report. Based on the value I need to give the syntex to run the report. I just do not know what the syntex I can use in the OnCreate method.
Do you know the syntex or how to make the drill through report?
Thanks!
Richard
mwilliams
Richard,
So, you want to automatically run reports for each line returned in your data based off of the failurecode?
Xuechang
Michael,
Thank you for the reply!
Yes. When I run the main report, I like the report to run sub/external report based on the value of the FAILURECODE. I am not sure how I can implement in BIRT 232.
Thank you ahead for the help!
Richard
shruti
Hi Richard,
I believe you can use the condition visibility feature of BIRT to do this. You can create a combined report(Both Reports in one rptdesign) and hide the report items based on the column value.
To do that select the report item --> go to properties tab --> visbility feature --> select hide option for all outputs --> click on the function key --> write the check condition and mention true false based on the column value: example
if(row["x"] == "A")
{
true
}
else
{
false
}
Regards,