.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Default date selection in SSRS with SSAS cube as a source

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :Sql Server



I am fairly new to SSAS and I am hoping that someone can help me with an issue I am experiencing.  I am create a SSRS report that goes against a SSAS cube.  My cube has a Date dimension with a Fiscal Year - Fiscal Quarter - Fiscal Month hierarchy.  In my report I have created filters for a From Date and a To Date, which are populated with the hierarchy of the Date dimension.


I need to default the filters as follows:


To Date = current quarter (that is the last quarter with fact data)

From Date = the To Date quarter from the previous year (e.g. if To Date quarter = Q1 2008, then From Date quarter needs to be Q1 2007)


I found some SSAS code that allows me to get the index of the last quarter with data, but I am stuck at this point.  I am not sure how I can translate this into a default selection for the To Date SSRS report parameter.  I also realize that there may be a better approach.



View Complete Post

More Related Resource Links

How to enable caching on SSRS that using SSAS cube to bind data


Hi All 

 How to set Cach refersh option for a SSRS report that using SSAS cube to bind data 

when i tried to store credential in data source getting error as show below 

"Non-Windows user credentials were supplied for a non-http connection to Analysis Services. The Microsoft SQL Server Analysis Services data extension requires Windows Integrated Security unless connecting via http or https."





SSRS 2008 Interface with cube data source


Hi All,

Need some brainstorming and your experience here. Here is a situation and would like to understand your thoughts on this.

1. We have developed some cubes using SSAS 2008 to analyse the data.

2. We had some reporting requirement in the past and we decided to use our cube as a data source for the reports and develop using SSRS 2008.

3. We have developed many reports using the SSRS.

4. Now when the reports are passed on to the end users, they are not liking the SSRS interface...like at present we cannot increase the size of the drop down box, sorting any many other things..

As you might already know the SSRS interface i

How to send filter values to a PivotTable filter when using SSAS cube as data source?



I have created a custom filter web part that implements IWebPartParameters. I'm able to send values from this web part to and Excel Web Access web part and get it to set a pivottable filter based on this value.

Now, I want to do the same for an Excel Pivottable that's connected to an SSAS cube. However, I can't get the parameter value to set the filter. Is there some special format that I need to send the values in to be able to set a pivottable filter for a SSAS cube?


range inclusive ssrs report builder using SSAS as source unsolved



I am trying to use MDX query designer in SSRS report builder. I choose a date dimension and i need to include a range for it . So i selected range inclusive as the filter.

When i do that and give default dates it works fine. When i select parameters it and hit ok. it immediately throws a error.

"Query (1, 216) The restrictions imposed by the CONSTRAINED flag in the STRTOMEMBER function were violated."

So i went ahead changed it to scripting mode and removed the "constrainted" flag and ran it . but then a different error comes up


then i get this error.

"Query (1, 216) The STRTOMEMBER function expects a member expression for the 1 argument. A tuple set expression was used."

what do i need to do to make this compile correctly. Please suggest. I am working on this for 2 weeks. 

SSRS 2008 date validation

Hello, Perhaps somone can shed some light on this. I want to make sure the user doesn't set a Startdate > EndDate  in a report. I've done some thing like this: Go to the Report Properties under the Report menu and place this code to the Code Tab. Public Function CheckDate(SDate as Date, EDate as Date) as Integer Dim msg as String msg = "" If (SDate > EDate) Then msg="Start Date should not be later than End Date" End If If msg <> "" Then MsgBox(msg, 16, "Parameter Validation Error") Err.Raise(6,Report) 'Raise an overflow End If End Function Then go to the Report Parameters and Add named it XXX with the datatype is string. Checked the Hidden and Allow blank value ckeckboxes. In Available Values choose Non-Queried and from Default Values choose Non-Queried in right side of textbox then press the FX button then paste this code. =CODE.CheckDate( .Value) But I'm having problems with the =CODE.CheckDate( .Value)  syntax. SSRS errors out. Any suggestions/insights? --joe

