nashrul
10-31-2008, 05:02 AM
Hi, in xaction, when we use loop component to iterate on the resultset for sqlquery component, do we need to put a logic to end the loop or it will stop when there is no more record to loop on ??
I have a strange behavior of xaction (file attached). I write an xaction that queries a database for parameters and email name. In this solution file, it will iterate over the fetched records and doing the query again to get records for the report and send it as attachment to the appropriate recipient.
Here's the structure of my xaction:
SQLLookupRule
UtilityComponent(FormattedMessage)
Loop
JavascriptRule
SQLLookupRule
JFreeReportComponent
EmailComponent
Strangely, I only have 2 matched records for the first SQLLookupRule component above, but when I see pentahoAudit log, it keeps iterating over and over.
Any ideas on how to properly loop on fetched records ??
Any help would be greatly appreciated.
Thanks..
PS: When we reference variable from another component what's the use of "PREPARE" word ?? What's the different between using and not using this word when we reference a variable (like the one {email} in my solution example) ??
I have a strange behavior of xaction (file attached). I write an xaction that queries a database for parameters and email name. In this solution file, it will iterate over the fetched records and doing the query again to get records for the report and send it as attachment to the appropriate recipient.
Here's the structure of my xaction:
SQLLookupRule
UtilityComponent(FormattedMessage)
Loop
JavascriptRule
SQLLookupRule
JFreeReportComponent
EmailComponent
Strangely, I only have 2 matched records for the first SQLLookupRule component above, but when I see pentahoAudit log, it keeps iterating over and over.
Any ideas on how to properly loop on fetched records ??
Any help would be greatly appreciated.
Thanks..
PS: When we reference variable from another component what's the use of "PREPARE" word ?? What's the different between using and not using this word when we reference a variable (like the one {email} in my solution example) ??