The Reporting Services bug which removes the MDX you've previously typed into the query designer is not a new one. It has been well documented however for the purposes of clarity, I'll review it here too.
You have a SQL 2005 report which uses an SSAS data source. Rather than using the MDX designer, you write your own MDX because you need to do more than the weak-arse SSRS MDX designer can do. All works well you save, deploy, close, whatever. Some time later you come back to it to make a change. You open your Visual Studio project and when you click on the dataset the query is no longer there - you are presented with the blank MDX designer pane as if your query never existed.
It's worth noting that, your query isn't actually gone at this point. Just don't hit SAVE!
If you close the report, right-click it in the Solution and select View Code. Do a search for a
The common answer directs you to the knowledge base and a particular hotfix which was included in SP1. However, as an SP3 user, I'm currently experiencing the same problem and installing the hotfix solved nothing.
I believe this knowledge base item is no longer relevant because when I look at my report's code-behind by selecting View Code, there is no
Googling the issue has also found suggestions like updating your version of SQL Express to the latest service pack. Well, I don't have SQL Express installed at all so it ain't that.
I have had the problem before but I couldn't find a reasonable solution then, as now, either. What did I do to fix it before, you ask? The answer is unfortunately quite painful. I reinstalled BIDS.
Loathe to go through that pain again, I started thinking about what changed since it stopped working this time. Well, loads obviously. But the most obvious change? Installing Visual Studio 2010 Professional.
Wednesday, 12 January 2011
SSRS: Disappearing MDX Queries
Posted by
Kristen Hodges
at
11:14 am
0
comments
Labels: BIDS, Business Intelligence Designer, MDX, Reporting Services (SSRS), Visual Studio, Visual Studio 2010
Wednesday, 10 October 2007
SQL CLR .Net Function - Split
Having needed a split function many times in the past, I've always utilised patindex and done it the hard way…. And when it comes to nvarchar values, forget about it! So today I took a few minutes to write a SQL CLR function to do it. The function takes a string and a delimiter and returns a table of string values. Here are the instructions for those who may want to do the same thing… using System; public class CSRSplitString public static IEnumerable udfclrSplitString(SqlString InputString,SqlString Delimiter) sp_configure 'clr enabled', 1 CREATE ASSEMBLY CSRSplitString CREATE FUNCTION udfclrSplitString select *
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Collections;
{
[SqlFunction(FillRowMethodName = "FillRow")]
{
return InputString.Value.Split(Delimiter.Value.ToCharArray(0, 1));
}
public static void FillRow(object row, out string InputString)
{
InputString = (string)row;
InputString = InputString.Trim();
}
}
GO
RECONFIGURE
GO
FROM 'D:\<YourDLLName>.dll'
WITH PERMISSION_SET = SAFE
(@String nvarchar(4000),@Delimiter nvarchar(1))
RETURNS
TABLE (ArrayItem nvarchar(4000))
AS EXTERNAL NAME CSRSplitString.CSRSplitString.udfclrSplitString;
Where external name is MyDotNETAssembly.MyClassname.Method
from udfclrSplitString('Kristen,Patrick,Julian,Werner,Koe',',')
You should get 5 rows back …
Select a.name as DbNameOriginal,s.*
from msdb.sys.databases a cross
apply udfclrSplitString(a.name,'_') s
where a.name like '%_%'
You will need to have the function in the msdb database for this example to work
Posted by
Kristen Hodges
at
2:14 pm
4
comments
Labels: CLR, SQL, Visual Studio
