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

Using parameters in crosstab

Status
Not open for further replies.

hstan

MIS
Apr 12, 2002
11
0
0
SG
Hi, need some help.

I'm new to Crystal Report 8.0.

I'm trying to create a crosstab report and have the option of selecting the desire city and display the respective amount.


I've no problem creating a crosstab report which contains all records.

-------------------------------------------
CityA CityB CityC Total
Product A 5 1 2 8
Product B 3 7 3 13
Product C 4 4 4 12
-------------------------------------------


I'm trying to create a parameter that achieve the following results:

-------------------------------------------
CityA CityB Total
Product A 5 1 6
Product B 3 7 10
Product C 4 4 8
-------------------------------------------

I've managed to create a parameter (discrete, multiple values). But when I tried to create the formula, it always gives me the error "This array must be subscripted. For example: Array"

Can anyone please kindly help? Thanks!

 
Use the parameter in your record selection formula:

{table.city} = {?city}

Then in the crosstab, use {table.city} as your column.

-LB
 
Thank you so much for your help lbass!

But it seems like something is not right. This is what I've got.

(I've selected "CityA & CityB" in the parameters)


-------------------------------------------
False True Total
Product A 2 6 8
Product B 3 10 13
Product C 4 8 12
-------------------------------------------

* It actually consolidates both CityA & CityB under "True".

How can I show only those I've selected?


 
The following belongs in the record selection formula area (report->edit selection formula->RECORD), not in the crosstab column:

{table.city} = {?city}

The crosstab column field should be: {table.city}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top