Oct 11, 2012; 18:18
Ed Bullock
[FMPro] Printing a report and columns on the fly
Hi all,
Struggling a bit with how to print a report how the client wants it.
In a table, we have records as follows - they are actually line items from
an 'Orders' Table
Order No | Container No | Size | Pallet No | Colour | Quantity | Weight of
Pallet
23 | 1234 | S | 12345 | Red | 100 | 600
23 | 1234 | S | 12346 | Blue | 200 | 1200
23 | 1234 | M | 12347 | Red | 100 | 600
23 | 1234 | M | 12348 | Green | 100 | 600
23 | 1234 | L | 12349 | Red | 300 | 1800
23 | 4321 | S | 25801 | Red | 100 | 600
23 | 4321 | M | 25802 | Blue | 200 | 1200
So that's the information we have for this order (order 23), they would like
to print off a delivery report in the following way
ORDER NO: 23
CONTAINER: 1234
_______________________________________________________
Size | Pallet No | Red | Blue | Green | Total | Weight
S | 12345 | 100 | | | 100 | 600
S | 12346 | | 200 | | 200 | 1200
_______________________________________________________
100 200 300 1800
_______________________________________________________
M | 12347 | 100 | | | 100 | 600
M | 12348 | | | 100 | 100 | 600
_______________________________________________________
100 100 200 | 1200
_______________________________________________________
L | 12349 | 300 | | | 300 | 1800
_______________________________________________________
300 300 1800
TOTALS 500 200 100 800 | 4800
CONTAINER: 4321
The above repeated for the next container and so on
_______________________________________________________
GRAND TOTAL (show grand totals here for all containers)
_______________________________________________________
It is broken down by container, then by size.
The first issue is the headers Red, Blue, Green, they are loaded against
each record, they are not a field header, they come under the field
'colour'. I am not sure how I would make them headers with the relevant
quantity shown underneath each.
Secondly, and I am really struggling here, you can see above there is no
header for Yellow. If the order did have yellow items on it then there would
be a column for Yellow. If there was no Red items, that column would
disappear and so on. Only show columns that are relevant to the order.
There can be multiple pallets in a container, and multiple containers on an
order.
Please, does anyone have any ideas how to achieve this?
At the moment I am thinking that I need a new table and to loop through each
record in the order and manipulate the data to show it as we need it in the
new table, and use that table data for the report instead.
I am completely stuck on the 2nd point of adding and removing columns on the
fly. I cannot have multiple layouts as depending on the type of stock being
ordered, those column headers will change drastically. Note though, each
order only contains one type of product.
Many thanks for any assistance you can give
Ed
#############################################################
This message is sent to you because you are subscribed to
the mailing list FMPro
FMPro@lists.lassosoft.com
To unsubscribe, E-mail to: <FMPro-unsubscribe@lists.lassosoft.com>
Send administrative queries to <FMPro-request@lists.lassosoft.com>
Oct 11, 2012; 17:53
Geoff Graham
Re: [FMPro] Printing a report and columns on the fly
Oct 12, 2012; 21:32
Ed Bullock
Re: [FMPro] Printing a report and columns on the fly
Oct 12, 2012; 20:37
Geoff Graham
Re: [FMPro] Printing a report and columns on the fly
Oct 13, 2012; 00:25
Edwin Bullock
Re: [FMPro] Printing a report and columns on the fly