I am actually creating my “grouping key” through run-time (for reports), thx to the JITSort. I have a Record variable that loop my records and write stuff on my report. It works perfectly for 1 table. Now what I want to do is add another table linked to the first one. When I print my report, the informations of the second table on my report are false. I know why, because i did link my second table directly to the first table, but not on my Record variable. My question is, is it possible to link another table on a variable Record instead of the table directly? I hope I did myself clear, thx for your time.
I think I understand what you mean. You will have to use a second Record variable - not a DataItem - to do this.
Alright, I did this but now, how can I link my second Record Variable to the first one?
OK. I believe you have something that looks like this: IF Record.FIND('-') THEN REPEAT Code; UNTIL Record.NEXT = 0;
And you will need to add something like this: IF Record.FIND('-') THEN REPEAT Code for Record; Record2.SETRANGE("Record 1 ID",Record.ID); IF Record2.FIND('-') THEN REPEAT Code for Record2; UNTIL Record2.NEXT = 0; UNTIL Record.NEXT = 0;
Do you get the idea?
Thx for the anwser but I need a little push, i’m so new to Navision… I’ll put you in context, I have a DataItem table and the table Integer to loop trough my record. Here is my code on the table Integer (where I need to do my modification, well I think…) OnPreDataItem() //JITKeyfield is a field where I construct my key dynamicly //recSalesTMP is my first record wich refers to my Dataitem table recSalesTMP.SETCURRENTKEY( JITKeyField ); IF NOT recSalesTMP.FIND( ‘-’ ) THEN CurrReport.BREAK; intStep := ROUND( intTotal / 100,1 )+1; intCounter := 0; //I am looping my record with the help oh my variable intCounter OnAfterGetRecord() IF intCounter > 0 THEN IF recSalesTMP.NEXT = 0 THEN CurrReport.BREAK ELSE BEGIN IF ( intCounter MOD intStep ) = 0 THEN dlgProgress.UPDATE( 1, ROUND(intCounter / intTotal * 9999,1)); END; intCounter := intCounter + 1; My new variable will be recSales2TMP wich I need to link to recSalesTMP. I believe SETRANGE will do the relation but I’m not sure I did catch your explanation… Thx you so much for your time.
Ok, no need to add another table, my boss changed his mind, thx for the help!
Oops, I guess I was too late… [:D] But before your boss changes his mind back again, you should have a look at the documentation included in your Product CD. If you are just starting out with some minor developments and creating Reports, you should begin reading the Application Designer’s Guide book. This will help in a more confortable startup.
Thx for the hint, the thing is I’m helping an extern firm. And this firm won’t let me look at these stuff. Why?! Because they don’t want to loose their job, I guess. We are also blocked on the liscence development, we are allowed to do report, but can’t add any field on table, can’t do or view form any codeunit. It’s kinda hard lerning Navision with nothing in hands. Thx god I found this forum.
Maybe this will be useful for you. At these links, you will be able to download copies of the folders on the Microsoft Business Solutions-Navision W1 3.70 Product CD. Client: http://www.mibuso.com/dlinfo.asp?FileID=266 Doc: http://www.mibuso.com/dlinfo.asp?FileID=267 With the Client and the included CRONUS.flf license file, you are able to do some basic Design. Somewhere there is a description of what you are allowed to do, but I keep forgeting… creating Table 99999… something like that.
Alright thx, I’ll check this out