>Hi,
> How could I pass a LOCAL VARIABLE to report ?
>
>Thank you
Hi All! After discussion, give him some +ve advise!!
First, I suggest you Use a
View (Local/Remote) to
make a set of all fields including some calculated field!!
(e.g. Select OrdItems.Qty * Item.SellPrice As RowTotal, .....)
To make Calculated field, at View Designer,
Left Bottom Textbox with a [...] button at right!
Benefits:
Define One Time and can be
REUSE in All other similar Reports!
PreDefine the Calculated can shorten the field formula at report,
so that you can easy to maintain if the required formula change!!
e.g. You need to make a Quote sheet with 20% OFF price, but now is 25% OFF
What you need to do is to adjust the View is finished WHEREAS
you need to modify all report if you defined the formula in each quote report!!
Besides, you can simply trace out why there is
Nothing on SelectedAs you only need to find out the View result, otherwise, you need to trace out
each report DE problem.. surely hard to trace!!
Now, how you pass a
Parameters to Report has changed to:
How you pass a Parameters to View!
At View Designer, at Condition Tab, add a where cause expression Like:
ALLTRIM(UPPER(?ThisForm.PrtKey))$ALLTRIM(UPPER(myTABLE.myKEY)) = .T.
PrtKey is a new property of a form!
ThisForm.PrtKey = MyTable.MyKey
IF THISFORM.GETPRINTER = []
PR = GETPRINTER()
IF EMPTY([&PR])
RETURN
ENDIF
THISFORM.GETPRINTER = [&PR]
ENDIF
SET PRINTER TO NAME [&PR]
PRINTJOB
_PBPAGE = ThisForm.txt_pbpage.VALUE
_PEPAGE = ThisForm.txt_pepage.VALUE
PRINTCMD = [REPORT FORM ] + lSelectedReport + [ RANGE ] +;
ALLTRIM(STR(_PBPAGE)) + [,] +;
ALLTRIM(STR(_PEPAGE)) + [ PREVIEW]
KEYBOARD '{CTRL+F10}'
&PRINTCMD
ENDPRINTJOB
^_~ I'll also put this message on Knowledge Base, sure helpful for beginner!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.