[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Hide -Unhide fields based on criteria

Posted on 2004-03-30
6
Medium Priority
?
367 Views
Last Modified: 2011-10-03
hi,
I am using Crystal Reports 8.0 . I have a report that displays the Time report of employees.
The report contains the following fields
TIME IN ----- TIME OUT------Day -------Overtime(in hrs)-------Late Arrival-------Remarks

This is read from a table that conatins the fields that have to be dispalyed.
IF the employee is absent or on annual leave the TIME IN field will contain the day on which the employee was absent and

the fields will be empty. In the report I want to display ABSENT or ANNUAL LEAVE in place of the TIME OUT

,OVERTIME,LATE ARRIVAL  i.e. I want to hide these fields and display a text field that displays "ABSENT" or "ANNUAL

LEAVE". A field in the record specifies whether it is a regular IN /OUT record or is it "ABSENT or "ANNUAL LEAVE"

So the issue is , how can I hide fields in Detail part of the report based on a field value.

Thanks

0
Comment
Question by:TetraSA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 10714458
Hello TetraSA,

I am assuming here that the field is called Status and contains 1 for in/out, 2 for Absent and 3 for Leave.

The TimeOut column must be a formula field:

if {mytable.Status} = 1 then
totext({myTable.TimeOut}
else if {mytable.Status} = 2 then
"Absent"
else
"Annual Leave"


For each of the other fields you can use a simple conditional suppression formula in the field format.

{MyTable.Status} <>1


Pete
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 10715683
That should work.

Are you doing any summaries or totals of the hours?

mlmcc
0
 
LVL 1

Author Comment

by:TetraSA
ID: 10721271
hi,
Actually when it is Absent or Annual Leave the field has to span from TIME OUT to Late Arrival(i.e. it should be wide to cover the other fileds)  . So is there a way I can change the Width of field in the above IF statements.

Yes I am using Summaries of the overtime hours.  But in the overtime there are 2 categories. 150% and 200%. There is a field in the table that specifies whether the Overtime is 150 or 200. How can I get totals for these 2 categories seperately.
Keeping in mind that the report will contain timereports of more than one employee , so i am assuming the total has to be in the group footer.

Thanks
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 200 total points
ID: 10729279
In that case I think I woud have the normal time fields use conditional suppression
Select the field
Click FORMAT --> FIELD
Select the COMMON TAB (CR7)
Click the Formula field for SUPPRESS
{mytable.Status} <> 1

Add a text box to the report. Insert the text as
- - - - A N N U A L   L E A V E - - - -
Conditionally suppress
{mytable.Status} <> 2

Add a text box to the report. Insert the text as
-  -  -  -   A  B  S  E  N  T  -  -  -  -
Conditionally suppress
{mytable.Status} <> 3

The 2 text boxes should be placed on top of the fields in question.

mlmcc
 
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question