Variable question in SSRS reporting

Posted on 2011-10-07
Medium Priority
Last Modified: 2012-05-12
I am new to SSRS reporting so bare with me. I am trying to get an aggerate total from setting up a report variable in SSRS. I then need this total to use in another expressoin to come up with a percentage. When I use the field that starts with first it gives me and error the virables(grandtotal) vaue expresson for the report body uses aggregate function first, last or previous. Thes aggregate functions cannot be used in varible value expressions. If i use a summary field it tells me I believe that you can't use a summary field in a variable. I got by setting up another dataset and in the query I use the left function to just look at the first character of the class field to get the total for all non-exempt records. I set the sequel statement to just total for all records that the class begins with a value less than '7'   then I put a summary on the assessment field. The  class number start with 301 and go up to 504 for non-exemp properties. The exempt properties class start at 710. I  included the code below for the report variable that I was trying to set up   I thought setting  up a varible was the correct way of getting the aggegate total instead of adding another dataset. If I have to use the dataset way I will need to add another one for exempt properties.    

=IIF(First(Fields!PClas.Value, "nonExemptClass"))< '7',
Sum(Fields!pbm_TotalAssessment.Value, "nonExemptClass")
I also included a screen shot of the fields.

 Screen shot of the dataset fields Screen shot of the dataset fields
Question by:stevenofva
LVL 21

Accepted Solution

Alpesh Patel earned 2000 total points
ID: 36935021

Author Closing Comment

ID: 36943996
Thank you PatelAlpesh for the information

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

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 …
This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…

621 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