>Hi,
>
>I have 2-band report. The 2nd band relies on records in a cursor. The cursor name is lcLaborCursor. The cursor is created as follows:
>
>lcLaborCursor = SYS(2015)
>
>So the variable lcLaborCursor has to be in scope when the report is produced. But the cursor (lcLaborCursor) is created and populated two functions before the report is produced. So, I declare the variable lcLaborCursor as PRIVATE. And it works.
>
>Another way I can do it is to declare the variable as Local (my desired goal) and then pass it from one function to another, and then to another.
>
>My question: Can I declare the variable lcLaborCursor LOCAL, not pass it from one function to another, but then still make the cursor in scope within the report?
>Some of the text in the report is using the following syntax:
>
>EVALUATE( lcLaborCursor + ."FLD_NAME")
>
>The above requires that the lcLaborCursor be in scope.
>
>What else can I do?
>
>TIA
The most simple thing would be to use a static name like
cur_Report_XYZ. It just depends on a good name (~ing convention) that creates the names. If a report is called by more more then one source procedure, well it's just the same cursor name.
I, in general, normally do all stuff I need to determine the data and finally create an report
curPrint[_nn] cursor just for the purpose of REPORT FORM. The _nn part is optional for reports with more then one source, or for reports chained.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]