Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 2008 - labels and parameters

Status
Not open for further replies.

max274

Technical User
Nov 7, 2005
21
US
I have created a report that has 2 parameters in it for my labels printing. The 1st(set to allow multiple itmes) asks for a the field number(that represents a certain item) the 2nd parameter ((allows only single item entry(how many lables i want)) asks for qty. If I enter 1 item in paramert 1 and enter 5 in second I get 5 labels of the item number I entered. However; I have the 1st paramter set to allow multiply fields. If I input 2 different item numbers in the 1st parameter and then enter qty of 2 to print in second parameter. The report prints out 2 labels per item entered. I would like my report to have allow multiple items entered at different qtys to be printed. I was envisoning in the order entered
1. xitem(parameter 1) qty 3(parameter 2)
2. xitem(parameter 1) qty 4 (parameter 2)
the xitems are entered one right after each other then you enter your qty. you input the item in parameter 1 - 1 right after another then move to parameter 2 for qty.
this would print 1st item 3 times second item 4 times on the same sheet.

Currently here is some of my info:

{INVENTORY.ITEMNUM} = {?Control Id:} and
{Sheet1_.Column1} <= {?number of labels}
 
How many field numbers could be requested at any one time?

I ask as there may be a neater way to go about this.

'J

CR8.5 / CRXI - Discovering the impossible
 
by field numbers if you mean my 1st parameter there is total of around 10000+ control (or xitems) that may come into my inventory. Since there is are so many I want the user to just input the number themselves rather than using a cascading list

in parameter 2- the most labels I will ever have to print is 24 for 1 item
my reports works fine when i just have to use 1 itemnumber(in parameter 1) and (x)qty to parameter 2 and as long as I need the same qty printed for my multiple items number say 2 for each that works too. My problem is when I have multiple item numbers that need varying amount of different lables.
I currently have my excel table set to 20 but i can extend that to as big as i want.

did I answer your question - please bear with me im fairly new to writing this stuff
 
No problem - we all started out at one time or another :)

I meant how many of the potentially 10000+ would be likely to be selected at any one instance of the report being ran?

If the page limit governs the number of labels printed (Which I am sure can be overcome) then would 24 different parameter 1 entries be your limit?

'J

CR8.5 / CRXI - Discovering the impossible
 
OK- the most any 1 item will be printed is 24 times( i used 24 becasue If i just get that one item in I wanted to be able to print 24 lables - not 3 prints of 10, 10 and 4)
example
1. xxx qty 4
2. xxx qty 3
3. xxx qty 2
4. xxx qty 1
5. xxx qty 7
6. xxx qty 5
7. xxx qty 2
8. xxx qty 1
9. xxx qty 6
10. xxx qty 24
the example above is what i might get in. 10 different items with different qty to label. while the format(avery 5163 is only 10 labels) im ok with them rolling over to the next page
Im ok with limiting the item.itemnum to 10 different inputs w/ 10 different qty's.
 
Add a table that contains numbers in sequence from 1 to the maximum number of labels you would print per item. Add this table but do not link it to your other tables. Go to database->check "select distinct records." Then use a selection formula like the following:

(
{table.xitem} = {?Item}[1] and
{?Qty}[1] >= {numbertable.number}
) or
(
{table.xitem} = {?Item}[2] and
{?Qty}[2] >= {numbertable.number}
) or
(
{table.xitem} = {?Item}[3] and
{?Qty}[3] >= {numbertable.number}
) or //etc.

...up to the maximum number of items you want the user to enter. Maybe use prompt text like: "Please enter up to 20 item numbers." Then you would need 20 sets of clauses in your selection statement.

-LB
 
my "select distinct records" is greyed out? How do i correct this?
 
Are you using a stored procedure? Try it without the select distinct. Maybe it is already built into the query.

-LB
 
are the [1] in the formula a suggested input or is it part of the formula?

do i need to delete the select statement that I already have and use the suggested one or keep it and just add the suggested one behind it? Pls forgive rather new at this.
 
ok for the most part i have it working. I have a few questions
1. When the report runs instead of putting the data on the preview it is searching for records and I have to let it go through 150000 records before I stop it or my data will not populate. Not sure what is wrong here

2.not sure how to correct this: if I enter 3 clauses: the formula demands 3 itemnums or 3 numbers or i get a error(a subscript must be between 1 and the size of the array). what if I want to enter 3 item.nums but they all have the same amount of lables that need to be printed. Current set up will not allow this. what if i have 20 clauses but only want to enter 3 item.nums - and not 20 item.nums- i still get the error

2a. i get auto blue prompt when I try to enter the same number 2 times into the parameter - say I enter 1,3,1 upon typing the second one the 1st one is highlighted. I suppose asking me to select a different qty - but I want 1 again beacause I have 2 items that need 1 label and 1 that need 3.
 
1. Try using a small table for the number field.
2. The formula should read like this (sorry):

(
ubound({?Item}) >= 1 and
{table.xitem} = {?Item}[1] and
{?Qty}[1] >= {numbertable.number}
) or
(
ubound({?Item}) >= 2 and
{table.xitem} = {?Item}[2] and
{?Qty}[2] >= {numbertable.number}
) or
(
ubound({?Item}) >= 3 and
{table.xitem} = {?Item}[3] and
{?Qty}[3] >= {numbertable.number}
) or //etc.

