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

Repeat A Record if 2 (or more) ordered

Status
Not open for further replies.

DennisTheMenace

IS-IT--Management
Jul 25, 2001
113
US
New to crystal and I am trying to create some labels. I am pretty fluent in SQL and Access, but new to the whole group, supress, drill-down stuff in Crystal...

I am trying to do a simple report:
If they ordered 1 of Item #48 yesterday, then print their name and address (new page). If they ordered 2 of Item #48 yesterday, then print their name and address (new page)twice. If they... three times... you get the idea.

If you need to know, the tables are:
CUSTOMERS
-idCust
-chrName
-chrAddress
-chrCity
...
ORDERS
-idOder
-idCust
-dtOrderDate
...
LINE ITEMS
-idOrder
-idItem
-intOrderQty
...

Any suggestions would be GREAT! TX

-Dennis


=====================
Remember - YOU ARE UNIQUE!!!... Just like EVERYONE ELSE! ;o)
 
Great FAQ Ido... however[/color red], we are restricted from adding tables... Any other solutions anyone?

-Dennis

=====================
Remember - YOU ARE UNIQUE!!!... Just like EVERYONE ELSE! ;o)
 
What version of Crystal are you using? If you're using CR 9 or higher, you could use Ido's technique by creating the Repeater table using a Command that uses a UNION query to create the table on the fly.

-dave
 
Unfortunately, I had to get 8.5. The run time engine is built into their software... sooooo... If I wanted to share my reports I built (let others run them that do not have crystal installed)... they had to be built using 8.5

-Dennis

=====================
Remember - YOU ARE UNIQUE!!!... Just like EVERYONE ELSE! ;o)
 
You could also try using an ODBC connection to an Excel spreadsheet that acts as your Repeater table. Deployment might be a drag though, as you'd have to make sure the ODBC source was set up on every machine, and on top of that, the application might throw up internally if an outside data source is being used.

Just a thought...

-dave
 
Hi Dennis,
Oracle has the function ROWNUM that you can use to generate duplicate details. This way, you can use as a repeater table, a table from your database that you know that has enough records to cover your numbers. Give it a thought (if you have Oracle).

Dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top