How to: make a IF Statement, working after the 1st Dataitem
mgerhartz
Member Posts: 50
Hi there,
I'm also brand new at working with navision. I want to generate my report and have the following problem: the report shouldn't show lines with a value of Zero. I used this statement:
IF (("gesamt abrechenbar" = 0) OR ("gesamt nicht abrechenbar" = 0)) THEN
CurrReport.SHOWOUTPUT (FALSE);
But the result is, that the report doesn't shows the value of the first dataitem. Does anyone has an idea?
Thanks so much!
P.S.: The rest of the report is working very well.
Markus
I'm also brand new at working with navision. I want to generate my report and have the following problem: the report shouldn't show lines with a value of Zero. I used this statement:
IF (("gesamt abrechenbar" = 0) OR ("gesamt nicht abrechenbar" = 0)) THEN
CurrReport.SHOWOUTPUT (FALSE);
But the result is, that the report doesn't shows the value of the first dataitem. Does anyone has an idea?
Thanks so much!
P.S.: The rest of the report is working very well.
Markus
0
Comments
-
Maybe
ELSE currreport.showoutput(true);
[/code]
Do It Yourself is they key. Standard code might work - your code surely works.0 -
for lazy programmers the not get money for many lines.
CurrReport.SHOWOUTPUT(not (("gesamt abrechenbar" = 0) OR ("gesamt nicht abrechenbar" = 0)));
RegardsDo you make it right, it works too!0 -
Just set the BlankZero property of this field in the report section to YES0
-
But the result is, that the report doesn't shows the value of the first dataitem.
This means you have mulitple dataitems? Like this
Dataitem1
-->DateItem2
if yes then the first dataitem1 has a property called PrintOnlyIfDetail make sure it's set to false.0 -
Hey Guys, thank you for your quick help. But I tried everything and the result wasn't the right one. Maybe I haven't give you enought informations. I just want to skip the codeline for the first datarecord. This statement:
IF gesamt < 1 THEN
CurrReport.SHOWOUTPUT (FALSE);
makes, that the line doesn't display, when the value is less than one. And it works fine, but the first record were also doesn't be displayed and it doesn't matter if the value of "gesamt" is more or less than 1.
That's the reason, why I want to skip the Code for the first record. By the way, this is the DataItem Structure:
Structure
>Leistungsart
>>Zeitaufwand
And the field "gesamt" is part of the "Leistungsart"-Footer.
When I tried to use the following statement:
IF gesamt = 0 THEN
CurrReport.SKIP
ELSE;
I got twice the message: This function works only at the DataItemCode or this function works only at the SectionCode. :-k
Thanks again for your help and have a nice day....
Markus0 -
Here we are! I found it out for myselfe. This is the only short codepart I missed:
IF Tempdaten.FIND('-') THEN BEGIN
IF gesamt = 0 THEN
CurrReport.SHOWOUTPUT(FALSE)
END;
Thanks anyway for your help. Have a great day and byby
markus \:D/0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
