I am facing some issues with parameter in SSRS reports that when my parameter contains the space then i get the syntax error can be seen below.If i choose any other parameter value which do not contains the space then it works well. I am using SSAS cube as a data source.
I want to create a parameter in SSRS and use it in the MDX query.But when i am trying to access the parameter , the resultset is returned blank.I want to get only the logo matching the customer number.parameter field is a double type. Below is the query listed.
With Member [Measures].[Logo1] AS Case When IsEmpty([Client].[Logo].MemberValue ) Then 'logo-chemwatch.jpg' When len([Client].[Logo].MemberValue)=0 Then 'logo-chemwatch.jpg' Else ([Client].[Logo].MemberValue) End SELECT {[Measures].[Logo1] } ON COLUMNS, { ( [Client].[Logo].[Logo].ALLMEMBERS)} ON ROWS FROM [Chem Watch] Where [Client].[Customer No].[Parameters!Location.Value]
I am trying to calculate a measure based on parameter passed I have a liquidation rate of amount/facevalue when the dimension attribute is 'all' and i will like to the 'amount' to change based on the parameter passed and the 'facevalue' should not changed , i tried with the code below.
What I noticed is when i add a calculated member to return the currentmember of the cell member
measures.strat as [Strategy].[ICS].CURRENTMEMBER.uniquename it comes back as [Strategy].[ICS].[All]
even when I changed the default value for the parameter to another member like red
WITH MEMBER MEASURES.TEST AS (( CASE WHEN [Strategy].[ICS].CURRENTMEMBER.uniquename = '[Strategy].[ICS].[All]' THEN [Measures].[Measures].[AMOUNT]
how to handle space between multi-value parameter values in SSRS. For e.g. if the values are as follows -'KLO LUG', 'HGY KIU', 'LOT JUY', I know I can use the split function for the commas but its the space between the value which is the problem.
Does anyone know of a link or list that has all the parameters for the "rs:" section of the URL access parameter, except for the ones in the Microsoft books?
I need "conditional" cascading parameters: In Report Manager when one changes parameter 1, parameter 2 get changed based on parameter 1. Optionally, one can also enter values to parameter 2 directly.
I was able to achieve this in SSRS 2000 (SP2) with the following setups. SSRS 2005 and SP1 no longer works - Parameter 2 always shows its default value regardless whether one select a value in Parameter 1 or not.
Parameter 1 available values: from query default values: non query (specify a value "<None>") Parameter 2 available values: Non query (no value specified) default values: from query (based on Parameter 1)
It seems to me that the default value in SSRS 2000 is considered as cascading parameter. But it is no longer the case in SSRS 2005.
Is this a SSRS 2005 bug? is there any other work arounds or suggestions?
I would like to be able to adjust the multi-value property of a parameter based on the value of another parameter in my report. The controlling paramter would be binary with two options for Single or Multiple selection. I would like my parameter to default to multi-value, which I can do on the screen selection. I have tried to add an IIF statement to the XML code, with no success. Any ideas would be helpful.
I'll go to a dataset, open up the query designer, add a new parameter, then refresh the fields, but the parameter won't be added as a report parameter. If I go to the dataset properties under the list of parameters, the value in the dropdown will be blank. However, sometimes this will automatically add.
Is this a bug in Visual Studio? How do I get around this?
I have a table with a Text column. A sproc that selects from this table has the following code: ALTER PROCEDURE [dbo].[ErrorLogSelect] ( @RecId INT = NULL, @DateFrom DATETIME = NULL, @DateTo DATETIME = NULL, @SeverityFrom INT = NULL, @SeverityTo INT = NULL, @AppName VARCHAR(50) = NULL, @ComputerName VARCHAR(32) = NULL, @StackTrace VARCHAR(8000) = NULL, ) AS
BEGIN SELECT @StackTrace = '%' + @StackTrace + '%'
SET NOCOUNT ON; SELECT RecID, ErrDateTime, ErrNumber, ErrDescription, StackTrace, Source, ProcName, UserName, ComputerName, NetworkName, AppVersion, AppName, AppExe, OtherInfo, Severity, PCs.Location FROM SWErrorLog LEFT OUTER JOIN PCs ON ComputerName = dbo.PCs.PcNumber WHERE RecId = COALESCE(@RecId, RecId) AND ErrDateTime >= COALESCE(@DateFrom, ErrDateTime) AND ErrDateTime <= COALESCE(@DateTo,ErrDateTime) AND Severity >= COALESCE(@SeverityFrom, Severity) AND Severity <= COALESCE(@SeverityTo, Severity) AND AppName = COALESCE(@AppName, AppName) AND ComputerName = COALESCE(@ComputerName, ComputerName) AND StackTrace LIKE @StackTrace) ORDER BY ErrDateTime DESC END
When I execute this like this: EXEC @return_value = [dbo].[ErrorLogSelect] @RecId = NULL, @DateFrom = NULL, @DateTo = NULL, @SeverityFrom = NULL, @SeverityTo = NULL, @AppName = NULL, @ComputerName = NULL, @StackTrace = 'OneWord', @ErrDescription = NULL
it works just fine. However, this doesn't work: EXEC @return_value = [dbo].[ErrorLogSelect] @RecId = NULL, @DateFrom = NULL, @DateTo = NULL, @SeverityFrom = NULL, @SeverityTo = NULL, @AppName = NULL, @ComputerName = NULL, @StackTrace = 'Two words', @ErrDescription = NULL
The only difference is a space between the two words. Why should LIKE care about spaces between words? Does this have anything to do with the fact that I'm using a VARCHAR to filter a TEXT column?
I have a report I'm trying to modify for a client that has two auto-grow tablix. We want the second tablix to start after the first one completes, however the first tablix will overwrite the second one if it contains multiple rows, rather than pushing it down. How can I control this?
we have a value in a column with double space between characters like" abcd efgh", when I do the preview of the report I see the value as it is with double space; but when I deploy the report on to the reporting server, I just see only single space between the characters. whys is it eliminating one space when it is deployed on the reporting server? how can I get the same value with 2 spaces?
I am not sure this is the correct place to post this question, but here it is. I am trying to pass some parameters to SSIS from a report using the report parameter, then SSIS will create the datareaderdest and return to the report to use.
Anyone have any idea, guidance or leads please share it out. Thanks in advance.
I have two grids in two different pages. In that one grid have more number of columns compared another grid. In this case report takes width of the first grid which has more no of columns. So empty sapce in right side of the report is there for second grid. Based on the grid size reprt width should be there. How to avoid empty space in this?
Im using , FORMAT_STRING="###,###.##" on the definition of a calculated member. When testing the query in SSMS, the formatting looks right, but when I run the query in SSRS it looks like its not coming over. I suppose I can apply my own formatting on the report, but im just wondering if this is by design or lack of ?
Hopefully someone can point me in the correct direction as to how best to implement this.
I'm looking to build a report in analysis services which connects to an analysis cube. Its a simple report showing a session count value by procedure type. What i'd like to do however is to show only data for the last 3 months.
I assume that i select the measure group i want to show (in this case {Session Count}) and then the relevant dimensions ({Procedure}, {Site}, {Session Date.Calander}) I've set up a Matrix on the report itself and added the measure group and Procedure dimension. I want to be able to choose the {Site} as a parameter. The problem i am having is how to show only the data from the last 3 months, either from the current date or from a date specified as a parameter.
I hope this makes sense. Any help people can give will be most appreciated.
i would like to pose a question, when a user do a login in SSRS server,is it possible to pass the username to SSAS tabular, to implement security? I've tested using USERNAME() creating a role that relates USERNAME() with a dim user username, but now i need to implement it with the username used in SSRS server.
For example, I have a Date dimension with attributes like Current Day and Current Month. If I run the following, I get exactly what I expect: a list of the days in the current month.
select NULL on 0, [Case - Date - PSPT Entry].[Year - Quarter - Month].[Date] on 1 from [Customer Support] where [Case - Date - PSPT Entry].[Current Month].&[True]
When I run the following, I'm getting a list of the days in the current month *plus the first couple days of the next month*. with
set [Days of Interest] as filter([Case - Date - PSPT Entry].[Year - Quarter - Month].[Date], [Case - Date - PSPT Entry].[Current Month].&[True]) select NULL on 0, [Days of Interest] on 1 from [Customer Support]
I don't have much knowledge on MDX queries. Here, requirement is to get the data less than the date passed from the parameter(Date - IV Financial].[calendar YQMD].[Date]).
I am able to create the below query(through Query designer) which is giving the data EQUALS to operation. But, I need the same with LESS THAN.
SELECT NON EMPTY { [Measures].[InventTrans Quantity] } ON COLUMNS, NON EMPTY { ([Items].[Item Id].[Item Id].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOSET(@DateIVFinancialCalendarYQMD, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( { [Inventory].[Is posted].&[Posted] } ) ON COLUMNS
I am trying to select some values as default for a parameter, I add my data set,add my parameter then I select the values in the default pane, when I run the report I get :
'the default value expression for the query parameter contains an error[BC30451] name is not declared.
When I look at the expression of the default parameter (in the report data pane under the specify values) it appears like
=new Object() {[Sty].[ST].&[1], [Sty].[ST]..&[15]} with a red scrible under the ()
I have a requirement to show the parent value which is passed and also all the leaf member details in MDX. For example in Adventure works, if I pass Bikes as the value in MDX, the results should display Bikes along with All the child member names as a measure value in SSAS MDX. I only have one hierarchy with Product Category-> Subcategory-> Product.
I am trying to use the following MDX but I am getting all the members. I need to get only Bikes in my report.
WITH MEMBER [Prod_Passed] AS SETTOSTR(AXIS(1)) MEMBER [Prod_Child] AS DESCENDANTS ([Dim Product].[Hierarchy].CURRENTMEMBER,,LEAVES).item(0).NAME MEMBER [Child_Value] AS ([Dim Product].[Hierarchy].CURRENTMEMBER,[Measures].[Sales Amount]) SELECT [Dim Product].[Hierarchy].[Product Category].&[1] * [Dim Product].[Product Key].[Product Key].MEMBERS ON ROWS, {[Measures].[Sales Amount],[Prod_Passed],[Prod_Child],[Child_Value]} ON COLUMNS FROM [AdvWorks]
I am trying to write a query for the default values for month, and I am stuck in bringing out only the parameter values, the query I have , brings back the month on row and value on column, and I am trying to get the value out. and will ssrs accept it as a valid expression for a default value
WITH MEMBER [MEASURES].[PARAMETERVALUE] AS [Account].[Month Short Name].CURRENTMEMBER.UNIQUENAME
[Code] .....
I tried using the exp
=Parameters!MONTH.Value(0)
so as to return the first parameter in the parameter dataset , but i have the error the expression that ref the parameter MONTH does not exists in the parameter collection.
How @StartDate and @EndDate parameters must added to the MDX query for usage in SSRS data set. strtomember can be used like
SELECT ( strtomember(@StartDate) : strtomember(@EndDate) ) ON COLUMNS FROM [Cube]
How can i specify that sub-select must work on the [Fact A] and [Fact B] rundate? strtomember(@StartDate) does not specify on which attribute this sub select is going to work. Any pointers ?
FROM ( SELECT ( [Fact B].[Rundate].&[2015-01-02T00:00:00] : [Fact B].[Rundate].&[2015-01-15T00:00:00] ) ON COLUMNS FROM ( SELECT ( [Fact A].[Rundate].&[2015-01-02T00:00:00] : [Fact B].[Rundate].&[2015-01-15T00:00:00] ) ON COLUMNS FROM [Cube] ) )
How must I change the mdx that is generated for the available values for a user parameter in order to get the content sorted?
Regards,
Henk
BTW the exact mdx query is given below (and the label field of the parameter is set to 'ParameterCaption'), but I would already appreciate an example of a simple mdx.
MEMBER [Measures].[ParameterCaption] AS '[Organisatie].[Level 5 naam].CURRENTMEMBER.MEMBER_CAPTION'
MEMBER [Measures].[Nummer en Naam] AS '[Organisatie].[Kosten Nummer].CURRENTMEMBER.MEMBER_CAPTION +": "+ [Organisatie].[Level 5 naam].CURRENTMEMBER.MEMBER_CAPTION'
--MEMBER [Measures].[ParameterValue] AS '[Organisatie].[Level 5 naam].CURRENTMEMBER.UNIQUENAME'
MEMBER [Measures].[ParameterLevel] AS '[Organisatie].[Level 5 naam].CURRENTMEMBER.LEVEL.ORDINAL'
SELECT {[Measures].[ParameterCaption],
[Measures].[Nummer en Naam]
, [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS
, filter ([Organisatie].[Level 5 naam].MEMBERS,[Measures]) ON 1 ,
[Organisatie].[Kosten Nummer] on 2
FROM ( SELECT ( STRTOSET(@OrganisatieLevelnaam, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@KalenderFactuurPeriode, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOSET(@KalenderFactuurJaarNummerLang, CONSTRAINED) ) ON COLUMNS FROM [FMR DWH Afgenomen Dienst])))
I've got a RS2000 report from Analysis services 2000. This report is working fine but after the upgrade to SQL2K5, i'm having issues with changes to parameters.
Basically i'm passing DateQuarter, CustomersLevel as parameters to the following mdx script. I've tried to change mdx script in RS2005 but no luck yet. I don't much about the parameter level changes in sql2k5. So can anyone suggest what is wrong in the script.
In sql2000 the script looks like this...
="with " & "member [Measures].[Ex Price] as 'coalesceempty([Measures].[Ex Price After Trade Discount - Detail],0.00)' " & "Member [Measures].[CustomerUniqueName] as '[Customers By Class].currentmember.UniqueName' " & "Member [Measures].[CustomerDisplayName] as '[Customers By Class].Currentmember.Name' " & "SELECT " & "{[Measures].[CustomerUniqueName],[Measures].[CustomerDisplayName]} on Columns, " & "filter({descendants(" & Parameters!CustomerClass.value & ", [Customers by Class].[" & Parameters!CustomersLevel.value & "], SELF)}, " & " [Measures].[Ex Price] > 0) on rows " & "from Sales "
i've changed the script in sql2005 but not working yet..
with member [Measures].[Ex Price] as 'coalesceempty([Measures].[Ex Price After Trade Discount - Detail],0.00)' Member [Measures].[CustomerUniqueName] as '[Customers By Class].currentmember.UniqueName' Member [Measures].[CustomerDisplayName] as '[Customers By Class].Currentmember.Name'
SELECT {[Measures].[CustomerUniqueName],[Measures].[CustomerDisplayName]} on Columns, filter({descendants( STRTOMEMBER(@CustomerClass), "[Customer Class]." + STRTOMEMBER(@CustomersLevel), SELF)}, [Measures].[Ex Price] > 0) on rows from Sales
I have a report which will one day display some data from an analysis services cube. my first step is to create a drop down parameter enabling the user to choose the date. I'd like to display only dates that have data, and I'd like it to default to today.
So I've created a dataset that will be the datasource for the dropdown displaying the available non-empty dates, which works fine.
SELECT measures.turnover ON COLUMNS,
nonempty([TBL DIM DATE].[DATE_ONLY].[DATE_ONLY].ALLMEMBERS ) ON ROWS
FROM [Itdev1 Hk]
I've also set the report parameter up to be a queried paramter,and to use the above dataset as it source, with [DATE_ONLY] displayed. and [DATE_ONLY] as the value.
Now, how do I get it to default to the last valid member in the list?
After connected to Analysis Services and following the path below:
Analysis Service - Databases - Cubes
I create the parameters for a custom report after right click on a specific Cube and select Browse to arrive at a view where i can define dimensions and parameters as well as drag and drop measure to the report rows and columns. The left top File bottom only give me a Save Selection or Save ALL option. However, i'm not sure where it saves it to or if it saves the settings for this custom report at all.
I pull this report monthly and it's a pain to recreate all the parameters. How to save this template for future pulls or maybe even incorporate the pull into excel for monthly refresh instead?
Please can someone provide an overview of how to select all records in the parameter list. I am trying to get an understanding of how this works.
Having a union join with all value is fine, to retrieve the value of 'all'. However, given the data-set there is no 'all' value. From reading the ms course notes, the query syntax is: select from where = (field = @x) or @x = 'all'. How does this syntax work? Does x = all, so all= all = true then returns all records?
All, I have a report that needs to return a number of columns from a table based on 2 parameters [StartDate & EndDate [datetime]].
Here is my dataset Select * from table1 where start_date between @StartDate and @Enddate. In table1 [start_date datetime ,example value=[3/6/2008 6:41:47 PM]]
My problem is how do I convert the start_date to [3/6/2008] within my Dataset. Something like the below.[I get an error when I do the below] Select * from table1 where convert(varchar(10),start_date,111) between @StartDate and @Enddate.
The reason for doing this is because when I pick, StartDate as 01/01/2008 and EndDate as 1/31/2008.My report only return's values of 01/01/2008 to 01/30/2008.The items that falls on 1/31/2008 do not get displayed as the datasets does not consider time when comparing,but only the date part.
Do give me a suggestion,solution to this.Thank You in advance!
I don't want to use SSRS's GUI for parameter entry. It's quite minimal and not very easy to use for users and doesn't cope very well with large selection lists (E.g if you wanted to select 3 companies from a list of 60 000 to run a report for).
So I want to make my own parameter entry screen and then pass only the user parameter value selection on to the report parameters. Can I do that? Are the parameters exposed?
I'd wanna do something like: My_SSRS_Rep.param1=@MyValFromMyApp1 My_SSRS_Rep.param2=@MyValFromMyApp2 My_SSRS_Rep.Run/Refresh/View
Currently I just have a Windows form with a web browser control in it. And I've set the url to http://myserver/reportserver?%2fDB+Report+Server%myRep&rs:Command=Render So it is possible? Or do I need to go about this some other way like using the SSRS Report Viewer or some other mechanism?
Answer: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=88484 Report Viewer it is then!
UPDATE1: Or maybe not... When I do the following, the report does not refresh:
Dim param(0) As Microsoft.Reporting.WinForms.ReportParameter param(0) = New Microsoft.Reporting.WinForms.ReportParameter("Test", a) Me.ReportViewer1.ServerReport.SetParameters(param) Me.ReportViewer1.ServerReport.Refresh()