Originally Posted by djg58
|
I have nearly completely customized the Installed Price proposal report to suit our needs, including extensive scripting and new parameters. Everything works extremely well, but I need to go one more step and I am completely stuck.
I need to interate through some proposal items in a different sequence than the main report does, keying off the current item in the main report. To do this, I would have to indicate to the subreport what the current item is, pick up the value of several fields (zone and CustomProperty4), then filter on these.
I've gone through the ReportUtilities and Item libraries and found many ways to handle the sorting and subreporting supported by the d-tools reports, but no way to do what I'm looking for.
Again what I need to is:
1) Pass a couple of fields to the subreport.
2) Filter the datasource by those fields so the report iterates through only a subset of the data related to the current item in the main report.
I've picked through the D-Tools and DataDynamics forums, but haven't found how to make this work.
Thoughts anyone?
|
I've posted a couple of demo reports that show ways to accomplish the two things you describe: The can be found here:
Adding Filter to SubReport
This is done with a bit of brute force. The filter is a valid XPath Expression. The script demos how to use some of the internal objects to generate the valid XPath filter and then update the recordset pattern on the report
See comments in the script code for explanation
Passing Values to Subreports
This demos using the built in AR Parameters. Take a look at the comments. The demo consists of two reports (a main and a sub report). The sub report describes how to set up the parameters and shows how the values can be retrieved and the main report shows how to set the values of the parameters on the sub reports.
This may also be of interest:
Resorting Items in subreports
-R