Can I pass Reports to a procedure by address? Are there any examples of how to do this?
I'm running a procedure that produces its own detailed report. However, because I'll be calling it >100 times, I'd also like to create another report that adds one line (with a few key statistics) every time I call the procedure. I thought the natural way to do this would be to create the summary report as a global variable, then pass it by address. However, this isn't working for me.
Any suggestions?
Reports: Passing by Address
Re: Reports: Passing by Address
Did you do the * on the type instruction for the REPORT? The following seems to work fine:
Code: Select all
declare report foo
report(action=define,use=foo)
*
procedure addstuff myreport
type report *myreport
report(use=myreport,row=new,atcol=1) "Row" %reportrow+1 %ran(1.0)
end addstuff
*
@addstuff foo
@addstuff foo
@addstuff foo
*
report(use=foo,action=show)