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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NUMBER OF COPIES OF A REPORT 1

Status
Not open for further replies.

adhhealth

Programmer
Jul 1, 2004
165
US
NUMBER OF COPIES OF A REPORT I NEED TO PRINT IS EQUAL TO A PARTICULAR DATABASE FIELD IN THE REPORT(EX: 10).CAN WE DO THIS??
ALSO, IN THE SAME REPORT I NEED TO PRINT PAGE 1 OF 10 2 OF 10 ETC..ON ALL THE COPIES IN THAT ORDER.
 
Consider that the version of Crystal and how you're printing are key issues, so please post those.

Also using all caps is considered screaming to many, so you might try all lower case if you're not much for typing (like me).

If you're using a VB app or some such, you might accomplish this through code, otherwise it's no simple matter.

-k

 
We are using crystal version 8.5 ..how may we use the vb program to do this ??
p.s: sorry abt all caps..it does look screaming
 
Ido,
Thanks for the tip, I think I can use the method you suggested in your FAQ149-3226. But I am facing a problem.Steps I followed:
Created a table called "Repeater" also an index is created on it. (Pervasive SQL 8). This table is stored as .mkd(ok?) all my other tables are stored as .DAT. In visual linking expert(Crystal 8) I added this table,first tried to link it with {Order.quantity} with the join condition >= but when I clicked on link options all the sql join types were disabled(dont know why),so i left it as an equal join. THen clicked on "Report" -"Edit selection formula" - "Record" and this is what I have here
{MXHIST.ITEM} IN {?FROMITEM} TO {?TOITEM}
AND {MXHIST.LOTNO} IN {?RNG2LO} TO {?RNG2HI}
AND {MXHIST.LOC} IN {?RNG3LO} TO {?RNG3HI}
AND {MXHIST.BINUM} IN {?OPTFLD1} TO {?OPTOFLD1}
and {Order.quantity}>={Repeater.how_many}

When I run this report I am getting a blank page..(I also tried completely removing the link in the visual linking expert ,however it said"your current link configuration contains multiple starting points and it is generally not supported" still I said ok and tried..not working)
Please advise!!
Thank you.

 
An easy way to turn things into a simple = join if your data source doesn't support the >= join is to change your REPEATER table to:
How_Many Which_One
1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
etc.

Now simply join on How_Many and use the Which_One as the counter.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Ido,
Thanks a lot!!! It worked for the number database field. But I have aproblem. The database field I am accessing {Order.quantity} is a "string" field.
Hence in the select expert i have given as

tonumber( {Order.quantity})>={Repeater.how_many}

but it says "database error detected by dll"(Using crystal 8 and database -pervasive sql)
is there a way around this?
Thanks again
 
According to Ido Millet's Faq 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}


My problem:

The above method works fine if the database field is a "number" but the database field I am accessing is a "String" In the record selection condition I have given

tonumber({Order.quantity}) >= {Repeater.How_Many}

but it says "database dll error and doesnot work". Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top