Is it possible to print details horizontally in a report?

G

Guest

I have a report that lists the grades of students. Other than making each
assignment it's own field, is there a way to have Access reflect the records
horizontally?

e.g. Instead of:
A
A
B
A

I'd like it to show the records horizontally:
A A B A
 
G

Guest

There are two ways you can do this. The first is to control the layout as
the report is formatted at runtime with code in the reports module. A much
simpler way, however is to put a multi columned subreport in the detail
section. The parent report can be based on a Students table or on a query
which joins this to other table(s) on which you restrict the students
returned in the query. If the latter include only the student's details in
the query's result table and use a SELECT DISTINCT query so only one row per
student is returned.

The subreport will be based on a query which returns the grades per student.
On the Columns tab of the dialogue opened with File|Page Setup in report
design view set up the subreport with as many columns as will fit across the
page , or that part of the page you want to list the grades on, page and of
an appropriate column width. Set the column layout to 'across then down'.

In the main parent report link the subreport to the parent report on the
unique identifier for each student, such as StudentID.

When the parent report prints the grades for each student will be printed
across the page. If the right margin is reached the next grade for that
student will print below the first one as a second row.

I've posted a demo of both methods at the link below, which uses club
membership data, but the principle is exactly the same:

http://community.netscape.com/n/pfx...yMessages&tsn=1&tid=24271&webtag=ws-msdevapps


Ken Sheridan
Stafford, England
 
G

Guest

Thank you Ken. This will work!

NB

Ken Sheridan said:
There are two ways you can do this. The first is to control the layout as
the report is formatted at runtime with code in the reports module. A much
simpler way, however is to put a multi columned subreport in the detail
section. The parent report can be based on a Students table or on a query
which joins this to other table(s) on which you restrict the students
returned in the query. If the latter include only the student's details in
the query's result table and use a SELECT DISTINCT query so only one row per
student is returned.

The subreport will be based on a query which returns the grades per student.
On the Columns tab of the dialogue opened with File|Page Setup in report
design view set up the subreport with as many columns as will fit across the
page , or that part of the page you want to list the grades on, page and of
an appropriate column width. Set the column layout to 'across then down'.

In the main parent report link the subreport to the parent report on the
unique identifier for each student, such as StudentID.

When the parent report prints the grades for each student will be printed
across the page. If the right margin is reached the next grade for that
student will print below the first one as a second row.

I've posted a demo of both methods at the link below, which uses club
membership data, but the principle is exactly the same:

http://community.netscape.com/n/pfx...yMessages&tsn=1&tid=24271&webtag=ws-msdevapps


Ken Sheridan
Stafford, England
 

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