ssrs 2008 R2 - report parameter with no default set throws java script error

We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports. It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection. Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.

OLE DB Error: Network-Related or Instance-Specific while Deploying SSAS 2008 Cube

Hi, I encountered the below listed error while attempting to deploy SSAS 2008 DB: Error 1 OLE DB error: OLE DB or ODBC error: Login timeout expired; HYT00; A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Named Pipes Provider: Could not open a connection to SQL Server [5]. ; 08001.  0 0  I am running a standalone MSSQL 2008 named instance on Windows Server 2008 R2. Here are the steps I have taken but yet the issue is not resolve: 1) Enable Remote connections on the server 2) Enable TCP\IP 3) SQL Browser is Running 4) Set Firewall Inbound Exceptions for SQL Browser, Default Port 1433, UDP Port 1434 5) Using Management Studio I can successfully connect to the MSSQL named instance from the app server 6) I can ping I MSSQL box from the app server 7) Read and implemented all steps in the MSDN post below: http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx Thanks for your help.

ssrs 2005 default value generates report

Hi, If all parameters have default value the report generates as soon as i load the report. Is it possible to only run the report when clicking on the view report button even if all parameters have default values? Thanks

SSRS Table hide duplicate by date

Hi, I am parikshit deshpande i am working in SSRS 2005 from last three months. I am trying to solve this problem please help me for that, I have one table as per  Date                     Shift                               Tons                       Passes 1/1/2009            Day                                    Formula                  Formula 1/1/2009           Swings                            1/2/2009           Day 1/2/2009     &nb

SSRS 2008 R2 - OnPostBack from ReportParameter - if no default set, throws Value can not be null

SSRS 2008 R2 - OnPostBack from Parameter selection - if no default set, throws Value can not be null java script error. This does not happen with SSRS 2008, only with R2. and only with report parameters that do not have a 'default' set.  Any suggestions would be greatly appreciated.

Shared dataset in SSRS 2008 R2 running on SSAS 2005

I am trying to create a report in SSRS 2008 R2 using SSAS 2005 as a datasource. My dataset has a date parameter. When I create an embedded dataset in my report everything works fine, but when I create a shared dataset with the exact same mdx query, I get the following error: An error occurred during local report processing. The definition of the report 'xxxx' is invalid. The Value expression for the report parameter 'DateCalendarHierarchy' contains an error: [BC30034] Bracketed identifier is missing closing ']'. Does anybody have any ideas? Is this a bug? Thanks, Louis

AdomdDataAdapter.Fill returns memory error when querying an SSAS Cube(2008)

For certain SQL's I will get the following error when calling the Fill method on an AdomdDataAdapter object. "Memory error: While attempting to store a string, a string was found that was larger than the page size selected. The operation cannot be completed."   Snippet of Code: DataSet ds1 = new DataSet(); AdomdCommand acmd1 = cn1.CreateCommand(); acmd1.CommandText = "SELECT ..."; AdomdDataAdapter ad1 = new AdomdDataAdapter(acmd1); ad1.Fill(ds1);   Now when we run this query in Ms Sql Studio we don't get any errors but the query returns 1 row with over 40,000 columns. I'm guessing the # of columns might be an issue but not sure.   When doing a Google search it appears that this problem was found in the 2005 and fixed in that version. Have any of you come across this problem?  

SSAS Cube & Pivot table

Hello, I am connecting to my SSAS cube through excel Pivot table. I have the following questions: 1) I have a filter for Company. However, instead of selecting multiple companies from a drop down list, I would like to have a range e.g. Company between 100 and 200. We have this "Filter expression and operator" option in SSAS but I dont see in excel. 2) I have 90 users who will be using my cube via pivot tables. How do I automatically have the data in excel refresh automatically such that when the user comes in, in the morning and open the pivot table, they have the refreshed data. Instead of them manually refresh it as it runs the query for a long time. Thanks in advance for all your help and suggestions! KJ

