Solved

SSRS use a expression in calculation

Posted on 2014-08-01
3
410 Views
Last Modified: 2014-08-01
Hello Experts Exchange
I have a SSRS report that has a couple of calculated expressions, I want to take one of the expressions and use it in a new calculation.  Is there a way to may a expression a variable so I can use it in a calculation?

Regards

SQLSearcher
0
Comment
Question by:SQLSearcher
3 Comments
 
LVL 12

Accepted Solution

by:
Harish Varghese earned 500 total points
ID: 40233667
Yes. You can give a name to your first expression filed and refer to that as ReportItems in another expression. But there are restrictions in doing this when you use aggregate functions.
For example, if you use below expression in a cell in Taxlix and the name of that cell (TextBox) is txtAmount:
=Fields!Qty.Value * Fields!UnitPrice.Value

Open in new window

You can use below expression referring to above formula as:
=ReportItems!txtAmount.Value/100

Open in new window

0
 
LVL 15

Expert Comment

by:Vikas Garg
ID: 40233669
Hi,

Yes you can copy the value of your expression to a parameter and then can use that parameter in other expression or calculation

SSRS
0
 

Author Closing Comment

by:SQLSearcher
ID: 40233779
Thank you for your help.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
How to use Variables  and Custom code in SSRS report and Assembly reference to use compile shared code in SSRS. Its big question for all who are working with SSRS. It is easy to create assembly and refer in SSRS report, still there are some steps…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now