In the order report I want a counter. When I print the report, I want it to add a column where it shows 1 and then the rest of the info,
2 and then the rest of the info...etc.
for example... in CRONOS the order report shows the following:
.................................................................... What I want is
No....Description...Quantity...Unit of Measure........ Number
1908.....printer .............1..............box ............................... 1
1906......ink...................5..............box................................ 2
1907......cable................3 .............box.................................3
I know its a counter I'm supposed to make. I'm new at programming as well as navision... please help me.
I start by declaring a variable Counts as an integer.
in C/AL I write:
Count:=0;
then something...
Count := Count +1;
0
Comments
- Declare an global int variable name i.e. Counter.
- On the OnPreDataItem place a line: - On the OnAfterGetRecord place a line: - Place a Text Box on the corresponding detail section that has a SourceExpr=Counter
That is the main concept...
Arhontis
https://forum.mibuso.com/search
I'll definitely not ask this again...that was easy!
I am trying to do the same thing, for the same report.
On pre data item of the purchase header I put the code:
Counters := 0;
On after get record of the purchase header I put the code:
Counters := Counters + 1;
for the source expression of my text box that I have added on my report I have it set to Counters
I have declared Counters as a global variable of typ integer.
have I forgotten something?
OnAfterGetRecord of the "purchase Header" or "Purchase Line"??
Shouldn't you display and calculate under the "Purchase Line"?
Arhontis
https://forum.mibuso.com/search
I have done all the combinations....
on pre data item of purchase header Counters := 0;
on after get record of purchase line Counters := Counters + 1;
on pre data item of purchase header Counters := Counters + 1;
on after get record of purchase line Counters := 0;
on after get record of purchase header Counters := 0;
on pre data item of purchase line Counters := Counters +1;
on after get record of purchase header Counters := Counters + 1;
on pre data item of purchase line Counters := 0;
Don't know what else to do...
* Create a global Counters of type Integer.
* you must enter code to:
RoundLoop - OnPreDataItem
Counters := 0;
* you must enter code to:
RoundLoop - OnAfterGetRecord
Counters := Counters+1;
* On the Section RoundLoop Body (4) place on the start of it a textbox with SourceExpr to Counters;
(The "Number" is a field of the "integer" virtual table.)
If it is not the 405 report then on what report are you making your customizations, so I could replicate the problem...
:roll:
Arhontis
https://forum.mibuso.com/search
The way I was thinking about it was wrong. I wasn't using the data item where the information was displayed (for example the Roundloop data item)
I was thinking of where the data is coming from (Purchase line and header).
I appreciate your help.
Thank you
Arhontis
https://forum.mibuso.com/search