variable report

  • Thread starter Thread starter JulieD
  • Start date Start date
J

JulieD

Hi All

i have a main table in the database and 7 related tables, what i would like
to do is create a "details" report that gives me all the information from
the main table and selected information from the related tables
so i would like to have a form where the school is chosen (main table) and a
series of checkboxes where the "extra" information can be chosen or not
(e.g. electoral information / school programs / student demographics /
teacher demographics)
then i would like to create a report / subreport structure that has the main
table information at the top and the selected extra information as
sub-reports.

can this be done?
can anyone provide details on how to approach this.

Regards
JulieD
 
Hi Julie

One approach would be to create the report with 7 subreports in different
sections, and toggle the Visible property of each section in the Open event
of the report.

With the main report open in design view, select the SchoolID 4 times in the
Sorting'n'Grouping box (i.e. enter SchoolID on 4 rows). For each one, set
Group Header and Group Footer to Yes. You now have 8 sections, plus the
detail section. The first section will actually be for the school (main
table). Each other one will contain one of the subreports (and the last one
you don't need). In Report_Open, set the Visible property of Section(i)
depending on the value of the check box on the form.

If that proves to be too inefficient, you may be able to save the report
without anything in the SourceObject of the subreports, and assign the
SourceObject in Report_Open. I don't know if that will work for reports; it
does work with forms, but you have to check that the
LinkMasterFields/LinkChildFields are correctly assigned, and Access merrily
decides to assign whatever it chooses when you set the SourceObject.

Let me know how you go.
 
Back
Top