Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jul 2003
    Location
    Notre Dame, Indiana, USA
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reports: add data from a second table (Access 2002/ Windows 2000 svcpk3)

    I work in the accounting office of a newspaper (circ- 30,000). I have put together a Press Run Report that has fields for Date, Edition, Description, Paper Type, Pages, GoodRun, TotalRun, Spoilage, Spoil% and TotalPages. I have calculated totals for Pages, TotalRun, GoodRun, Spoilage, Spoil% and TotalPages.

    I need to include Previous Year totals for these same Total fields. That information was simply typed into the old report, which was set up in Excel. I've gotten rid of all of the problems with this report and it's really spiffy, but I don't know how to include this previous year Total info. The only thing I can think of is to use "label" on the report and type in the previous year info; that seems silly. I want to be able to pull it in from a table that I have set up, but that would mean getting data from two different sources. There really aren't any related fields in the tables, because this years' data is entered via a form, and is very detailed, with the totals being calculated partly in a query, and partly on the report itself. As the previous year data is totals only, I am at a loss as to how to get this in there. Maybe my brain is fried from working on this thing too long and I just need someone to smack me and say "hey you eejit! Do this!"

    Any help will be appreciated!

    srs

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Reports: add data from a second table (Access 2002/ Windows 2000 svcpk

    A subreport is just the thing for this.

    Import the old totals from Excel into a new table, if you haven't done so already.
    Create a separate report based on this table; keep in mind that it will become a subreport in the main report.
    When you have saved this report, put it on the main report; depending on where you want it, put it in the report header section or report footer section. Since the subreport is independent from the main report, you don't have to link them (i.e. leave the Link Child Fields and Link Master Fields properties of the subreport as a control on the main report blank.)

  3. #3
    Lounger
    Join Date
    Jul 2003
    Location
    Notre Dame, Indiana, USA
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reports: add data from a second table (Access 2002/ Windows 2000 svcpk

    Thanks for the tip, but I'm still lost. You said, "When you have saved this report, put it on the main report". I haven't a clue how to "put it on the main report." Could you walk me through the process? I'd like to place the subreport in the footer section. I already have totals from the detail data for the current month there; is that a problem?

    Thanks,
    Sherry

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Reports: add data from a second table (Access 2002/ Windows 2000 svcpk

    There are two ways to place the subreport in the report footer section of the main report. After you have done that, you can move it to where you want it, so that it doesn't overlap the totals from the detail data.

    Method 1: Using the Subreport Wizard.

    - Open the report in design view.
    - Make sure that the "Control Wizards" button on the Toolbox (the second button, with a 'magic wand') is on (down).
    - Click the Subform/Subreport button on the Toolbox.
    - Drag a rectangle in the report footer.
    - The Subreport Wizard will start.
    - Select the subreport in the list (this will automatically select the "Use an existing report or form" radio button.)
    - Click Next.
    - You don't need to specify linking fields, so leave those blank, and click Next again.
    - Specify a name for the subreport, and click Finish.
    - If necessary, move the subreport to the desired location.

    Method 2: Drag 'n drop.

    - Open the report in design view.
    - Arrange the report window and the database window next to each other.
    - Make sure that the report footer is visible in the report window and that the subreport is visible in the database window.
    - Drag the subreport from the database window and drop it on the report footer.
    - If necessary, move the subreport to the desired location.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •