Current Position:Home > How to build an 8.5 report where a single source repeats with each piece of data

How to build an 8.5 report where a single source repeats with each piece of data

Update:10-11Source: network consolidation
Advertisement
I don't really know how to characterize this problem or if there is a short-hand for the type.  Here is my dilemma:
I have a SQL table of tracking numbers which is custom to our version of Dynamics.  The table contains both orders and invoices.  Each invoice may have 1 or more tracking numbers, but each tracking number associated with an invoice or order is recorded as a different record under the invoice or order number.  E.g.:
SOPNUMBE          SOPTYPE          Tracking Number
INV0001234               3                    1ZA12341234
INV0001234               3                    1ZA12341235
INV0001234               3                    1ZA12341236
ORD005111               2                     FedEx 123411
ORD005111               2                     FedEx 123412
INV0001287               3                    1ZA12349876
ORD005134               2                    1ZA12345263
INV0001291               3                    FedEx 165304
INV0001291               3                    1ZA12345666
and so on ...
What I'm trying to do in Crystal, which is the only way I can access that table (nothing within Dynamics allows me to access that table) is create a page of labels, based on the date of the SOPNUMBE and the SOPTYPE, (IOW only invoices) that shows as the following:
INV0001234                              INV0001287                         INV0001291
     1ZA12341234                         1ZA12349876                       FedEx 165304
     1ZA12341235                                                                      1ZA12345666
     1ZA12341236
I would be using 2 x 1.5 labels, 3 or 4 labels across and 6 down, approximately
Here is my problem:  I cannot use the Mail Label format as it requires each line having a different Field Physical Name.  However, if I use a standard Crystal format or an undefined format, I can get the right layout for one column only.  If I try to use 3 columns across, it simply repeats the data in the first column.  For the life of me, I cannot figure out how to create 3 or 4 columns across with separate data.
The purpose is to be able to attach the appropriate label to the actual invoice for the information, which customers tend to call in for, anyway.  Now, we have to hand-write the Tracking Numbers on each invoice, which makes for an increase in errors.
Any suggestions and/or solutions would be greatly appreciated.
Thank you,
Laura Douglas

The Best Answer

Advertisement
it could be that 8.5 doesn't have this option to do a group sort / top n.
if you're looking for the data to spill into a new label then that won't work for you anyways.
here are some options:
a) the group itself needs to repeat in order to have another label available. the only way to do something like this in 8.5 is for your database administrator to create a stored procedure that groups the sopnumber data into sets of N values.
e.g. each group would only have at the most 5 tracking numbers. if a sopnumber had 12, then 3 groups would be created by the stored procedure, e.g. INV0001234_a, INV0001234_b, & INV0001234_c   this would be required to create the correct number of labels and to ensure that all data from each sopnumber was eventually displayed.
once a stored proc is created to break up the data into these groups, you need to create a new report off of the proc and use this new grouping field to base your group on.
b) another option would be based on whether or not your database had a specific field that indicated a running total counter for the tracking numbers which was reset every sopnumber. e.g. if sopnumber INV0001234 had 4 tracking numbers, there would be a field that indicated 1,2,3,or 4 depending on the record.
c) another option would be if the stored proc simply brought back the data that you have as well as a running total / counter that indicated / counted in a manner similar to the above. this may be a better option than a) or b)
-jamie