Not Null Date Default

I'm one of the people that try to avoid nulls when ever possible, usually using defaults.  This is especially important since my apps do a lot of data exchange with external entities often involving flat files.  A flat file can't distinguish between a null or an empty value so to ensure consistancy between data types in both systems I try to make sure every field has some value.  (E.g., If I have a null or empty string in a char field type a CSV flatfile shows ',,' for both.  The target system might interpret this as an empty string or a null; I have no direct control.  This could result in a null in one system and '' in another losing consistancy.  For charactor and number types this is rarely a problem if I communicate that there are no null fields in the data, but for dates it often becomes an issue. Is there a industry standard approach to managing "empty dates" so I can make date fields not null and empty? Thanks

Plot Running total charts from SSAS Cube

Environment: I am using SQL Server 2008, I have installed SSIS, SSAS and SSRS. Objective: Create a Effort V/S Defect plot in SSRS 2008 Approach: 1. Created the SSAS cubes with Effort and Defects data by timeline (rollup of data based on Week ending date) 2. Created SSRS project and linked the dataset to SSAS cube. But i am unable to plot a Effort (X-Axis) v/s Defects (Y-Axis). As soon as i drag the measures into the query designer in dataset properties, the effort rollup will break. Following is the data that has been created in SSAS. I need to plot a graph of Hours v/s defects (Running total). Please guide me on how to plot the graph using SSRS 2008 from the already created SSAS cubes Week Of Hours Defects 10/24/2009 8   11/7/2009 63   11/14/2009 68   11/21/2009 80.5   11/28/2009 139   12/5/2009 221.25   12/12/2009 131.75   12/19/2009 124.5   12/26/2009 61.5   1/2/2010 73   1/9/2010 153.5   1/16/2010 149.5   1/23/2010 196   1/30/2010 163   2/6/2010 155.5   2/13/2010 178   2/20/2010 138   2/27/2010 161.5   3/6/2010 189   3/13/2010 191.9   3/20/2010 240.5 9 3/27/2010 260.2 5 4/3/2010 214.5 13 4/10/2010 274.6 24 4/17/2010 200.5 15 4/24/2010 227 9 5/1/2010 237.05 18 5/8/2010 190.5 12 5/15/2010 156.25 6 5/22/2010

SSRS Report Parameter Auto selection

HI All    I have a report paramater 'ParamBranches' which list all branches say aa,bb,cc etc ... and another report parameter is 'ParamBranchStartswith' So when i type in 'a' in Branh Starts with paramter -  the 2nd parameter that is ParamBranches will be filled with "select ",  "aa"   As there is only one Branch starts with 'a' ,  Is there any way to autoselect the Branch 'aa'  in Branches list , rather than user manually selects 'aa'       Regards Sooraj

Cube Writeback SQL Server 2008 R2 (SSAS, write back)

CUBE WRITE BACK in SQL SERVER 2008 R2 Did anybody get the SSAS write back functionality to work against a decent sized datawarehouse? I'm not asking about a little demo but a significant sized footprint e.g. 14M Rows measures, 6-8 wired Dimensions with 8-10 attributes each. I setup a test server using a Dell XEON ( 2x4core) with 48 GB RAM hardware and the latest Sql Server 2008 R2 release. I used the What-If scenario in Excel 2010 and modified a higher level, hoping SSAS would push the values down. After about 15 minutes and after having used 48 GB memory (on average 5% CPU) Excel throw an error - short on memory - and stopped the action. I found the same behavior in Sql server 2005 and 2008 and was hoping this would work now but apparently not so. Here are my questions: Is anybody using this at all? how can one calculated (roughtly) how much memory is requiered? is there any paper that describes best practise? Thanks for any help in advance, Dirk  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend