Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Modify CAL Variables in Visual Studio for a Report

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

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    You welcome

  • edwardl Profile Picture
    edwardl 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
    Suresh Kulla 43,745 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
    edwardl 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
    Suresh Kulla 43,745 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
    Suresh Kulla 43,745 on at
    RE: Modify CAL Variables in Visual Studio for a Report

    Could you confirm the report no. ?

  • Verified answer
    edwardl Profile Picture
    edwardl 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans