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

Detail formatting using parameters?

Status
Not open for further replies.

Focl

Programmer
Aug 3, 2006
7
0
0
US
I have a detail section with a running total for DEPT A sales by week. This works fine using a parameter for the {?Department}. It looks like this
DEPT A
3
6
11
.

I am having trouble once I change it to a multi-select parameter. I want to be able to select DEPT A and DEPT B and have the report show running totals by dept:
DEPT A DEPT B
3 1
6 7
11 12
. .

Do I need separate selection formulas for each field?
 
Pretty vague.

We don't know your data structures, your software version, the database used, what this running total is doing, and we don't know what "I am having trouble once I change it to a multi-select parameter" means.

Try posting specifics.

You might use a cross-tab and place the dept field as the column and the value to perform an aggregate on in the summary field.

Impossible to know from this post.

-k
 
Sorry... I am using CR 10 accessing a single flattened warehouse table indexed by DeptID on MS SQL SERVER.

The table in SQL Server has counts by week for each dept. I thought I could just add an additional text field to the report which would be filtered by the 2nd paramter I passed in from the mutli-select dialog.
 
Here is the slection criteria:
{DW_DEPTS_WEEKLY.WEEK_NBR} in {?Program Start Week} to {?Program End Week} and
{DW_PRODUCTS.DEPT_CODE} = {?Department Code}
 
You could try
Code:
{DW_PRODUCTS.DEPT_CODE} in [{?Department CodeA}, {?Department CodeB}]
But this would put them separately, not in columns.

As synapsevampire said, a crosstab would do it. Just choose Insert > Crosstab and the software does the rest, giving you sensible choices that should have obvious answers.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top