Results 1 to 3 of 3
  1. #1
    satswid is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    6

    A challenging query on reports(atleast for me). Pls help

    Hi,
    I am very new to this forum as well as MS-Access. I am stuck at the very beginning.. Plz help

    This is my requirement

    I have a student table


    with these columns
    Roll No, Name, Class, Subject, Percentage

    I will create a form where user selects the class and then click "Generate Report".
    I want a class-wise report in this format.

    Header---------------
    Class: xyz
    School: abc

    Detail------------------------------------
    Roll No | Name | Subject | Marks
    001 Student1 Maths 79
    001 Student1 Science 99
    001 Student1 History 99
    002 Student2 Maths 87
    002 Student2 History 88
    002
    003
    003
    003
    004
    etc
    ***
    ***
    ***

    *It will go for multiple pages with same header

    **
    **
    **
    **


    ________________________________________
    Totals
    ----------------------------------------




    Pls help me by providing a sample of this situation. I am really stuck somewhere.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Put label and field for Class in Page Header. Also put the labels for the detail fields in the Page Header.

    If you want to restrict the report to one class, then need to open report filtered to the one class selected. You can use a query as report's RecordSource and set a criteria under the Class field that refers to the control (combobox?) on form as parameter. The syntax would be: Forms!formname!controlname.

    If you want the report to show all classes then use report Grouping & Sorting functionality. I presume is only one school because there is no field in table for school. Create a Group Header in the report on the Class field. Criteria syntax would be: Like Forms!formname!controlname & "*". If combobox is empty, report will open with all classes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    satswid is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    6
    Quote Originally Posted by June7 View Post
    Put label and field for Class in Page Header. Also put the labels for the detail fields in the Page Header.

    If you want to restrict the report to one class, then need to open report filtered to the one class selected. You can use a query as report's RecordSource and set a criteria under the Class field that refers to the control (combobox?) on form as parameter. The syntax would be: Forms!formname!controlname.

    If you want the report to show all classes then use report Grouping & Sorting functionality. I presume is only one school because there is no field in table for school. Create a Group Header in the report on the Class field. Criteria syntax would be: Like Forms!formname!controlname & "*". If combobox is empty, report will open with all classes.
    Thanks a lot

Please reply to this thread with any new information or opinions.

Similar Threads

  1. 3 Reports with 1 Query
    By peshonzi in forum Access
    Replies: 3
    Last Post: 07-09-2011, 03:18 AM
  2. Correct code for challenging dates?
    By thekruser in forum Queries
    Replies: 6
    Last Post: 11-08-2010, 03:38 PM
  3. Simple Database (atleast I *think* it should be)
    By CloudFuel in forum Database Design
    Replies: 6
    Last Post: 06-28-2010, 10:40 AM
  4. Creating multiple reports from one Query
    By Mike Cooper in forum Reports
    Replies: 5
    Last Post: 04-24-2006, 05:00 PM
  5. Challenging design
    By Zoroxeus in forum Database Design
    Replies: 0
    Last Post: 01-30-2006, 11:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums