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

Group footer before details section 1

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
Hello. I'm using CR 9 and Sql Server 2005. I would like to show Groupfooter and then show the details. The reason is I am using running totals to count the records in the details and would like to show this summary at the top of the report followed by the details. By using the running totals in the group header, it does not count the records. I would like to know if there's a workaround other than using a subreport. Thanks.
 
Take one of the detail fields,,,do a summary on it,, and use count instead of sum.. then move it to the group header. See if that works for you
 
No I already tried that. I have a count and sum of a detail fields. But they do not work in the group header.
 
Hi,
What do you mean by But they do not work in the group header ?

A summary of some detail objects (count of occurances or sum of a number) can be placed in that details group header or footer - I did it many times when designing reports because users like to see summaries beside the name of the group.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
go ahead and generate the count,, and have it appear in the group footer.. but then click drag and move it,, it does work. I am using crystal XI,, and I have no problem doing it.
 
Hi, Yes, I shouid have also mentioned letting it first appear in the group footer then dragging it up to the header.
I have used that method since 8.5 ( the version, not the year [smile])

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Ok thanks. I placed it directly in the groupheader which did not count properly. I'll place it in the groupfooter and drag it to the header. Thanks.
 
Inserted summaris will work as long as you don't have row inflation. If you are still having trouble, you should explain how you have set up the running totals if they are returning the correct results. There may be another approach.

-LB
 
This is exactly what I need. We have 10 salary record types, but the powers that be only want people with both base pay rec 1 AND supplement rec 10. I inherited the original program, which listed ALL salary records.

First I changed the SQL to only select those sal rec types.

Then in the detail, I put has 2 formula flags: Job1Flag and Job10Flag. Each is a 0 or 1 depending on which type rec it is.

Next the footer has a running total per Flag. It is perfect.

BUT when dragged to the header, it changes to the running totals of ONLY the FIRST record in the detail.
For example, someone with only a 1 rec, Rec1Flag = 1 amd Rec10Flag = 0, which is no problem.
Someone with each, rec 1 flags are 1 and 0 and rec 10 flags are 0 and 1. The footer flags are then 1 and 1. But when dragged to the header, the flags change to 1 and 0, which is the running total on only the first rec.

THANKS SO MUCH!
 
You should just be inserting summaries on the flags instead of using running totals. Let's say your flag formulas look like this:

if {table.paytype} = "base pay" then 1

Place the formula in the detail section->right click->insert summary->sum (not count) and drag the result to the group header. Repeat for the other flag.

But if you are trying to return only those employees with both records, you could simply go to report->selection formula->GROUP and enter:

distinctcount({table.paytype},{table.employee}) > 1

...assuming you have a field that returns "base pay" and "supplemental" or the equivalent, and that these are the only type of records you are allowing in the record selection formula.

-LB
 
PERFECT !!
Oh, man! Lb, how did you get to know so much ?!?!?!?
You ALWAYS have the right answer and answer so timely!

THANKS SO MUCH!!!
I just hope that someday I'll be able to be helpful to someone.
THANKS AGAIN!!!!!!
 
HELLO! Guess who, again?
Now they want only those with BOTH pay types AND if the CostCenter portion of the General Ledger numbers are different between the rec-1s and rec-10s (GLCctr := Mid ( {Command.GLACCT}, 21, 4 ).
I created (my FIRST!) crosstab and each employee's looks great. For example, someone with rec-1 GLNo 116 and rec-10 GL 182,

| 1 | 10
----------------------
| |
116 | 1 | 0
| |
----------------------
| |
182 | 0 | 1
| |


If the Job1 count > 0 and the Job10 count > 0, it is ok and needs to be bypassed/suppressed. Else, printed

I thought it could be checked in the Group-Selection tab , but I can't get it right.
When I tried GridValueAt (GLCctr, JobNo, 0)
it highlighted GridValueAt and said "a number, currency, boolean, date, etc is expected". Have tried it several ways but am just spinning my wheels (like usual).

PLEASE HELP!
THANKS SO MUCH- AGAIN!
 
I think you are saying two opposite things--that they want 1) to see the employee if BOTH jobs have values <> 0 and the GlCtr is different; and 2) they you want to suppress the employee if they have a value in BOTH jobs. Which is it?

-LB
 
Sorry. No 1 - both. 2 diff sal recs (1 and 10) AND if each rec's corresponding GL Cctr nos are different. The info is in different tables- a salary table and a GL table. They are linked by Emp No and Sal No (1 or 10). There can be multiple GL recs per sal type - ie, a teacher can be at 1 school Mon-Wed-Fri and another Tue-Thur, having 2 GL recs. ie, a sal rec-1, sal rec-10, 2 GL rec-1s and at least 1 GL rec-10. (can be either 1-to-1 or 1-to-many)
THANKS !!
 
Why are you trying to use a crosstab for this?

I'm having trouble following your last post--please try to write in a less abbreviated form so it is easier to decipher. I can't quite see what the user is looking for. If each salary type can have multiple GL records, then what would constitute two different GL records between the two salary types? Please show some sample data that illustrates what the data looks like in this instance at the detail level (not in a crosstab) and what the users would expect to see.

-LB
 
How can I send a file- dont have a url for the attachment space below?

Is there a way to access each cell in the crosstab?

THANKS
 
You can use the box.net upload by clicking on the link below--but I wasn't really asking for that. Can't you just type in some sample data of the relevant fields for a few rows?

Again, please explain why you think a crosstab is the answer. You can use gridrowcolumnvalue() for both column and row, I guess, to define a cell, but how would this help you? I like crosstabs, but this doesn't seem the way to go here.

-LB
 
OK. Teacher works in 3 schools. Mon-Tue at school A, Wed-Thurs at school B and Fri at school C.
So she has 1 primary salary job record Rec-1
And she has tenure so she has a supplemental salary job record Rec-10

For primary job Rec-1, there are 3 Corresponding General Ledger records with Rec No as key)
General Ledger Rec1 School A with GL costcenter 22 (pays 40% of base salary)
General Ledger Rec1 School B with GL costcenter 168 (pays 40% of base salary)
General Ledger Rec1 School C with GL costcenter 250 (pays 20% of base salary)

For tenure job Rec-10, there is a Corresponding General Ledger record Rec-10
It still contains last years' school School Z with GL costcenter 333 (in theory it could also have 3 different records)

How to check if each Rec-10 CostCenter is the same as any Rec-1 CostCenter?

THANKS!
Frances

 
Using the following sample data, what would you want to see for results:

Empl Rec GL
1 1 22
1 1 168
1 1 250
1 10 22
1 10 168
1 10 333

2 1 22
2 1 168
2 1 250
2 10 22
2 10 168
2 10 250

3 1 22
3 1 168
3 1 250
3 10 40
3 10 89

In your last post you said you wanted to see if any were the same, while in your earlier post, you said you wanted to see if any were different.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top