I've picked up development of a report from a colleague. He got stuck when trying to add a subreport (which I've fixed).
However he took an unconventional approach to rendering the report, in that he connected the Report Viewer form as a linked form rather than creating a dedicated Report Definition form. This approach does work if you're happy to accept the limitation of one record per report. In this case it's a Concession Note report, so users would likely only print one at a time anyway.
The downside is that the Subreport section doesn't render until you press the Run button on the navigation pane. Nor does it produce a PDF until you press Export and then saves it with a VERY odd paper size.
To evade the paper size issue (this 9.01.01, so Size options cannot be easily controlled as in v10) I rigged the button which previously opened the viewer form to run a Background Task instead.
This renders the report nicely but won't obey the BGTaskParms that I send. The only parameter needed is the Concession Number. If I send parms of SETVARVALUES(<CA_Num>) Syteline generates an empty file. If I just send the Concession Note Number (without the SETVARVALUES statement as per SSRS) it prints the entire collection.
I could just go and create a Custom Load Method in SQL (or VB) but the possibility of generating a report without really any coding seems very attractive. The SubReport controls what it shows via a Permanent Filter Expression. Can I use the same method for the main report?
The property I need to filter by is CA_Num but how do I 'unbundle' the Parameter string?
I'm guessing I need to set a variable via Formscript (tied to StdFormPreDisplay perhaps)
All ideas welcome.
Thanks