hiding rows on demand via checkbox

dyn45
Member Posts: 67
hi to all,
I am working on report 113 and I have to do next:
I need to hide two rows, one of them is Profit and other is Profit %.
on Request Form I need a checkbox (done),
when I click on it, and then, click on Preview, those two rows should be hidden.
please, any clue how I should do that
I am working on report 113 and I have to do next:
I need to hide two rows, one of them is Profit and other is Profit %.
on Request Form I need a checkbox (done),
when I click on it, and then, click on Preview, those two rows should be hidden.
please, any clue how I should do that
0
Answers
-
Hi Milosh,
you can use the CurrReport.Showoutput -Function.
In the section you want to hide you write:
CurrReport.Showoutput(yourRequestform-Variable);
Greets0 -
Hi Milosh
Make the heading Lables text boxes and your profit and % blank when zero.
Put in the following codeInteger - OnAfterGetRecord() IF Number = 1 THEN ValueEntryBuffer.FIND('-') ELSE ValueEntryBuffer.NEXT; IF Hide THEN BEGIN Profit := 0; ProfitPct := 0; END ELSE BEGIN Profit := ValueEntryBuffer."Sales Amount (Actual)" + ValueEntryBuffer."Cost Amount (Actual)" + ValueEntryBuffer."Cost Amount (Non-Invtbl.)"; IF PrintToExcel AND Item.GET(ValueEntryBuffer."Item No.") THEN BEGIN CalcProfitPct; MakeExcelDataBody; END; END:
Hope this helps
Albert0 -
Thanks but,
I do not think that you understod my problem.
I just want to hide two rows depending on checkbox on my Request Form:
if the checkbox checked than show me whole report without 2 rows Profit and Profit %
or, if not checked, show me complete report with those 2 rows0 -
Hi Milosh
on the Customer Header (5) do the following
Remove Labels Profit and Profit %
Add 2 TextBox with sourceexpr ProfitTxt and ProfitPctTxt
Define as Text variables ProfitTxt and ProfitPctTxt
with the code I gave you earlierProfitTxt := ''; ProfitPctTxt := ''; IF Hide THEN BEGIN Profit := 0; ProfitPct := 0; END ELSE BEGIN ProfitTxt := 'Profit'; ProfitPctTxt := 'Profit %'; Profit := ValueEntryBuffer."Sales Amount (Actual)" + ValueEntryBuffer."Cost Amount (Actual)" + ValueEntryBuffer."Cost Amount (Non-Invtbl.)"; IF PrintToExcel AND Item.GET(ValueEntryBuffer."Item No.") THEN BEGIN CalcProfitPct; MakeExcelDataBody; END; END:
Should sort you out.0 -
Hi to all,
first I wanna thank you for your help, but I solved my problem in the other way:
I made double sections in my report, and I erased 2 rows in them. than in the sections I don't wanna see rows I type this:
OnPreSection()
CurrReport.SHOWOUTPUT(SourceExpr);
and in the sections I do wanna see rows i type this:
OnPreSection()
CurrReport.SHOWOUTPUT(NOT SourceExpr);
simple as that...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