Subreport problem

G

Guest

I am building a Profit and loss report which list the accounts that are part
of a sub total. I cannot run one report since some of the subtotals are then
calculated by a text box. For example: sub total salaries + sub total G&A are
summed up to a higher level.

What I did is building two subreports which are the same except for the fact
that one queries salaries and the other G&A. I then inserted them to the
"main"
report and with a text box got the subtotal for each one of them. Then I add
a text box which adds salaries+G&A into one line.

The problem is that if I need to make a change, say, adding a variance
field, I will have to do it 10 times. Since this is just one P&L report out
of many that I need to build, I was wondering if there's a way to make this
process better and faster.

Thanks in advance for your help,

Arnon
 
P

Pat Hartman\(MVP\)

Add a new column to the table. Call it GroupingCode. Use it to control
which types get summed.
 
G

Guest

Thanks for your answer.

Can I use just one sub report then, to what section of the subreport should
I add the groupingCode field. Does it mean that in the main report I paste
the same subreport 10 times (instead of 10 different subreports like I am
doing now, which is a hassle)? If yes, how do tell for each one of the 10
pastes which groupingCode to take?

Again, thanks in advance

Arnon
 
P

Pat Hartman\(MVP\)

You would use only a single subreport. The subreport would have a group
heading and so it would automatically break after each change in the group
code.
 
G

Guest

After doing it I get detail of accounts then the sub total of the account
category. So let's say salaries accounts+Sub-total salaries, then Direct cost
accounts+sub-total direct cost. What I would like to have is after the
sub-total for direct cost add a line that add the two sub-totals together. Is
that possible to do using just onw report, if yes then how. Because what I
have done using the example above is creating two sub-reports, one for
salaries and the other for direct cost, pasted both into the main report and
then added the line which adds the two together. I cannot seem to understand
how to add those lines using just one report.

Thanks,

Arnon
 
P

Pat Hartman\(MVP\)

Put controls in the report footers of each subreport that sum the amounts.
Then add a control to the main report that references the subreport.

=Nz(Subreport1.SumField,0) + Nz(Subreport2.SumField,0)
 
G

Guest

So, based on your answer, there is no way of doing this using just one
subreport instead of ten, correct?

Arnon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top