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

Avoiding running endless sub-reports

Status
Not open for further replies.

Dond12

Technical User
May 3, 2001
57
US
Here is my problem: I have a main table that contains lots of information on grant applications. Linked to this table is another table that links to the first table by a unique 6-digit identifier number and contains about 50 keyword fields. Each keyword field contains either a "1" or a "0" -- and any linked grant application can have a lot of different keywords attached to it.

When I run a report listing the identification numbers and organization names for one group of keywords (e.g., the 14 different kinds of project purposes), I have no choice by to run a main report that simply runs 14 sub-reports. In the printed output, each subreport looks like a group, with a header and a bunch of applications listed.

The same is true if I run a report showing the applications from the 13 different types of organizations (e.g., community-based, economic development, k12 schools, museums, etc.) One report, 13 time-consuming sub-reports.

Is there a way to get around this? At the moment, I have five shell reports and something like 50 subreports defined. Is there some way to set up a formula or an array in the main report that simply goes through a list of values and runs a subreport in which the principle of selection is (valueX=1)? It seems awfully wasteful to define 50 or more sub-reports, when the only difference among them is that the selection criterion is (valueX=1).

Do I have a choice? I remember from earlier database management programs that there was some function called FOREACH, and it would run a procedure, substituting each value listed under the FOREACH statement until it had run out of values. Does this work in SCR?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top