How to put customization on trial balance report version 2015

T222
Member Posts: 63
I have the following customization in trial balance report on version 5.
under sections of report - integer Body 2 - Presection
IF CurrReport.SHOWOUTPUT THEN BEGIN
IF ("G/L Account"."Balance at Date"=0) THEN BEGIN
IF ("G/L Account"."Balance at Date" <> "G/L Account"."Net Change") THEN
CurrReport.SHOWOUTPUT(TRUE)
ELSE
CurrReport.SHOWOUTPUT(FALSE);
END;
END;
How can I transfer this customization to Navision 2015?
Thanks in advance
under sections of report - integer Body 2 - Presection
IF CurrReport.SHOWOUTPUT THEN BEGIN
IF ("G/L Account"."Balance at Date"=0) THEN BEGIN
IF ("G/L Account"."Balance at Date" <> "G/L Account"."Net Change") THEN
CurrReport.SHOWOUTPUT(TRUE)
ELSE
CurrReport.SHOWOUTPUT(FALSE);
END;
END;
How can I transfer this customization to Navision 2015?
Thanks in advance
0
Best Answer
-
Hi,
In NAV2013 and later, the equivalent of SHOWOUTPUT on sections is controlled in the report layout. One way to do this is create a variable in your report, and set the value in the dataitem that creates the line similar to what is in the Section code now, e.g. create a variable HideBalance (type boolean), then:IF ("G/L Account"."Balance at Date"=0) THEN BEGIN IF ("G/L Account"."Balance at Date" <> "G/L Account"."Net Change") THEN HideBalance := FALSE ELSE HideBalance := TRUE; END;
Note the TRUE/FALSE is "opposite" of SHOWOUTPUT, i.e. if TRUE, it will hide, if FALSE, it will show (see below)
Then, in the Report Layout, you can set the visibility of a line based on this value - it depends on which RDLC report editor you use. If you are using Report Builder (the free "built-in" editor that comes with NAV), right-click on the very left of the row you want to show/suppress in the little box with 3 parallel lines and choose "Visibility" and click on the "fx" under "Show or hide based on an expression"
On report 10022, most of them will already have an expression, but you can add to it or replace it. The syntax is:=Fields!HideBalance.Value
If there is already an expression, you can add to it, e.g. here's one from the NAV2016 version of report 10022 for DescriptionLine2 (the one with 4 columns):=Not(Last(Fields!IntegerBody9Condition.Value, "table2_Group_GLAccount"))
If you wanted to additionally hide/display with your code, you could add it, e.g.=(Not(Last(Fields!IntegerBody9Condition.Value, "table2_Group_GLAccount"))) OR (Fields!HideBalance.Value)
There are many options for doing this - this is only one idea. I'm sure there are others out there.
Good luck!
RonRon1
Answers
-
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi,
In NAV2013 and later, the equivalent of SHOWOUTPUT on sections is controlled in the report layout. One way to do this is create a variable in your report, and set the value in the dataitem that creates the line similar to what is in the Section code now, e.g. create a variable HideBalance (type boolean), then:IF ("G/L Account"."Balance at Date"=0) THEN BEGIN IF ("G/L Account"."Balance at Date" <> "G/L Account"."Net Change") THEN HideBalance := FALSE ELSE HideBalance := TRUE; END;
Note the TRUE/FALSE is "opposite" of SHOWOUTPUT, i.e. if TRUE, it will hide, if FALSE, it will show (see below)
Then, in the Report Layout, you can set the visibility of a line based on this value - it depends on which RDLC report editor you use. If you are using Report Builder (the free "built-in" editor that comes with NAV), right-click on the very left of the row you want to show/suppress in the little box with 3 parallel lines and choose "Visibility" and click on the "fx" under "Show or hide based on an expression"
On report 10022, most of them will already have an expression, but you can add to it or replace it. The syntax is:=Fields!HideBalance.Value
If there is already an expression, you can add to it, e.g. here's one from the NAV2016 version of report 10022 for DescriptionLine2 (the one with 4 columns):=Not(Last(Fields!IntegerBody9Condition.Value, "table2_Group_GLAccount"))
If you wanted to additionally hide/display with your code, you could add it, e.g.=(Not(Last(Fields!IntegerBody9Condition.Value, "table2_Group_GLAccount"))) OR (Fields!HideBalance.Value)
There are many options for doing this - this is only one idea. I'm sure there are others out there.
Good luck!
RonRon1 -
Thank you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions