I create a new report. Put in a global variable named Buffer of type Record 49. In Properties I set Dimensions to 10 and Temporary to Yes.
I also put in a global variable named i of type Integer.
In OnPreReport trigger I enter the following code:
FOR i := 1 TO ARRAYLEN(Buffer) DO
Buffer.INSERT;
And the I run the report. Navision does not create 10 different temporary tables like it should do.
Regards, Gunnar Gestsson
Saudarkrokur, Iceland.
________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.ishttp://Objects4NAV.com0
Comments
Create another record variable (non-temporary) InvPostBuf for table 49 and then :
InvPostBuf.FIND('-');
FOR i := 1 TO ARRAYLEN(Buffer) DO BEGIN
Buffer := InvPostBuf;
Buffer.INSERT;
END;
Hope this makes sense. If not I can provide an examle of what I mean.
InvPostBuf.FIND('-');
FOR i := 1 TO ARRAYLEN(Buffer) DO
Buffer := InvPostBuf;
The code stated above creates you 10 copies of the first record for further processing, but every alteration on one will alter the others too.
AND
keep in mind that Table 49, as all buffer tables, is empty and only used while posting is in progress. The records are deleted afterwards.
It would be helpful if you would tell us what you are actually trying to do ? :-k
If you also define it also as temp it will be 5 pointers to the same temp table...or did you just explain this