How to step Multiple sub-reports

  • Thread starter Programmer - wannaB
  • Start date
P

Programmer - wannaB

I hope I can explain this clearly enough.
I have 5 sub-reports in a sub-report of the main report. Just dealing with
the sub and 5 sub-subs. Each of these 5 subs are identical they are side by
side and should report historical info based on the most recent year
available. If there is data for 2008, the sub1 displays 2008 data, sub2
should report 2007, sub3 – 2006…. You get the point. Each query that
supports a sub is written to retrieve 2 years of data, and sort descending.
So, if there is 2008 data everything looks fine, but you know what happens if
there is no data for 2008, that’s right I get 2 columns of data for 2007.
How can I get the sub2 – 5 reports to “step or index†their display based on
the results of sub1 ??
 
S

Steve Schapel

Programmer,

On the face of what you have told us so for, it would appear that using
subreports here is not the most desirable approach. In fact, subreports
are seldom called for. I suggest you could investigate the use of the
report's Sorting & Grouping facitily to divide your data into year-based
groups. Or, it also seems that basing the report on a Crosstab Query
would work well in your example.
 
W

WANNABE

Well, this is an inherited report, and I'm just looking to modify it not
redesign it.
I have started on some code to apply and set the filter for each report, and
this
might be a solution, but I am open to improvements and suggestions, but not
any that require a complete rebuild.
I have posted a question with the subject "VBA - On Error Resume Next"
about the code I'm using.
Thanks
==================================================
Programmer,

On the face of what you have told us so for, it would appear that using
subreports here is not the most desirable approach. In fact, subreports
are seldom called for. I suggest you could investigate the use of the
report's Sorting & Grouping facitily to divide your data into year-based
groups. Or, it also seems that basing the report on a Crosstab Query
would work well in your example.
 

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