Sorting and Grouping. I Think.

M

Mike Revis

Hi Group

I have this little problem getting my report to display properly and I'm not
sure if it's a report problem or a design problem.

Background.

tblPackage one to many with tblPart on pkPackageID.
tblPart one to many with tblpartSize on pkPartID.

I have a frmPackage in form view with a sfrmPart in continuous form view.
sfrmPart has a command button that opens a popup frmPartSize.

I am trying to get my report to show

Package
Part
Partsize
Part
PartSize
PartSize
Part
PartSize

However the package data is repeating before each part.

It seems to work fine as long as I only have one part per package.

All ideas and thoughts are welcome.

Best Regards,

Mike
 
M

Marshall Barton

Mike said:
I have this little problem getting my report to display properly and I'm not
sure if it's a report problem or a design problem.

Background.

tblPackage one to many with tblPart on pkPackageID.
tblPart one to many with tblpartSize on pkPartID.

I have a frmPackage in form view with a sfrmPart in continuous form view.
sfrmPart has a command button that opens a popup frmPartSize.

I am trying to get my report to show

Package
Part
Partsize
Part
PartSize
PartSize
Part
PartSize

However the package data is repeating before each part.

It seems to work fine as long as I only have one part per package.

It sounds like you're on the right track. I think all you
need to do is set your first sorting and grouping level to
the package field and the second level to the part field.
Be sure to set each level's Group Header property to Yes.
Then place a text box for the package field in the package
header and similarly for the part field in the part header.
 
M

Mike Revis

Thank you for your response.

After playing around with the group headers and placement of the fields for
a while I am almost ready to go to press with this thing.

One remaining difficulty though.

Above my package I have an Order Header and below the package data I have an
Order Footer.

I am trying to get the total number of packages in the order.

So I have
Order Header
Package
Part
Part Size
Package
Part
PartSize
Part
PartSize
Order Footer

I want to get a =Sum(QtyOfPackages) in the Order Footer.

In the above example I am getting the sum of the parts (3) instead of the
sum of the packages (2).

As always any advice is welcome.

Regards,

Mike Revis
 
M

Marshall Barton

Mike said:
After playing around with the group headers and placement of the fields for
a while I am almost ready to go to press with this thing.

One remaining difficulty though.

Above my package I have an Order Header and below the package data I have an
Order Footer.

I am trying to get the total number of packages in the order.

So I have
Order Header
Package
Part
Part Size
Package
Part
PartSize
Part
PartSize
Order Footer

I want to get a =Sum(QtyOfPackages) in the Order Footer.

In the above example I am getting the sum of the parts (3) instead of the
sum of the packages (2).

The aggregate functions (Count, Sum, etc) only operate on
field in each and every record in the report's record source
table/query, so they can not help you here.

You can use a text box (name it txtRunPackCnt) in the
Package header/footer. Set its control source to the
expression =1 and its RunningSum property to Over Group.

Whit that in place, a text box in the Order footer can use
the expression =txtRunPackCnt to display the number of
packages in each order.
--
Marsh
MVP [MS Access]


 
M

Mike Revis

Thanks again,
I'll give it a try.

Mike
Marshall Barton said:
Mike said:
After playing around with the group headers and placement of the fields for
a while I am almost ready to go to press with this thing.

One remaining difficulty though.

Above my package I have an Order Header and below the package data I have an
Order Footer.

I am trying to get the total number of packages in the order.

So I have
Order Header
Package
Part
Part Size
Package
Part
PartSize
Part
PartSize
Order Footer

I want to get a =Sum(QtyOfPackages) in the Order Footer.

In the above example I am getting the sum of the parts (3) instead of the
sum of the packages (2).

The aggregate functions (Count, Sum, etc) only operate on
field in each and every record in the report's record source
table/query, so they can not help you here.

You can use a text box (name it txtRunPackCnt) in the
Package header/footer. Set its control source to the
expression =1 and its RunningSum property to Over Group.

Whit that in place, a text box in the Order footer can use
the expression =txtRunPackCnt to display the number of
packages in each order.
--
Marsh
MVP [MS Access]


 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top