3. I cannot recreate this issue. If the user is entering a custom number into the box, they can enter the same number multiple times. You would NOT be able to enter the same number multiple times in a dropdown picklist however.

-LB
 
after entering the above formula to my report - i get a error asking for a ) after the very 1st unbound, even after
i enter it, the program keeps asking for more


(unbound({?Control ID:})>=1 and
{INVENTORY.ITEMNUM}={?Control ID:}[1] and
{?Labels}[1]>={Table1.Field1})or
(unbound({?Control ID:})>=2 and
{INVENTORY.ITEMNUM}={?Control ID:}[2] and
{?Labels}[2]>={Table1.Field1})or
(unbound({?Control ID:})>=3 and
{INVENTORY.ITEMNUM}={?Control ID:}[3] and
{?Labels}[3]>={Table1.Field1})or
(unbound({?Control ID:})>=4 and
{INVENTORY.ITEMNUM}={?Control ID:}[4] and
{?Labels}[4]>={Table1.Field1})or
(unbound({?Control ID:})>=5 and
{INVENTORY.ITEMNUM}={?Control ID:}[5] and
{?Labels}[5]>={Table1.Field1})or
(unbound({?Control ID:})>=6 and
{INVENTORY.ITEMNUM}={?Control ID:}[6] and
{?Labels}[6]>={Table1.Field1})or
(unbound({?Control ID:})>=7 and
{INVENTORY.ITEMNUM}={?Control ID:}[7] and
{?Labels}[7]>={Table1.Field1})or
(unbound({?Control ID:})>=1 and
{INVENTORY.ITEMNUM}={?Control ID:}[8] and
{?Labels}[8]>={Table1.Field1})or
(unbound({?Control ID:})>=8 and
{INVENTORY.ITEMNUM}={?Control ID:}[9] and
{?Labels}[9]>={Table1.Field1})or
(unbound({?Control ID:})>=1 and
{INVENTORY.ITEMNUM}={?Control ID:}[10] and
{?Labels}[10]>={Table1.Field1})or
(unbound({?Control ID:})>=11 and
{INVENTORY.ITEMNUM}={?Control ID:}[11] and
{?Labels}[11]>={Table1.Field1})or
(unbound({?Control ID:})>=12 and
{INVENTORY.ITEMNUM}={?Control ID:}[12] and
{?Labels}[12]>={Table1.Field1})or
(unbound({?Control ID:})>=13 and
{INVENTORY.ITEMNUM}={?Control ID:}[13] and
{?Labels}[13]>={Table1.Field1})or
(unbound({?Control ID:})>=14 and
{INVENTORY.ITEMNUM}={?Control ID:}[14] and
{?Labels}[14]>={Table1.Field1})or
(unbound({?Control ID:})>=15 and
{INVENTORY.ITEMNUM}={?Control ID:}[15] and
{?Labels}[15]>={Table1.Field1})or
(unbound({?Control ID:})>=16 and
{INVENTORY.ITEMNUM}={?Control ID:}[16] and
{?Labels}[16]>={Table1.Field1})or
(unbound({?Control ID:})>=17 and
{INVENTORY.ITEMNUM}={?Control ID:}[17] and
{?Labels}[17]>={Table1.Field1})or
(unbound({?Control ID:})>=18 and
{INVENTORY.ITEMNUM}={?Control ID:}[18] and
{?Labels}[18]>={Table1.Field1})or
(unbound({?Control ID:})>=19 and
{INVENTORY.ITEMNUM}={?Control ID:}[19] and
{?Labels}[19]>={Table1.Field1})or
(unbound({?Control ID:})>=20 and
{INVENTORY.ITEMNUM}={?Control ID:}[20] and
{?Labels}[20]>={Table1.Field1})
 
i found my mistake I added a "n" to ubound....lol - by the way I appreciate you help on this. I will give you a update after i test.
 
ok still same problem-
for prompt in parameter 1
I enter:xitem1, xitem2, xitem3 (3 different numbers)

for parameter prompt 2 i enter ONLY - 1 number because I want all of the above printed the same amount of times. I get the failure ( a subscript must be between 1 and the size of the array) this failre is prompted at this section in the formula:{?Labels}[3]- I believe if i enter 3 xitems that the formula wants 3 xlabelsnumbers to match to each item. If I match the amount 3 xitems and 3xlabelnumbers i get no issue the labels show up.

on my
parameter 2 i still get the only 1 number of the same number cant have duplicate number - i have it set as a number field , field value = table
value options at bottom:
false
"space"
true
true
true
false
"space"
"space"

 
I think there is a issue with the formula pertaining to the database
If i just enter 1 xitem and 1 xlabelnumber. The data populates instantly. If enter anything more than 1item in either parameter field I have to have the report seach 150000 plus records. Not sure why that is
 
You must enter one value in Parm2 for each value in Parm1, even if the values are the same.

Your table that you are using to create the multiple values should contain only a small number of records (up to the number of times you want the labels to print).

I think Table 1 is being read once for each record in Table 2, since they are not linked. But this is why it works.

-LB
 
my table that represents the number of lables i want to print only has a value of 1-20



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top