Printing a range of pages of report

I have a main  form "classes" and two subforms ( students and grades). The classes form is linked to the students subform as one-to-many (by the class ID), whereas students is linked to grades as one-to-many(by the Students ID). I have created
a report that prints the grades for each single student in one page and it works well.  However, i want make another report to print or preview the all students of each class. For example if the Class A has 30 students, then I should have 30 pages, where
each page refer to single student grades. Any help please ??  

However, i want make another report to print or preview the all students of each class.
You only need one report, which by default will return all students, with each on a separate page by setting the ForceNewPage property of the StudentID group footer section to 'After Section'.
To print the report for a single student you can filter it to a selected StudentID by means of the WhereCondition argument of the OpenReport method.  Similarly you can filter it to a selected ClassID to print all students in a selected class.
To select a student or class I'd suggest you create an unbound dialogue form with two combo boxes, cboStudent and cboClass, set up as follows in the case of cboStudent:
RowSource:     SELECT StudentID, FirstName & " " & LastName FROM Students ORDER BY LastName, FirstName;
BoundColumn:   1
ColumnCount:    2
ColumnWidths:  0cm
If your units of measurement are imperial rather than metric Access will automatically convert the unit of the last one to inches.  The important thing is that the dimension is zero to hide the first column.
And for Classes:
RowSource:     SELECT ClassID, Class FROM Classes ORDER BY Class;
BoundColumn:   1
ColumnCount:    2
ColumnWidths:  0cm
In the AfterUpdate event procedure of cboClass clear any selection in cboStudent with:
    Me.cboStudent = Null
Similarly, in the AfterUpdate event procedure of cboStudent clear any selection in cboClass with:
    cboClass = Null
Add a command button to the form and in its Click event procedure put the following code:
Const REPORT_NAME = "YourReportNameGoesHere"
Const MESSAGE_TEXT = "No class or student selected"
Dim strCriteria As String
If Not IsNull(Me.cboClass) Then
    strCriteria = "ClassID = " & Me.cboClass
ElseIf Not IsNull(Me.cboStudent) Then
    strCriteria = "StudentID = " & Me.cboStudent
End If
If Len(strCriteria) > 0 Then
    DoCmd.OpenReport REPORT_NAME, WhereCondition:=strCriteria
Else
    MsgBox MESSAGE_TEXT, vbExclamation, "Invalid Operation"
End If
To print a report you open the dialogue form, select a class or student, and click the button.  You might like to have two buttons on the form, with identical code apart from the following amendment:
    DoCmd.OpenReport REPORT_NAME, View:=acViewPreview, WhereCondition:=strCriteria
so that you can preview the report as well as sending it to a printer.
Ken Sheridan, Stafford, England
Done, Marked as answer.
Many thanks

