Link to home
Start Free TrialLog in
Avatar of jnsimex
jnsimex

asked on

Report Builder Grouping Question

Hi Experts

I am using SQL Report Builder to create this report.

It is grouped by the first 3 characters of the Account ID i.e. =Left(Fields!AccountID.Value,3)

I have just been asked to move accounts 102-010-07 and 102-010-13 from the 102 Account Group and have it moved to the 101 Account Group under the "Subtotal - Tickets" where it will have its own subtotal and be part of the 101 total.

How would I accomplish this?

User generated image
Avatar of John_Vidmar
John_Vidmar
Flag of Canada image

Replace your current grouping-expression with this one:
=IIF	(	Fields!AccountID.Value = "102-010-07"
	OR	Fields!AccountID.Value = "102-010-13"
	,	"101 "
	,	Left(Fields!AccountID.Value,3)
	)

Open in new window

Avatar of jnsimex
jnsimex

ASKER

Hi John,

I changed my grouping expression to yours but the account 102-010-07 and 102-010-13 didn't change to 101. They remained the same account ID on the report.

 User generated image
ASKER CERTIFIED SOLUTION
Avatar of John_Vidmar
John_Vidmar
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jnsimex

ASKER

Thanks you! It was the trim that solved it