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

Setting up Arrays

Status
Not open for further replies.

Tckazz

Technical User
Feb 19, 2002
17
US
Hello

I have been working on this for a few days, and have run out of ideas and am hoping someone here can point me in the right direction.

I am using Crystal Reports 9 and a MS Access Database.

I have one table with Advertising Catagory descriptions such as:

Yellow Pages
Drive By
Referral

The other table with the customers has a field with a number that holds the bitmap as to what advertising catagories where choosen for that customer.

I am trying to get a report that would show me totals of each catagories next to the appropraite catagory name, such as:

Yellow Pages 79
Drive By 149
Referral 98

The catagory descriptions would not normally not have more then 20 records.

There is no kind of common linking between the tables.
I was trying to use an array for each field and display the results as needed, but am not making much progress or I am missing something. Perhaps there is a different way of getting the results I am looking for.

Any help would be appreciated, thanks in advance.

TC

 
You can create formulas like this:

if {table.category} = "Yellow Pages" then 1 else 0

Now insert a summary on this formula.

Please note that you will have to create three formulas and then insert summaries on these formulas.

Kchaudhry
 
Kchaudhry, Thanks for the quick reply.

Sorry I forgot to mention that the Advertising catagories descriptions are set up and editable by the end user so they are not always the same description in each database.
 
Uh-oh, you need and intervention as you obviously have a Crackhead DBA on the staff.

Tables without relationships are unusable as relational tables.

Care to rephrase this: "The catagory descriptions would not normally not have more then 20 records.", This implies that they normally have more than 20 by the use of a double negative.

Rather than a description of data, you should post data examples for BOTH tables. You show data for the first table, then chat about the second table instead. Why mention the second table if it isn't part of the requirement anyway?

Since you have differing descriptions, your best solution is to COREECT THE DATA, because it's wrong.

Generally someone would create another table with descriptions in it, and in your table, place an ID for the description, that way the description is saved only once, in the reference table.

You might cheat this now dy doing a select distinct from the table, then create a reference table that joins by the deswcription, but has another field which has the name standardized, and do your summaries against the reference table standardized name.

Anyway, think your post through and what your data looks like, and what your requirements are and post again if the above doesn't resolve.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top