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

Subreports

Status
Not open for further replies.

sync123

Programmer
Jul 20, 2003
32
0
0
US
Hi,

I have a table that contains the following fields
----------------------------------------------------------
name actual budget summary sort
-----------------------------------------------------------'m of h' 10.0 20.0 'revenue' 100
'donations' 18.0 80.0 'revenue' 200

'Up Salaries' 23.0 44.0 'sal and benefits' 500
'Mos salaries' 47.0 88.0 'sal and benefits' 600

'Food' 989.0 789.0 'xy_other supplies' 800
-----------------------------------------------------------

Now I want to create a report based on this table.
The report should look something like this
--------------------------------------
actual budget
Revenue:
'm of h' 10.0 20.0
'donations' 18.0 80.0
----------------------------
Total Revenue 28.0 100.0
----------------------------

Expenses:

'up salaries' 23.0 44.0
'mos salaries' 47.0 88.0
---------------------------------
Total sal and benefits 70.0 132
--------------------------------

'food' 989.0 789.0

-----------------------------------
Total xy_other supplies 989.0 789.0
------------------------------------

-----------------------------------
Total expense 1059 921.0
------------------------------------

Revenue-expense (1031) (821)

-------------------------------------

So the report is divided into 2 parts:

-revenue and expense.

-The report is grouped on the summary field
-The 'sal and benefits' ,'xy_other supplies' summary field fall under expense and these values make up total expense.
-While 'revenue' summary field fall under revenue
-Also within each group records are ordered on the sort field.


My main question is that
since 'salaries and benefits' and 'xy_other supplies' fall under expense and I need to find out the total expense in my report ,would I need to find out values that fall under revenue in my main report and then have a subreport where I would find out the values for expense values? Or can this be done without using a subreport.

Since the table that my query is based on is dynamically created would it work if I created another field which was either revenue or expense.

Which is the easiest way to get around this problem?


Thanks.
sync123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top