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

Crystal Arrays Help

Status
Not open for further replies.

nag999

Programmer
Apr 16, 2003
33
IN
Hi

I had a situation, where we want to show all the categories. I had 4 categories
fixed. But when we bring the products report,we have the products in 3 categories
and report is shown as below


Categoies Products count
Cat 1 23
Cat 2 30
Cat 4 33

But Since I want to show the Category 3 with 0 products, How shall I do this. I cannot
to do any changes at database level.I know that there are only 4 Categories for now.
I want show it as below.

Categoies Products count
Cat 1 23
Cat 2 30
Cat 3 0
Cat 4 33


Is it possible to use arrays in crystal. can anybody give some information on this?

Regards
Nagaraj
 
You can use arrays, but there's a simpler solution. Do four running totals, one for each category. Put these in your report footer to show cases where there were no cases for that category.

Madawc Williams
East Anglia, Great Britain
 
Consider using the table of categories on the left side of a left outer join to the products table.

Group by category and count the products.

The RT solution is a quick fix given that categories never change, increase or decrease, but this is the way to resolve it permanently.

-k
 
Hi Dudes,

Yes. That is true. But there is a restriction to not make any changes to the views which are created already. So that was reason i was try to resolve it from crystal end. You are correct synapsevampire*. I think i will try our williams idea also. Btw how to loop thru an Array and display it at Detail section. Can any body provide any light on how to work the same with arrays.


Thanks,
Nagaraj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top