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

Report formatting/calculations in detail_format

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
Hi,

I have a really strange problem (or at least I beleive it 2b).

I have recently taken over a database, and one particular report displays a weeks worth of work per person. Eg, first page will display 7 days worth of work for say Joe Bloggs. The details will be hours worked for sunday, hours worked for monday etc The data in the detail for joe bloggs is calculated in the event procedure "Detail_Format" and displayed in the report footer. So for first record in detail, Sunday, calcs will be worked out, then for saturday etc etc, so there will be seven recs for Joe Bloggs. In the report footer, the sum for all seven days is displayed. Personally I have never used the Detail_format event sub. I will always use calculated fields. Anyway, if someone logs into database as Manager, then he/she will see everything, and thereofore there will be NO FILTER on this report. If I step through the code in the Detail_Format when the report is opened, it does the calculations for each record TWICE.
If I log in as a particular DEPOT, the the reports FILTER=TRUE, and the filter is set to the DEPOT, and the report calculates correctly??????
Dunno if I have explained this very well, but it has really baffled me. Is there a reason why someone would NEED to add code the formatting events of a report, rather than create calculated fields?
Pls let me know if more detail is needed.

Cheers

Nick (Everton Rool OK!)
 
This will not cure the problem, but may quickly help the look of the report.
Try setting the Hide Duplicates property of these fields to Yes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top