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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detail and Summary Report

Status
Not open for further replies.

angelana22

Programmer
Mar 31, 2006
14
US
I need to create a daily detail and summary report in one page that will look like this:

Date: 01-01-2007
Employee: 1234

Detail
Payment code Hours
Pay A 3
Pay B 4
Pay A 5

Summary by Pay

Payment code
Pay A 5
Pay B 4

My question is: How can I create this report by NOT having a sub report for summary by pay?

Thanks!
 
Please take a look at your sample. Should we assume you really meant the following?

Payment code
Pay A 8
Pay B 4

If so, insert a gorup on payment code and then right click on hours and insert a sum at the group level.

-LB

 
Sorry, I see that you want both detail and summary. So for the summary, insert a crosstab in the report footer, use paycode as the row, and hours as the summary.

PS. Posting in one place is sufficient. It's better not to tack onto old posts as you did with your other post.

-LB
 
Thanks LB. I'm sorry, the posting on the other place was a mistake.

Ok, my report seems to be more complicated than that... what about this?

Date: 01-01-2007
Employee: 1234

Detail
Payment code Hours Comp
Pay A 3 Yes
Pay B 4 No
Pay A 5 Yes

Summary by Pay

Payment code Comp Hrs Non-Comp Hrs
Pay A 8
Pay B 4

I need to create a report without using a sub-report.

Thanks again!

 
Insert a crosstab in the employee group footer where you use paycode as the row, comp as the column, and hours as the summary. If you want a different title for the comp columns, while in the crosstab expert, select the comp column field->group options->options->customize group name->use a formula->x+2:

if {table.comp} = "YES" then "Comp Hrs" else
"Non-Comp Hrs"

If you don't want zeros to display, select the inner cell->format field->number->customize->suppress if zero.

-LB
 
I have a follow-up question on this...

Based on the formula given above, I should have two columns for Comp Hrs and Non-comp hrs. My question is: Is it possible to have those columns visible eventhough its zero hour?

I want to have this layout in report:

Summary by Pay

Payment code Comp Hrs Non-Comp Hrs
Pay A 8
Pay B 4

My report is currently showing Comp hrs or non-comp when hours > 0. Therefore, there are pages that has these layout

Payment code Comp Hrs
Pay A 8
Pay B

Payment code Non-Comp Hrs
Pay A
Pay B 4

Thanks!
 
Where are you placing this crosstab? It should be in the group footer for employee, NOT in a group based on type of hours.

-LB
 
If you need to show zeros then I think you have to use running totals in the employee group footer. You will need one for each combination of pay and comp/non-comp (four), where you specify the conditions in the evaluation formula, e.g.:

{@paytype} = "Comp" and
{table.paycode} = "Pay A"

Reset on change of employee. Then add text boxes for the column and row labels.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top