web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Modify CAL Variables in Visual Studio for a Report

(0) ShareShare
ReportReport
Posted on by 2

I see that the output of the =Fields!Dim1Text_____.Value looks like this:

dim1.jpg

Its the last line which says: (Incluye Sales Type (Dim 1)Code: RETAIL)

I need to modify it obviously due to the spelling errors but I cannot find it anywhere in either Classic designer or Visual Studio designer:

I click on properties but it only shows me the source expression and how to format the text, not the actual text itself.

It is also not found in CAL Globals in Classic

This is NAV 2009 R2.

*This post is locked for comments

I have the same question (0)
  • Suresh Kulla Profile Picture
    49,097 Super User 2025 Season 2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    You welcome

  • edwardl Profile Picture
    2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    I just want to thank you for pointing out this location. You have solved all of my current problems.

  • Verified answer
    Suresh Kulla Profile Picture
    49,097 Super User 2025 Season 2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    In the report, under the dataitem Acc. Schedule Line, in the OnPreDataItem trigger it has the following code you need to change there

    IF "Acc. Schedule Line".GETFILTER("Dimension 1 Filter") = '' THEN
    
     Dim1Text := ''
    
    ELSE BEGIN
    
     IF NOT Dimension.GET(AnalysisView."Dimension 1 Code") THEN
    
       Dimension.Name := AnalysisView."Dimension 1 Code";
    
     Dim1Text :=
    
       STRSUBSTNO(Text005,
    
         Dimension.Name,"Acc. Schedule Line".GETFILTER("Dimension 1 Filter"));
    
    END;


  • edwardl Profile Picture
    2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    What about in the original question where I need to modify =Fields!Dim1Text_____.Value?

  • Verified answer
    Suresh Kulla Profile Picture
    49,097 Super User 2025 Season 2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    Text005 is used multiple times in the report and the value it gets into %2 is the second parameter in STRSUBSTNO function. For ex:


    STRSUBSTNO(Text005,
    Budget.TABLECAPTION,"Acc. Schedule Line".GETFILTER("Budget Filter"));

    %2 value in the above example is "Acc. Schedule Line".GETFILTER("Budget Filter") the filter value.

    So you have to change second parameter if you need to display something different

  • Suggested answer
    Suresh Kulla Profile Picture
    49,097 Super User 2025 Season 2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    Could you confirm the report no. ?

  • Verified answer
    edwardl Profile Picture
    2 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    Where can I set what %2 points at? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans