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

Notifications

Announcements

No record found.

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)
  • Verified answer
    edwardl Profile Picture
    2 on at

    Where can I set what %2 points at? 

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Could you confirm the report no. ?

  • Verified answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    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

  • edwardl Profile Picture
    2 on at

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

  • Verified answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    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

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

  • Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    You welcome

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans