Show field and label only if value is > 0 in report

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

Not Answered This post has 0 verified solutions | 12 Replies | 1 Follower

Male
19 Posts
190 Points
Joined: 2012-10-25
Last Online:
2013-1-16 10:15
Location: chennai india
shyamkumar posted on 2012-10-25 8:59

hi am new to navision,

i have one requirement, in sales invoice report 

tax text field and label field should be visible only if the value is greater then zero..

pls help me.. :thumbsup:

All Replies

Male
2,231 Posts
32,870 Points
Joined: 2006-4-10
Last Online:
2013-5-25 6:52
Location: Pune India
Moderator
Amol replied on 2012-10-25 9:41

Are you using RTC report or classic Report ?

-Amol

http://dynamicsuser.net/blogs/amol

Don't forget to  the post(s) that solved your problem

Male
12 Posts
90 Points
Joined: 2010-3-3
Last Online:
2012-11-2 10:33
Location: Bangalore,India
Raj replied on 2012-10-25 10:08

Hi Shyam,

If you are using classic client report then you have to create two more sections to show the text field and lable field based on condition using CurrReport.showoutput(value > 0).

If you are using RTC report then you can define the expression on property of the field and label.

Male
19 Posts
190 Points
Joined: 2012-10-25
Last Online:
2013-1-16 10:15
Location: chennai india
shyamkumar replied on 2012-10-25 12:17

classic report only . if field has some value.. it should not visible(both label and textbox)

Male
2,231 Posts
32,870 Points
Joined: 2006-4-10
Last Online:
2013-5-25 6:52
Location: Pune India
Moderator
Amol replied on 2012-10-25 12:37

On Section you can write

IF <REC>.<Field Name/Varialbe Name>='' THEN

 CurrReport.SHOWOUTPUT:=FALSE;

-Amol

http://dynamicsuser.net/blogs/amol

Don't forget to  the post(s) that solved your problem

Male
19 Posts
190 Points
Joined: 2012-10-25
Last Online:
2013-1-16 10:15
Location: chennai india
shyamkumar replied on 2012-10-25 13:16

value or expression is expected... it seems like simply error but am new to NAV pls help me.

Male
19 Posts
190 Points
Joined: 2012-10-25
Last Online:
2013-1-16 10:15
Location: chennai india
shyamkumar replied on 2012-10-25 13:23

whole section becomes hidden.. i just want that particular field text box and label should not visible if value is zero.

 

i have given like this

IF RecSalesInvLine."Line Discount Amount" = 0 THEN

 

 CurrReport.SHOWOUTPUT:=FALSE;

Male
2,231 Posts
32,870 Points
Joined: 2006-4-10
Last Online:
2013-5-25 6:52
Location: Pune India
Moderator
Amol replied on 2012-10-25 13:46

Then you need to do what Raj is suggested..

-Amol

http://dynamicsuser.net/blogs/amol

Don't forget to  the post(s) that solved your problem

Male
19 Posts
190 Points
Joined: 2012-10-25
Last Online:
2013-1-16 10:15
Location: chennai india
shyamkumar replied on 2012-10-25 14:37

see this is whole section in this if sales discount value shows zero , then both field and label 

should not be visible (complete row) 


Male
12 Posts
90 Points
Joined: 2010-3-3
Last Online:
2012-11-2 10:33
Location: Bangalore,India
Raj replied on 2012-10-26 10:14

Create one more section and add this field which you want to hide or show. and on presection() use the code 

if sales discount value > 0 then

  currReport.showoutput(false)

 

Cheers,

Male
19 Posts
190 Points
Joined: 2012-10-25
Last Online:
2013-1-16 10:15
Location: chennai india
shyamkumar replied on 2012-10-26 11:21

working .. wat i have done is created new section placed sales discount label and text box..used the code on presection() .. text box is not visible if value is 0 but label is visible..

label should hide wat to do??

 

Male
100 Posts
1,320 Points
Joined: 2010-9-7
Last Online:
2013-5-23 21:34
Location: Pune, IN
Anil Pardeshi replied on 2012-10-26 11:28

for classic you can use BlankZero property of text box and for RTC you can use Hidden property and pass <Expression> to toggle visibility

-Anil

Don't forget to  the post(s) that solved your problem! 

Male
12 Posts
90 Points
Joined: 2010-3-3
Last Online:
2012-11-2 10:33
Location: Bangalore,India
Raj replied on 2012-10-26 11:40

for the earlier section also u have to either write the code or use the blankzero property suggested by Anil

Page 1 of 1 (13 items) | Get this RSS feed | Bookmark and Share