Avatar of stevenofva
stevenofvaFlag for United States of America

asked on 

Variable question in SSRS reporting

Hi,
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.
Thanks
Steve


 User generated image User generated image
SSRS

Avatar of undefined
Last Comment
stevenofva
ASKER CERTIFIED SOLUTION
Avatar of Alpesh Patel
Alpesh Patel
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of stevenofva
stevenofva
Flag of United States of America image

ASKER

Thank you PatelAlpesh for the information
SSRS
SSRS

SQL Server Reporting Services (SSRS) is a server-based report generation software system from Microsoft. It can prepare and deliver a variety of interactive and printed reports and is administered via a web interface or its web service. Its web services interface also supports the development of custom reporting applications. Finally, SSRS can also be integrated with SharePoint. SSRS competes with other business intelligence tools, most prominently Crystal Reports.

10K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo