HI I want to learn how to use recordRef. Specifically:
automated reports must skip past the reqForm, but filters are still necesary, so we have to filter the table and then pass it in to the report. But there are different reports with different tables, so I don't want to use a table variable, since I have to specify the subtype.
createPDF(intReport : integer, recRef : recordRef)
//set up PDFCreator as printer... then:
REPORT.RUNMODAL(ReportID,FALSE,TRUE,recRef);
this won't work... since it is expecting a record and not a recordRef
I hope you understand my question. Thanks for your time!
Answers
1. Call a function to activate PDFCreator.
/color][color=red]strFilePath[/color] := [color=darkredPDFPrinter(strFileName : Text)2. Apply filters etc etc print report. (At your own leisure; remotely from PDFPrinter function.)
2a. (PDFCreator::eReady reverts printer back to default system printer and terminates DLL instance)
3. /color][color=red]FoundIt[/color] := [color=darkredWaitForFile(strFilePath : Text, intSeconds : Integer)
4. Attach to E-mail, Load into Table as BLOB, .... etc
Sorry for the colours... I got bored.
You can still use recRef in your function, it's just you have to write a huge case statement and copy the filters to actual rec variable and then call the report.
There is also one more issue with reports in that you can only pass one record to it.
So if you have a report with two dataitem with filters, you can only pass on record.
I would rather take another approach.
I would modify the reports and add a function to get the parameters an apply them to dataItems instead, only if you are running under NAS.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It could be help.