mibuso.com

Microsoft Business Solutions online community
It is currently Fri Oct 24, 2014 10:34 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Display field based on Status on Report
PostPosted: Fri Jun 22, 2012 11:42 am 
Offline

Joined: Thu Dec 16, 2010 8:11 am
Posts: 97
Country: Bangladesh (bd)
Hi all,

I have a report based on Sales Shipment Header and Sales Shipment Line.

I have defined a boolean field in the Sales Shipment Header namely Status.

IF Status = TRUE THEN
display the variable field (the description from item table)
else do not display it

Please help me.

Thanks
Liizz


Top
 Profile E-mail  
 
 Post subject: Re: Display field based on Status on Report
PostPosted: Fri Jun 22, 2012 11:49 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4602
Location: Hyderabad
Country: India (in)
you mean the caption also or only the data?

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav


Top
 Profile  
 
 Post subject: Re: Display field based on Status on Report
PostPosted: Fri Jun 22, 2012 11:54 am 
Offline

Joined: Tue Dec 14, 2010 10:49 am
Posts: 79
Country: Mauritius (mu)
Hello,

First you have to get the Item Description from the Item Table.
Then assign it to an array.
Then using your condition,it should look like that :


If status= TRUE then
array[1]:=item.description
else
array[1] :=item.description;


Top
 Profile E-mail  
 
 Post subject: Re: Display field based on Status on Report
PostPosted: Fri Jun 22, 2012 11:57 am 
Offline

Joined: Fri May 18, 2012 3:04 pm
Posts: 148
Location: Armenia, Quindio
Country: Colombia (co)
Make a variable ItemDesc, put this in the section of your report and then use this code:

Code: Select all
If Status then
  ItemDesc := Item.Description
else
  ItemDesc := '';

_________________
Gerry Kistler
KCP Consultores


Top
 Profile E-mail  
 
 Post subject: Re: Display field based on Status on Report
PostPosted: Fri Jun 22, 2012 11:58 am 
Offline

Joined: Wed Mar 19, 2008 9:08 am
Posts: 976
Location: XYZ
IF Status THEN
yourVariable := Record.Field
ELSE
yourVariable :='';

Or

If you are using a print section for Report then use the following code sample in OnPreSection() trigger:

CurrReport.SHOWOUTPUT(Status)

_________________
Now or Never


Top
 Profile E-mail  
 
 Post subject: Re: Display field based on Status on Report
PostPosted: Fri Jun 22, 2012 12:07 pm 
Offline

Joined: Fri Sep 25, 2009 6:33 am
Posts: 49
Location: Mumbai, India
Country: India (in)
imclever1205 wrote:
Hello,

First you have to get the Item Description from the Item Table.
Then assign it to an array.
Then using your condition,it should look like that :


If status= TRUE then
array[1]:=item.description
else
array[1] :=item.description;



No need to create array, simple variable will do as explained by gerrykistler.
_______________
Regards,
Faisal Bukhari.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: