Hello every one -and merry Christmas to you all
The simple problem:
I need to make a command button on my sales header form that calls my new report with the order no. from the sales header.
So I need to parse the order number from the sales header to the report!
I have downloaded the example made on these pages (parsing parameters between objects) and I understand the core of it, but I can not seem to get it working.
I know that this is very simple to most of you, but I hope that you will give me a few minutes of your time and make a small "step by step" guide for me
Hopefully this will give me the basic knowledge to go through "bigger" things myself afterwards.
I run Attain 3.60 in danish.
-thanks in advance!
Comments
(or look at my Navision reference guide you can download here: http://www.mibuso.com/dlinfo.asp?FileID=288 ).
Example: REPORT.RUNMODAL(50000, TRUE, FALSE, Rec);
Put this in the OnPush-trigger of your Command button.
A merry chrismas to you too.
I will present a generic scenario here wherein we have
a form : say form1
value to be passed to report : value
a report to be invoked from within form1 : report1
a global variable in report1 : FilterValue
1:
You need to have a function in report1 : SetValue that would assign value to FilterValue
SetValue( value as type)
{
FilterValue = value
}
2:
In report1, on preDataItem
DataItem.setfilter( ValueField, FilterValue)
valueField is the field in dataItem that maps to the FilterValue.
3:
OnClick of GenerateReport on Form1, you need to do this
Report1.SetValue( value )
value is OrderNo in ur case.
4.
After setting the value, run the report.
Report1.run
And you should have ur work done. 8)
regards
Jyotsna
Thanks for the fast and thorough answers -I look foreward to the holidays so I can test, try and learn :-)
Jens Christian Nørtoft
Denmark
I don't know if this is the case, otherwise use the samples you read in this forum.
Bye,
Marco
Microsoft Certified Trainer
Cronus.it