Hi,
I added a dimension field to a report, but it only shows the Dimension Code in that field. How do I change it to show the Dimension Name instead?
I'm very new to the technical part of Navision, so please give me step-by-step instructions. Thank you.
0
Comments
You will have to define 2 variables of DataType Record
Dimension subtype Dimension
DimValue subtype Dimension Value
In the OnAfterGetRecord function you would have to add code
eg
DimName := '';
DimValName := '';
IF Dimension.GET("Global Dimension 1 Code") THEN
DimName := Dimension.Name;
IF DimValue.GET("Global Dimension 1 Code","Global Dimension 2 Code") THEN
DimValName := DimValue.Name;
I am assuming that DimName and DimValName are declared as Text variables and that you have put them into the Body Section of your report.
Cheers
Albert
As for your code, I just copied and paste it. Should I change some part or add something in the quotation?
Sorry, I've never had any training on codes or on this part of Navision, so I have no clues on what to do. Thanks again for your helps.
I have written a little report which shows only dimension 1 and 2 code names
I made the assumption that you only use 2 dimensions. If you use more then you will have to use the Document Dimension, Posted Document Dimension or Ledger Entry Dimension tables.
You can copy and paste the above into a text file and import into Navision, be sure that you don't have a report with ID 50116
Hope this helps
Albert