Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
980 views
in Technique[技术] by (71.8m points)

reporting services - Format Currency column dynamically

I have the following report in SSRS:

EmployeeNumber EmployeeName Team  Revenue
1              Jack         AA-JP €100
2              Mandy        CY-JP €150
1              David        PA-DK €300

The query behind is :

SELECT *
FROM T1 (NOLOCK)
WHERE YearNo IN (@dd_YearNo)
AND (WeekNo BETWEEN @txt_WeekNoFrom AND @txt_WeekNoTo )
AND LEFT(Team,2) IN (@dd_Group)
AND Team IN (@dd_Team)
AND SalesPerson IN(@dd_SalesPerson)

The parameters are the result of a query each one. I want to format the Revenue column to set ¥ for employees who belongs to teams ending with JP and the others will be € by default

question from:https://stackoverflow.com/questions/65904631/format-currency-column-dynamically

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In the Design part of your SSRS package, right click on Revenue cell and go to Text Box properties:

enter image description here

Go to Number > Custom : enter image description here

In the expression editor :

=IIF(RIGHT(Fields!Team.Value,2)="JP","¥ #,##0","€ #,##0")

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...