Similar Messages

  • Reader - Printing a Range of Pages to a New Adobe Document

    I frequently receive multi page documents where I want to forward only a few pages of said document to an email contact. Is it possible to print a range of pages from an existing Adobe document to a new Adobe document using the free reader? I am on a PC with Adobe 8.1.2. OS is Windows Home edition XP SP2.
    Is this feature available as an add on ?
    Thanks in advance,
    Mike

    With Adobe Acrobat it is possible to extract pages.

  • Page -1 of 1 printed on all the pages when report is exported as txt

    We developed all the reports in Crystal Report XI.
    When we export the reports in pdf or word doc the page no at page footer is printed correctly, but wen we export the report in as txt file the "Page -1 of 1" printed on all the pages, is there any issue on Crystal Report regarding this.
    Please provide me the solution for this.

    Hi,
    This is a known issue with crystal report which has been identified earlier, can you verify by printing page number in your report or export the report to a word document and verify whether it prints properly.
    Regards,
    Vinay.

  • BUTTON FOR PRINTING A RANGE OF PAGES

    I need to create a button that prints only a specific range of pages. So far I´ve been using this script:
    >this.print (false, this.pageNum, this.pageNum);
    >// print a file silently
    >this.print({bUI:false,bSilent:true,bShrinkToFit:true});
    But the button is doing nothing. Any help welcome.
    Thanks
    Jav

    First you should look at the click event of the print button for the xfa.host method for printing.
    Also you must know, that "this" doesn't give you the Doc object. In Designer 7 you must use "event.target" to get it. As I think
    event.target.print...
    should run.

  • How do I print a range  of pages

    All of my adobe documents have the print pages button on the print screen.   The button shows  the page numbers for the document.   The box can be clicked and the current numbers deleted but under no  circumstances, whether the document is protected or not, will it allow me  to type any numbers in that box. From the instructions on "printing selected pages,"  I should be able to do this.  What am I doing wrong or how  can I get this feature to work?   (My printer drivers are up to date).   Also, I can click individual pages on the left  to print but cannot select a number of pages and print them.    Is there a way to choose multiple pages and then print from this view?  This has only been a problem since 10 and I have reinstalled the program but no change.

    There is a radio button beside the text box that must be selected first. If this doesnt work, try going into the settings of the printer, sometimes that allows you to make the selection of pages as well.

  • HP CP3525dn will not print a specific range of pages

    Our Color HP Printer model# CP3525dn will not print a range of pages within a MS Word document HELP

    Hi,
    Microsoft has released an Hotfix which should address such an issue.
    Install the Hotfix below and check for any difference:
    http://support.microsoft.com/kb/3000461/en-us
    Please let me know if that help getting the problem resolved.
    Regards
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page, but not all or pages 1-5.  Can this be overcome?

    I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page only, but not all or pages 1-5.  I need to go to the next subsequent page and command to print current page; continuing with this procedure until all pages are printed one at a time. Can this be overcome?

    You can use printPages(1, 5), however I need to know how you print current page.

  • Print write stat at end of all pages in report

    Hi,
    I want to print write stat at end of all pages in report.
    Thanks,
    Asha

    hi ,
    u can use End-of-Page event to print write statement at ever end of the page.
    for Ex:
    Report ztest line-count 8(3).
    start-of selection.
    loop at itab...
    write:/ .........
    endloop.
    end-of-page.
    write:/ "end of page'.
    revert back if any issues.
    reward with points if helpful.
    regards,
    naveen.

  • Printing an extra blank page at last in the report with result!

    Dear Team,
    I have one report  ZFI_KKKKK  i.e working fine with the result.
    The problem is that this report prints an extra blank page in the end of the report.
    It should not print the extra empty page. Itu2019s a bit annoying for some users.
    If you execute and print this and you will get a page with results and a blank page with just the title.
    Any input from your side to rectify the issue?
    Thanks and Regards,
    Sarkar

    Hi,
    change the line size and check.
    vijay Gurav

  • My report is printing half of the page when I print the report Hp psc 1315

    My report is printing half of the page when I print the report in this printer
    Hp psc 1315 all in-one and when the operating system is windows xp , but when
    I run the same report in windows me , and the same printer it is running well
    And my report version is :
    Report Builder 6.0.8.23.0
    ORACLE Server Release 8.0.6.0.0
    Oracle Procedure Builder 6.0.8.20.0
    waiting for your valuable answer .
    Best regards
    Jamil alshaibani

    i would like to now if there is any additional software required for the windows xp and oracle report to solve this problem
    please help
    betst regards
    jamil alshaibani

  • Print part of a range of pages

    I have a .docx document that is 23 pages long but I only want to print 1 or 2 pages from it as a test. In Snow Leopard the print dialog box allowed the selection of which pages with no problem, In Lion, the same dialog box seems to have no effect on page range. When I choose to print from page 1 to 1, the Quick Preview still shows 23 pages, and the print action prepares to print the entire document. Same effect if I specify "current page" or use the Page Range box. I'm using an Epson Stylus Photo 1400 printer with the latest drivers. Any help?

    Dave Sawyer wrote:
    What application are you using?
    *.docx is a MS-Office format.

  • How to print one (or more) page only from multipages report?

    Citations from Report Builder Help:
    To print a report from the Runtime Previewer:
    1. In the Runtime Previewer, click <Page Setup> in the toolbar to verify your printer setup.
    2. Click <Print> in the toolbar.
    3. In the dialog box, type the number of pages and copies you want to print.
    If you ran the report with a DESTYPE of Screen, a warning appears that you should run the report with a DESTYPE of Preview before printing. Preview creates PostScript output, which is typically more desirable for printing bit-mapped reports.
    4. Click OK.
    When I click <Print>, the dialog box is not dispaying and all report pages are sending to printer.

    Hi Al,
    Check out this thread: Sort within Break? I was looking to preserve a basic sort for break purposes, but the same solution should work for keeping one row at the bottom.
    Let me know if you'd like more details.
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Print at Bottom of Page option causing extra page at end of report

    I'm using the option 'Print at Bottom of Page" in Section Expert for some invoices I'm creating.  For some reason it's causing me to have an extra page at the end of the report.  If I unselect this option, the extra page goes away.  I need to be able to have this group footer print at the bottom at the page but not have the extra at the end of the report.  This is the first time I've used this option so maybe I've missed something.  All other sections after the group footer I want printed are suppressed.  Any ideas?

    I guess I didn't have the report footer suppress, I just had it minimized in size.  I suppressed it and it seems to be fine.

  • How do I print the total number of pages in report, like Page 1 of 5?

    Hi
    How do I print the total number of pages in report, like Page 1 of 5?
    thanks,
    kiran.M

    Hi,
    Check for the below code:
    *Declare a variable
    DATA L_PAGE_COUNT(5) TYPE C.
    *Copy this code to the end of program
    *Page count will be printed on each page here
    WRITE SY-PAGNO TO L_PAGE_COUNT LEFT-JUSTIFIED.
    DO SY-PAGNO TIMES.
    READ LINE 1 OF PAGE SY-INDEX.
    REPLACE '-----' WITH L_PAGE_COUNT INTO SY-LISEL.
    MODIFY CURRENT LINE.
    ENDDO.
    TOP-OF-PAGE.
    WRITE: /(70) 'Heading' CENTERED, 70 SY-PAGNO,'of ', '-----'.
    You will find your solution in below thread with code:
    Total Pages in Basic List
    Rgds,
    Shakuntala

  • Saving/Printing all pages of Report developed in Portal....

    Hi friends,
    How can I save a Report developed in Portal as soft file?
    I know there is a feature in Customizing Report to enter the
    File save as Excel and it will try to save file.
    I have 2 questions :
    a) How can I achieve saving the Report as html/ascii/excel file
    when it has say 20000 rows ?.
    (Because always when I run a report on browser it brings data
    when I press "Next" and "previous" buttons.)
    b) If I need to print the Report to printer how can I print all
    pages of Report output?
    Thanks a million for your valuable time.
    Sincerely
    Madhav

    I also noticed there is a Firmware Upgrade Utility out on HP.COM that addresses a few PJL command issues, so it might be worth checking the Firmware versions on your units to see if you have the latest:
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=US&swItem=lj-725...
    Though I work for HP, My posts express MY opinion, and not those of HP.

Maybe you are looking for

  • Mac Windows benefits??

    Okay, I just posted something somewhat similar just before this but I didn't want to put them together for confusion reasons. So I just bought this new MacBook Pro 2 days ago everything new. Then I also bought Windows XP and installed it and it runs

  • Host  string(s) on NT

    How can we find out all the valid host_strings to login to SQL*plus on NT? Tried leaving it as blank and logging in a system/manager, scott/tiger... but neither worked. Please advise ASAP.

  • Outgoing Message Size Limit?

    I realize that in SA or postfix.conf I can limit the size of incoming messages, but can/should I limit the size of outgoing messages? Currently the limit is set at 10 MB in SA and this seems also to be throttling the outgoing message size to 10 MB --

  • How create a Component Usage for a BI Report

    Hi, I am new to CRM and I am trying to Display a BI Report Inside of a CRM WebClient UI, but I cannot find where to create a Component Usage for my BI Report. I have done the following steps: 1. I defined my (BI) report in Customizing for Customer Re

  • One Domain user have problem seeing flash Content.

    Hallo. Im a IT student in a small company (around 100 domain users). We are using windows 7 and the latest Flash version (12.0.0.38). We are using Internet explore 11. All the users in our domain have same rights. But one of them have a flash problem