ssrs-2012

SQL Server Reporting Studio report showing “ERROR#” or invalid data type error

雨燕双飞 提交于 2019-12-03 10:16:46
I struggled with this issue for too long before finally tracking down how to avoid/fix it. It seems like something that should be on StackOverflow for the benefit of others. I had an SSRS report where the query worked fine and displayed the string results I expected. However, when I tried to add that field to the report, it kept showing "ERROR#". I was eventually able to find a little bit more info: The Value expression used in [textbox] returned a data type that is not valid. But, I knew my data was valid. Found the answer here . Basically, it's a problem with caching and you need to delete

How to display top 10 based on total amount in SSRS 2012

南笙酒味 提交于 2019-12-02 18:34:41
问题 I need to display only top 10 Class based on Total (SUM(Premium)) column. I go to group ClassCode properties --> Filters and setting top 10 by SUM(NetWrittenPremium) but it doesnt work. I need to display only top 10 and also the total amount should be for only those 10. Cant understand how to achieve it. here is my query: ;WITH cte_TopClasses AS ( SELECT c.YearNum, c.MonthNum, DD.ClassCode, ISNULL(SUM(prm.Premium),0) as NetWrittenPremium FROM tblCalendar c LEFT JOIN ProductionReportMetrics

SSRS Records Not Showing Up When (Select All) Is Used But Is When Selecting A Particular Value

强颜欢笑 提交于 2019-12-02 12:16:05
问题 I have a report that is has a multiple value parameter. It has available values (1, 2, 3, 4, 5, and blank). The blank value isn't NULL it is just an empty cell. For testing purposes, there should only be one record showing up. The record has a blank value in the cell that I am using to filter on in my stored procedure. In the parameter drop down, I see all of the options. If I choose the (Select All) option, I don't get the record I am wanting. However, if I choose just the blank value, I get

MDX Query to return the number of records

狂风中的少年 提交于 2019-12-02 10:57:48
Below is my MDX query SELECT NON EMPTY { [Measures].[Fact Sample Count] } ON COLUMNS, NON EMPTY { ( [Fact Sample].[Sample Reference No].[Sample Reference No].ALLMEMBERS ) } ON ROWS FROM [LIMSInstCube] WHERE ( [Dim Material Master].[Material Master ID].&[999] ) So it gives 10 records as my out put. I have a requirement where I have to show the number of records that are returned from the query i.e 10. Can any one please help me how to get the records count. This should get you the count: NonEmpty ( {[Fact Sample].[Sample Reference No].[Sample Reference No].ALLMEMBERS}, ([Dim Material Master].

How to display top 10 based on total amount in SSRS 2012

余生长醉 提交于 2019-12-02 07:39:07
I need to display only top 10 Class based on Total (SUM(Premium)) column. I go to group ClassCode properties --> Filters and setting top 10 by SUM(NetWrittenPremium) but it doesnt work. I need to display only top 10 and also the total amount should be for only those 10. Cant understand how to achieve it. here is my query: ;WITH cte_TopClasses AS ( SELECT c.YearNum, c.MonthNum, DD.ClassCode, ISNULL(SUM(prm.Premium),0) as NetWrittenPremium FROM tblCalendar c LEFT JOIN ProductionReportMetrics prm ON c.YearNum = YEAR(prm.EffectiveDate) and c.MonthNum = MONTH(prm.EffectiveDate) AND CompanyGUID =

MDX SSRS Parameter category chooses all sub category

家住魔仙堡 提交于 2019-12-02 07:04:22
I have been looking all over stackoverflow for this and I can't figure it out. So I have a dataset using a SSAS cube, and it has two parameters. It has a category and subcategory. I already created the datasets to populate these parameters and they work fine when I select them both. The way my report runs is that it is a collection of subreports in a table and it is grouped by the category and sub grouped by the subcategory. So When I select the category parameter, it lists each sub category for all the sub reports. What I am trying to do is getting a total of all the subcategories within that

Excel Function within SSRS 2012

丶灬走出姿态 提交于 2019-12-02 06:27:23
问题 From what I have read this may not be possible but thought it was worth asking, I am trying to Export a SSRS 2012 report but maintain an Excel Function at the same time. I have a Text Box in my SSRS report which when export always appears in Row/Column D33 I have a figure of 20. I have coded in to a Cell on my report =D33* "a figure that is returned in the report , the Expression I have used is ="=DD3*"&Cint(Fields!LABC_Hours.Value) , when exported this comes out as =D33*5 but what is should

Excel Function within SSRS 2012

心已入冬 提交于 2019-12-02 02:34:37
From what I have read this may not be possible but thought it was worth asking, I am trying to Export a SSRS 2012 report but maintain an Excel Function at the same time. I have a Text Box in my SSRS report which when export always appears in Row/Column D33 I have a figure of 20. I have coded in to a Cell on my report =D33* "a figure that is returned in the report , the Expression I have used is ="=DD3*"&Cint(Fields!LABC_Hours.Value) , when exported this comes out as =D33*5 but what is should be doing is the calculation =20*5. Is there a way of doing this? Thanks in advance. Short answer is no.

Dynamically Set the to Address in SSRS reports Subscription

℡╲_俬逩灬. 提交于 2019-12-01 21:14:27
I show a list of items with a field Assigned to, which are email addresses. Right now I have set up a subscription with distinct list of assigned to email addresses and sent the entire items list to all the users. I want to sent only the items assigned to a particular user to that user; Instead of having to sent all the items to all the users. Can this be done in SSRS? I would have to dynamically set the To address, and filter out the result dataset. Sounds like you need to set up a data driven subscription which is available with the enterprise edition of SSRS 2012. Create the report with a

SSRS Count IF Multiple values

时光怂恿深爱的人放手 提交于 2019-12-01 15:55:52
问题 I'm creating an education report. I have a bunch of grades and I would like to sum the number of grades A - C. Something like SUM WHERE Grades IN ('A', 'B', 'C') How do I do this in an expression? Can I do a SUM on a Choose statement or something? I tried =SUM(Choose(1, "A", "B", "C")) but I couldn't get it to work. 回答1: You need to combine a Sum statement with an conditional statement like IIf : =Sum( IIf(Fields!Grades.Value = "A" or Fields!Grades.Value = "B" or Fields!Grades.Value = "C" , 1