Display value from code in subreport

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The database I'm working with is really messy with entire tables containing
redundent info all over the places and a lot of code to glue things together.
That being said, the thing monster works and it's not worth re-doing.
Here's my trouble.

In my subreport (detail section) I have:
Item/Service: units: cost/unit:
The report footer contains the total cost (cost/item * units). I would like
to show another value in the report footer that reflects the total number of
hours worked. To do this, I have created some code that loops through the
same recordset as my subreport and, depending on the value of item/service,
it will assign it a multiplier (like 8, 30, 60 etc) and then determine the
total number of hours spent by keeping a running sum of the (multiplier) *
(the value of 'unit').

How do I display this value??? I can run my code in the subreport, in the
main report or even outside of the report altogether. I just don't know how
to show this value inside the subreport (preferably in the report footer
section of the sub report).
 
Hafeez:

The following KB article explains how to reference controls on a subreport.
If this does not help you, maybe you can explain in more detail what you are
looking for.

http://support.microsoft.com/default.aspx?scid=kb;en-us;209099

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


The database I'm working with is really messy with entire tables containing
redundent info all over the places and a lot of code to glue things
together.
That being said, the thing monster works and it's not worth re-doing.
Here's my trouble.

In my subreport (detail section) I have:
Item/Service: units: cost/unit:
The report footer contains the total cost (cost/item * units). I would like
to show another value in the report footer that reflects the total number of
hours worked. To do this, I have created some code that loops through the
same recordset as my subreport and, depending on the value of item/service,
it will assign it a multiplier (like 8, 30, 60 etc) and then determine the
total number of hours spent by keeping a running sum of the (multiplier) *
(the value of 'unit').

How do I display this value??? I can run my code in the subreport, in the
main report or even outside of the report altogether. I just don't know how
to show this value inside the subreport (preferably in the report footer
section of the sub report).
 
Back
Top