473,473 Members | 1,489 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

printing two reports together

I have a database for my students' grades. A grade sheet is opened via
a form in which you select which student(s) you want to see. I have a
few different types of grade sheet reports. If I want to print out 2
reports together, is there a way do it besides for docmd.openreport...
two times? Say I want grade sheets for 5 students. The above method
opens two separate reports, 5 pages each, and then I have to collate
them. Can I get both reports for each student to come out together?
(without, of course, designing a new report that integrates two others)
Thanks

Nov 14 '06 #1
1 2164

Jane wrote:
I have a database for my students' grades. A grade sheet is opened via
a form in which you select which student(s) you want to see. I have a
few different types of grade sheet reports. If I want to print out 2
reports together, is there a way do it besides for docmd.openreport...
two times? Say I want grade sheets for 5 students. The above method
opens two separate reports, 5 pages each, and then I have to collate
them. Can I get both reports for each student to come out together?
(without, of course, designing a new report that integrates two others)
Thanks
You should be able to filter each report to print a grade sheet for
only a specified student by specifying a where clause on the
docmd.openreport command, e.g.

docmd.openreport "rptGradeSheet_1",acViewNormal,,"StudentID=" &
intStudentID
docmd.openreport "rptGradeSheet_2",acViewNormal,,"StudentID=" &
intStudentID

where 'intStudentID' is a single student ID.

If you loop on each student and print each report in this fashion it
will print out the grade sheets in order by student. For example, if
you have a table of students called tblStudents and the student ID
field is called StudentID you could print all of the grade sheets as
follows:

dim rst as recordset

set rst = currentdb.openrecordset("tblStudents")

do until rst.eof
docmd.openreport "rptGradeSheet_1",acViewNormal,,"StudentID=" &
rst!StudentID
docmd.openreport "rptGradeSheet_2",acViewNormal,,"StudentID=" &
rst!StudentID
...
docmd.openreport "rptGradeSheet_n",acViewNormal,,"StudentID=" &
rst!StudentID
rst.movenext
loop

Bruce

Nov 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Josh Nikle | last post by:
I have a subreport that displays the addresses of suppliers. Its source table has fields for the name, street, city/state, and ZIP code for easier querying. However, for display purposes, I put...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
3
by: Chrisitiaan | last post by:
Hi, I want to develop a 'truly' object oriented application, that is, my business logic objects handle the business logic (of course) and the persistence to a MS SQL server database. The user...
1
by: phil cunningham | last post by:
Hi there We have a CAD application written in C# that consists of a series of shapes. We need to product a range of reports for a range of different paper sizes (letter size to 36" paper). ...
0
by: Ann | last post by:
I have a C# application that uses PrintDocument and PrintPage to draw reports. Now I need to integrate a tax form printing from a legacy VC++ DLL into the C# application. One of the important...
2
by: Vinayaka | last post by:
I am using ASP.Net and .net 1.1 I have created some web based report which will be displayed in ASPX page and user has to select the browser File Print to take print outs. Requirement for all...
0
by: John Smith | last post by:
Hello, I have 7 different crystal reports that need to be collated. Since I want to end up with a page of each (which all together make a single report), I created a blank main report and then...
4
by: MLH | last post by:
How do I ensure my reports are being printed in max resolution of 1200dpi ? That is, can Access control the setting?
1
by: pusparaj | last post by:
I had developed an application using MS Access 2003 and in my reports I have no problem whether viewing or printing it in one page from my PC or Notebook. Also no problem when I opened this...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.