Showing posts with label activity. Show all posts
Showing posts with label activity. Show all posts

Friday, March 30, 2012

Grouping Question

I have data from a dataset like this:

Dte Activity Agent Hours

-- - -

5/1/2007 activity1 agent1 11.0

5/1/2007 activity1 agent2 5.0

How would I group this data in a Table to display like this:

5/1/2007 activity1 agent1 11.0

agent2 5.0

What i've tried so far:

1) Using previous() to blank out Dte and Activity columns if previous is same as current. Does not work becuase agent2 shows many lines below agent1 depending on the size of activity(this field could be very long)

2) Grouping by Dte and Activity would not concat agent field and/ or hours field into one string.

3) Don't want to group concat in database if i don't have to. This makes suming values difficult on the reporting side.

Any ideas?

Thx

clarification:

1st grouping is date
2nd grouping is activity number

So why not just have two groupings?

(how do you tables in these forums?)

assume below is a grid 4 cols by 3 rows, representing a table in RS
where the top rop is "grouping one"
second row is "grouping two"
third row is detail
col1, row1: =fields!DateValue
col2,row2: = fields!ActivityValue
col3,row3: = fields!OtherData1.Value
col4,row3: = fields!OtherData2.Value
...etcsql

Monday, March 26, 2012

Grouping dissimilar data

I��m trying to build a report that contains bank account activity.For 3 customers their activity is this:

Deposits

DateAmount

John1/2/2007500.00

1/7/2007250.00

Mary1/3/2007100.00

Withdrawals

DateAmount

John1/3/2007100.00

Mary1/2/2007100.00

1/4/2007200.00

1/6/200750.00

Sam1/6/200750.00

I would like the report to have deposit/withdrawal info, with subtotals, grouped by customer, looking something like this:

Deposit Withdrawal

Cust DateAmountDateAmount

John 1/2/2007500.001/3/2007100.00

1/7/2007250.00

750.00 100.00

Mary1/3/2007100.001/2/2007100.00

1/4/2007200.00

1/6/2007 50.00

100.00 350.00

Sam 1/6/2007 50.00

0 50.00

Because the deposit and withdrawal data is only related by customer, I��ve broken it into 2 datasets.

I��m totally stumped!Can someone get me going in the right direction on this?

Thanks

Hi,

You can't put 2 datasets in one dataregion. To do this, I think it is best to do a Full Outer Join on the two sets based on Customer and Date. This way you can have records like:

CUST DEP_DT DEP_AMOUNT WIT_DATE WIT_AMOUNT
John 1-2-2007 500 NULL NULL
NULL NULL 1-3-2007 100
1-7-2007 250 NULL NULL

Hope this gets you started.

Greetz,

Geert

Geert Verhoeven
Consultant @. Ausy Belgium

My Personal Blog