cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Printing Technique - Need help

10-10-2012 6:43 PM
657 views 11 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

I have been asked to print shipping container labels.  Its a pretty simple label report that specified what is in the container. The hard part comes when its time to print.  I have to print one label per quantity shipped and I'm not sure how to do that in Crystal.

For example:  See the following purchase order

Corporation X buys the following items

ItemDescriptionQTY
Cost
062

Paper Skeleton  decoration  for Halloween

15.95
012Black Cat on orange background 10 Ft ribbon52.95
030

Fog Machine

127.95
030aFog Juice 1 pint23.95








I would need the following labels

1 copy for the paper skeleton

5 copies for the Black cat ribbons

1 copy for the fog machine

2 copies for the Fog Juice

I know how to do this in a procedures language like COBOL or Fortran but how would I go about doing this in Crystal Reports?

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Likes

Hi Domenic,

I'm not sure if this can be done in the Crystal Reports designer.

The only other alternative is SDKs, although I know nothing about it.

- Abhilash

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Likes

Can't be done  Oh No

SDK -  I am in the same boat. I know nothing about SDK plus its not my server so even if i wanted to attempt to install it and learn I can't


Lets hope someone else know of a way

Former Member
0 Likes

So, you have one report and want four different labels, with varying number of copies out of that one report... SDK would be your only option, and not an easy one to implement either;

You'd have to use the InProc RAS SDK, parse the existing report, and depending on what is in the report, create 4 new reports at runtime; copy for the paper skeleton, copies for the Black cat ribbons, copy for the fog machine, copies for the Fog Juice, then print those reports.

Not a trivial task even for a seasoned developer...

A better (certainly simpler) approach, again using SDK, may be to create an empty report with 4 formulas that will be used as place holders. Then at runtime you populate those formulas with the correct data. E.g.; code for a one formula report would be:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

FormulaFields = Report.DataDefinition.FormulaFields

FormulaField = FormulaFields.Item(0)

FormulaField.Text = "{table.fieldname}"   \\\\ say table.item

CrystalReportViewer1.ReportSource = Report

End Sub

And since you know the data, you know how many copies to print.

One other idea - again using SDK. Esport the report to TXT / CSV file format, parse out the TXT and print that.

But nothing simpler than this...

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Likes

Ludek

You are talking way above my head - I have not been exposed to CR for that long and I have had no formal training - Just learning as I go.

Anyway

The problem is that I don't know the data. I just provided the above as an example. There can be 1 to many different scenarios.

The labels are for the shipping department. As shipping is  fulfilling sales orders individual line items on the order go into boxes - one item per box and each box gets a P2 label detailing  what is in the box. These boxes then go into larger boxes or skids which get an 3S label (haven't started working on that yet). I'm told these labels are standard shipping practices.

Again in COBOL or Fortran this is a piece of cake but one has much more control in those languages. Read the data, move it to a print buffer them preform the print routine QTY + 10% of QTY (no rounding) times and you have that many labels printed.

Nuts - now what am I going to do

ido_millet
Active Contributor
0 Likes

One of the 3rd-party Crystal Reports Schedulers listed at http://kenhamady.com/book marks.html allows you to control the number of printed copies using a field or formula in the report.

However, you can actually take care of this challenge simply in Crystal.  One technique to achieve this is described in a FAQ I wrote for Tek-Tips: http://www.tek-tips.com/faqs.cfm?fid=3226

Here is the text:
---------------------------------------------------------------

How do Duplicate Records based on a Quantity Field?

faq149-3226

   

Problem:
A typical situation is where a number of label copies  must be printed for each order according to the {quantity} field in each order record.

Solution:
Create a "REPEATER" table with a single column (How_Many) that looks like this:

How_Many
1
2
3
4
5
6
etc.

Now, in your report, add the Repeater Table and add a join
condition of:
-----------------------------------
Order.quantity >= Repeater.How_Many
-----------------------------------

If the ">=" join option is not available, remove the join to the REPEATER table and create this condition in the Record Selection condition:
--------------------------------
{Order.quantity} >= {Repeater.How_Many}
--------------------------------

This would cause each order to be duplicated as many times as the value of {Order.quantity}. 

If you are restricted to using an equal join, you can also modify the repeater table to include N records for each quantity N:
1
2
2
3
3
3
...

This would cause each order to be duplicated as many times as the value of {Order.quantity}. 

If you need to print "N of M" modify the repeater table to look like this:
N   M
1   1
2   1
2   2
3   1
3   2
3   3
...

Cheers,
- Ido

Former Member
0 Likes

You were told by Abhilash that CR designer will not do this. I simply attempted to help which apparently was not well received. So, I suppose your options are:

Use COBOL or Fortran?

See if Ido's suggestion will help.

Reformulate your approach to the issue (e.g.; think of a different way of getting the desired result)

- Ludek

Former Member
0 Likes

I don't have access to SQL or access to create a table within the database
This does sound like it may work

It is dynamic based on quantity so I can get 3, 10 and 20 labels out of the same run right

Former Member
0 Likes

Ludek

No disrespect I'm just trying to get a handle on how to go about it 

I mean no disrespect just trying to get a handle on it and maybe explain myself better

Ido's approach may work or at least sounds like it would. All I have to do is ask the admins to build me a table

Former Member
0 Likes

Ido  Your solution works ! ! !

Thank you so much ! ! !

Answers (1)

Answers (1)

Former Member
0 Likes

Ido  Your solution works ! ! !

Thank you so much ! ! !

ido_millet
Active Contributor
0 Likes

Excellent. Thanks for closing the loop.