Avatar of TetraSA
TetraSAFlag for Sweden

asked on 

Hide -Unhide fields based on criteria

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

Crystal Reports

Avatar of undefined
Last Comment
Mike McCracken
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of Mike McCracken
Mike McCracken

That should work.

Are you doing any summaries or totals of the hours?

mlmcc
Avatar of TetraSA
TetraSA
Flag of Sweden image

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Crystal Reports
Crystal Reports

Crystal Reports is a business intelligence application from SAP SE. It is used to graphically design data connections and report layouts from a wide range of data sources including Excel spreadsheets, Oracle, SQL Server databases and Access databases, BusinessObjects Enterprise business views, and local file-system information. Report designers can place fields from these sources on the report design surface, and can also deploy them in custom formulas (using either BASIC or Crystal's own syntax), which are then placed on the design surface. Crystal Reports also supports subreports, graphing, and a limited amount of GIS functionality.

36K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo