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

Multiple copies of Same Report

Status
Not open for further replies.

mike99

Technical User
Joined
Jul 3, 2002
Messages
43
Location
CA
I have to develop a report that prints labels for goods to be shipped and the quantity of labels to be produced must be determined by the quantity sold as detailed on the invoice. I am unable to find any reference as to how to determine the number of times a report is produced based on the value of a field in the data.
I have tried "do while loops" but cannot get the statement to produce a result on each iteration, if that makes sense.
Any help or hints would be appreciated.

Mike99
 
Create a table with the numbers 1 to 500 in it, or whatever the reasonable maximum number of labels you would need. Then join this table to your existing table on the quantity field using a less than or equal to join. If your qty is 8, you will get 8 labels. If it is 50, you will get 50 labels, etc.

This is the type of record inflation that we usually work hard to avoid, but this time we are doing it on purpose - to create multiple labels.

Let me know if you have any questions. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Thanks

I tried that but cannot create a less than link as I'm linking from Btrieve to Acces. I presume that is why the links options are greyed out?

I will never need very many labels so have created a column in a file in access that looks like this:
1
2
2
3
3
3
etc

I am linking the "order qty" from one of my btrieve files to this column in access with an "equal" link and reasoned that this will give me the correct number of entries in my detail line. My report does not pick up this column from access at all

When performing the link I get a message that the data types are a different length and also that the database drivers are different and I have to "convert".

I would appreciate any ideas and comments

 
There is no direct way to control the iteration of records in CR. And, CR can't always link across data formats, especially with Btrieve which is always a PITB format to deal with. Any chance that you have a table not being used in Btrieve that you can use to hold your dummy numbers?

You could also create 10 copies of each section and suppress the ones that you don't need, but if you have multi-column labels that won't be very efficient. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks
I thought of a dummy table that could hold the information I need in Btrieve.

How does a complete amateur go about creating a Btrieve table? Or , how do I find one that is not used to modify?
Where do I go for more info on Btrieve?

Thanks
 
Mike,

you can do this by creating an equal to link, then populate your access database as follows:

1
2
2
3
3
3
4
4
4
4
...

This way the quantity of 20 has 20 matches, etc.

In fact I believe I have a file like this in Access 2000 that automatically populates itself based on a prompt if you would like it. Please post your email address if interested. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
To find an unused table you would have to know your database pretty well. To create one you would also have to have a DDF builder to modify your DDF files, or the report wouldn't be able to read the new table. Btrieve isn't a widely used platform, but it is used. An internet search for Btrieve and DDF will get you started.

Are you sure that it won't work linking to your MS Access table? Are you trying to link to Access via ODBC or using DAO ("Database files")? What version of CR are you using? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
You can use Smithware ddf builder to build a btrieve table. I have done this many times with Macola. The problem is that Macola comes out with updates about 6 times a year, and every time they do it will blow away your ddfs and replaces it with the Macola updated ddfs and the table you created with it. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
The 'To' field (in the access table) needs to be indexed in order for Crytsal to link to it. Have you already done this? Steve Phillips, Crystal Consultant
 
Thanks for the help.

"Dgilsdorf", if you can send the ACCESS table to me I would appreciate it, my e-mail address is mike@accsys.ca.

I am linking to MS ACCESS via ODBC, I have indexed the field in access but wonder if my record type selection is correct. Access has a drop down menu on the number field where you can select different number types and decimals. Does anybody know which one to use?

I will do a search for the Smithware and see how far I get.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top