Crystal report - counter question

I have a crystal report that shipping will input the same item number as a parameter, when the report runs it only show that I enter the item number once.  I like to have a counter that would show the number of time the same item number was entered in on the parameter screen?
Scott JohnstonIT Manager Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
I don't understand what you are saying.

Are you entering one number or is it a multiple value parameter and you are entering 1234 twice?

mlmcc
0
Scott JohnstonIT Manager Author Commented:
I sorry but it confusing, I scan a upc code into the Parameter field #1  "12345678" scan value,  Parameter field #2 "222222222"  Parameter field #3 "12345678".  When the report runs I only see the parameter for field #1 and Field #2, for some reason the field 3 will not print on the report?

I seems to see the values as the same and not unique to the lookup?

Does that make any sense?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Scott JohnstonIT Manager Author Commented:
My goal is to create a manifest for a pallet that has 28 - 6 gallon boxes on the pallet.  Each box on the pallet is labeled with a UPC code, we want each box to be scanned.  If the pallet has every box the same then when I have scanned a UPC code into a parameter field I was hoping to get 28 line in my report, but I only get 1 line with the UPC code for the Item, not 28 line on the manifest.  For some reason crystal combines all the lines in a parameter into one lookup in the report?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Scott JohnstonIT Manager Author Commented:
I all most got is to work correctly using 28 Detail selects, but because the item code is not unique it pull all records from the database,.  I've tried something to test my situation and I created a formula the formula was like this....
UPC Code = ["12345678", "12345678", "12345678", "12345678"]

UP code = {?Scan 1} or UPC Code = {?Scan 2} or UPC Code = {?Scan 3} or UPC Code = {?Scan 4}

even thought I have 4 different entries when the report runs it only display the record once, If the scan are all different the report works fine......I probably am trying to do something in a wrong order that is why I posted the question?
0
mlmccCommented:
How many parameters do you have in the report?
Seems like you need 28 if you have 28 cartons.

Are you using a command for the report or did you connect to the tables?

I have a couple of ideas but they depend on how you are getting the data from the database.
I also need to check if you can count the parameter values.

mlmcc
0
James0628Commented:
even thought I have 4 different entries when the report runs it only display the record once, If the scan are all different the report works fine......I probably am trying to do something in a wrong order that is why I posted the question?
As I understand your situation, you're not really doing anything in the "wrong order".  CR displays each record once, because it only reads each record once.  Testing for the same value multiple times doesn't force CR to read or "process" a record more than once, or anything like that.

 I assume that the tests that you mentioned are in the record selection formula?  Using your example, if you have a test like (UPC code = {?Scan 1} or UPC Code = {?Scan 2}), and {?Scan 1} and {?Scan 2} have the same value, then when UPC Code matches that value, the test just evaluates to (True or True), ie. True.

For some reason crystal combines all the lines in a parameter into one lookup in the report?
That's basically correct, but, more specifically, CR doesn't really do a "lookup".  If you enter a series of conditions in the record selection formula, CR doesn't look for any records that match condition A, and any records that match condition B, and so on.  It reads each record once, and only keeps the ones that match all of the conditions.  Technically, if possible, CR will send the conditions in the record selection formula to the db and let it handle it, but the result is the same.


 Hopefully that gives you a better idea what's going on.  Now, what, exactly, are you trying to do?  Do you have one detail record that you want repeated 28 times, with a different parameter value on each line?  Or do you want to read the records that match the parameter values, but repeat the detail section once for each time a value is included in the parameters?  Or something else?

 James
0
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Clone the detail section several times.
Control the suppress property of Detail b so it shows only if the Product is detected in the parameter more than once.
Control the suppress property of Detail c so it shows only if the Product is detected in the parameter more than twice.
etc
0
Scott JohnstonIT Manager Author Commented:
Guys thank you for all the comments, i got dragged into another problem for the past few days,  MLMCC your right i will end up with 28 entry field, but not all will be used.  James i appreciate the understanding of the situation but it did not give me a solution.
IDO I going to try what you explained.  I kind of thought something like that might work as well.

I update everyone on the outcome?
0
James0628Commented:
No, I didn't offer a solution, because I'm not sure what you're trying to do.  It sounded like you might be misunderstanding some basic things about how CR works (you wouldn't be the first), so I thought I'd try to explain.  And then, with you maybe understanding things a bit better, I asked for more information about exactly what you're trying to do.

 James
0
Scott JohnstonIT Manager Author Commented:
IDO, I have a question, what formula would I use on the detail records.  Something like this:
If Scan 1 = Scan 2 or Scan 1 = Scan 3 or Scan 1........and so?
0
Scott JohnstonIT Manager Author Commented:
James, my goal is to have products manifested and then printed.  Each Item Bar code is scanned into a parameter field to run the report, because of the situation we are discussing each parameter is not unique, so it only displays one record for each duplicate item on the manifest.  My goal is to either have every item print on the sheet even if duplicated or add a counter and then display the quantity of time a item was scanned into the parameter of the report.
Hope that clears up my issue....
0
James0628Commented:
Do you have a separate parameter for each value, or a single parameter that allows multiple values?  It sounds like you have separate parameters.

 If you have separate parameters, the simplest thing would be to create a separate copy of the detail section for each parameter, and use {field} <> {?Scan X} to suppress the detail sections ({?Scan 1} for the first detail section, {?Scan 2} for the second, and so on).  Then the detail section would be repeated once for each matching parameter.

 James
0
James0628Commented:
I wrote my last post before your last post.

 I noticed that you mentioned a counter before.  You could do that too.  It wouldn't be difficult to have a formula look at all of the parameters, or the list of values for a multi-value parameter, and count the number of matching values.

 James
0
Scott JohnstonIT Manager Author Commented:
James, that is correct separate parameters for each scan..I'm working on trying the solution using with the details records.
I let you know if I run into any problems...
0
Scott JohnstonIT Manager Author Commented:
I knew I tried this already, i have another problem with this, when i scan a bar code I scan in the check digit and the UPC number, but the comparison field(ALready storedon aother database) has already removed the check digit and so the field that are being compared are not the same.
The bar code scan it the problem, any idea on how to scan a bar code and in crystal strip off the check digit characters?
Does this make sense?  If not I try to explain it in more detail...
0
Scott JohnstonIT Manager Author Commented:
I got it, I had the wrong UPC fields being compared in the report.  I better slow down...I make stupid mistakes then..
0
Scott JohnstonIT Manager Author Commented:
James thank you, works perfectly now!!!
0
James0628Commented:
You're welcome.  Glad I could help.

 James
0
Scott JohnstonIT Manager Author Commented:
Very helpful, and patient with my communication.

THANK YOU
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.