Quantcast
Viewing all articles
Browse latest Browse all 13329

Access Report Woes

Hi peeps,

Having a spot of bother with a report.

It's a packing list which is formatted as follows:

Code:

Packing List Report
^--> Boxes on that packing list, grouped by [Box Code].
^----> Products in each Box, grouped by a count of identical [Product Code]s in
      that box.

That all works fine, and the query is pulling everything as it should.

The problem is (that on a separate set of tables), we might also put parts in a particular box on the packing list. The amount of which is dynamic, so the report would need to stretch to accommodate these extra parts, or leave no room at all if they're not present.

The above hierarchy should therefore look like:

Code:

Packing List Report
^--> Boxes on that packing list, grouped by [Box Code].
^----> Products in each Box, grouped by a count of identical [Product Code]s in
      that box.
^----> Parts in each Box. Parts table has a [Quantity] column, so no grouping
      is required.


I have no idea how to implement this though. If I pull all the data into a single query, then I obviously end up with the products and parts in the same row... When what I really need is two queries that work in harmony and consider each other, so:

Code:

- For each [Box Code] contained in the [Packing Code] (code to identify packing
  lists).
--- List all the [Product Code]s that are in the [Box Code] currently being
    evaluated.
--- Check to see if any [Part Code]s appear in the [Box Code] being evaluated.
----- If they do, add the [Part Code](s) to the report after the
      [Product Code](s).
----- Otherwise, do nothing, leaving no gap.
--- (Total up the [Weight], [Value], etc., for the [Box Code] being evaluated.)
- (Total up the [Weight], [Value], etc., for the entire [Packing Code].)

That's the way I'm looking at what I need to do logically, but neither SQL, or Access Reports especially, are something I'm particularly strong at.


Any assistance/links/whatever would be greatly appreciated.


Thanking you all in advance!

Viewing all articles
Browse latest Browse all 13329

Trending Articles