View Full Version : Calculations required in report's recordset


RichO
07-06-2004, 05:08 PM
Through a search I found a thread where Pat Hartman had stated that you may be able to assign an open recordset to a report, however she did not go into detail as to how to do it.

I have a continuous report based on a union query that may at times require manipulation to one or more of the records and I am looking for a logical way to work with the recordset prior to the opening of the report. In the past I have done this by writing the recordset to a temporary table and running a report on that table, but this situation is more involved and I'm trying to avoid bloating the database if possible.

Does anyone have information on this type of application?

Thanks

WayneRyan
07-06-2004, 07:11 PM
Hi RichO,

What kind of manipulation on the recordset?

Wayne

RichO
07-06-2004, 07:43 PM
Basically, each record in the jobs table contains a start date and an end date to specify the duration of the job contract. 90% of all jobs are single day contracts. In our weekly report which itemizes the jobs by day, multiple day jobs show up once for each day they run (which is what we want) but the total price shows up on each date as well and it throws the report's totals off.

What I want is for multiple day jobs to show a price of $0 on all days except for the end date where the actual price would show.

You know, just as I finished typing the above paragraph something hit me and I'm thinking my brain has been on vacation all day long. I can simply put IIf([JobDate]=[JobEndDate], [ContractPrice], 0) in the price text box and that will fix it. I scratched my head for an hour on this today so I guess you could say my brain didn't want to come back to work after a 4 day weekend. :o

WayneRyan
07-06-2004, 08:59 PM
RichO,

I think I'd use an Iif statement ...

see ya,
Wayne