Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

in Function in crystal report

Status
Not open for further replies.

bharathi228

Programmer
Feb 12, 2009
12
hi how to write formula for this query

select hour from table where status in('SVC')

how to write this in crystal report using formula field.

pls anyone help
 
YOu just add the table to Crystal.

In select expert set StatusField = 'SVC'

Add Hour field to details and click run report.

Ian
 
hello

iam having status,parameter name,hours as fileds in my table

my report is grouping with parameter name

iam displaying parameter name wise status,hours in every group.
iam calculating percentage for hours.

its working fine.

my problem is

in report footer i want to display the percentage of status ('SVC')


in sqlquery

select hours from table where status in ('SVC')
 
YOu have posted this twice!

Create a formula
@SVC

If {StatusField} = 'SVC' then {Hoursfield} else 0

YOu can the sumarise this in report footer

In report footer place this formula

@SVC%

If Sum({hoursfield} = 0then 0 else
sum({@svc}) % Sum({hoursfield}

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top