Parameters in query

Hello, first of all, if I'm posting in the wrong section fell free to be rude. I apologize.

I'm pretty new to mdx and Reporting services, and already got stuck on a pretty stupid problem..

I need a table that shows a measure in 2 different times, on columns. Like this:

-----|-----|  Q1   | Q2   |
bla | bla|  200 |  300  |
bla | bla|  21   |  32   |
bla | bla|  43   |  77   |


This is the query i'm using:

with
member [Measures].[Q1] as
([Measures].[Number of Machines], [TimeID].[Mon Name].[June 2008])
member [Measures].[Q2] as
([Measures].[Number of Machines], [TimeID].[Mon Name].[July2008])
SELECT NON EMPTY { ([Measures].[Q1]), ([Measures].[Q2]) } ON COLUMNS,

NON EMPTY { ([Status Codes].[Hierarchy].[Dim Status Codes].ALLMEMBERS * [Machines].[Machine Type].[Machine Type].ALLMEMBERS * [Machines].[Code].[Code].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

FROM ( SELECT ( STRTOSET(@MachinesMachineType, CONSTRAINED) ) ON COLUMNSFROM ( SELECT ( STRTOSET(@CountriesDimCountries, CONSTRAINED) ) ON COLUMNS FROM [db])) WHERE (IIF( STRTOSET(@CountriesDimCountries, CONSTRAINED).Count = 1, STRTOSET(@CountriesDimCountries, CONSTRAINED), [Countries].[Dim Countries].currentmember )) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

 

I don't know if it's an optimal query, but it works(suggestions are very appreciated)

Now my problem comes when i want to use -time- as a parameter. Adding @MyParameter instead of  [TimeID].[Mon Name].[June 2008] wont work. It gives me no errors nor indications, so i really don't know what to do. Google wont help either.

What am i doing wrong?

Thanks in advance,

Iggy

0
ggpuzzo
7/22/2008 11:36:29 AM
asp.net.ssrs 4514 articles. 1 followers. Follow

0 Replies
580 Views

Similar Articles

[PageSpeed] 5

Reply:

Similar Artilces:

C# Ado.net Sql query parameter query
Hi All, I'm trying to pass in a parameter value from an array in a loop that is used in a sql query and the results are populated to an xml file. The trouble is that I'm only getting the colums values in the outputted xml file. So I feel that the paramter is not being read. So can anyone help as I'm really stuck on this one. The code is as follows : public void DisplayUserInfo() { ArrayList UserIdArrayList = IdentifyUserID(); foreach(string ShowUserIDString in UserIdArrayList) { try { SqlConnection SqlConn = new SqlConnection(DBConnString)...

Parameter query
Hi: I am trying to build maste/detail page.  1.  I have on my page drop down control based on sqldata sources with the concataned fields as follows:   SELECT DISTINCT LastName + ' ' + FirstName AS Expr1 FROM dbo.Table1 It displays First Name space and Last name in the box and works fine. 2. I placed on my form a grIdview In data source I am trying to use parameter filter in SQL select query and the same query as for drop down as follows: SELECT     LastName + ' ' + SiteFirstName AS Expr1, field1, field2, etc.........

how to retrive selected parameter label of SSRS using .net
hi I developed SSRS report and integrated with .net. for security purpose i want to restrict some parameters values to users. this restriction is changed by users level. Example if i am a admin user i want to see all values which are passing in parameter1, if i am a user1 user i want to see only one value in parameter1. Can any one help me how to set parameters and based on parameter1 how to handle the dependent and dependencies parameters.  Thanks in advance Regards, Madhavi    Hi Madhavi, i am taking that "if i am a admin user i want to see all ...

does the order of adding parameters matter when using parameters in .net
string sql = "update mytable set nameField = :nameparm where keyField = :keyparam"; updateCMD.CommandText = sql; with the above update statment the following order of adding parameters doesn't work in .NET 2.0 updateCMD.Parameters.Add(keyparm); updateCMD.Parameters.Add(nameparm); while the following works updateCMD.Parameters.Add(nameparm); updateCMD.Parameters.Add(keyparm); why does index of Parametercollection matters when it is going to be matched by name parameter? what will happen in the following scenario. "update mytable set ...

Some queries in .NET
Hi Friends, Can you please help me out on below three queries- 1. Can we have two authentication modes in one .NET application in two web.config files? If yes then how?. 2. Will form authentication will work, if cookie is disabled in .NET? If not then why? 3 . Can we have two classes defined in one web form. If yes, then If I have two classes in one page then can I define two page_load methods in both classes?     Will it work? Thanks in advance.        Hi,1. Can we have two authentication modes in one .NET application in two web.conf...

Query a Query
I have a result set in a query. Is it possible to query this query? (no specific SQL dialect, can it be done generically?) Petros -- PETROS GAVRIELIDES wrote: > I have a result set in a query. > Is it possible to query this query? > > (no specific SQL dialect, can it be done generically?) There is a generic answer to your question: Yes, there is a construct called a sub-query that allows you, in 1 SQL statement, to query from a query. But, generically speaking, not all DB engines support this construct. For instance, Firebird only added it just over a y...

How to query a query...
I'm working on converting an Access DB that I created into an ASP.NET application (and attempting to learn ASP at the same time...). One of my queries was very complex and required running a different query first, and then working off of that one. Any suggestions on the best way to do this in ASP? The following is a sample of code I'm using so you can see the type of data-binding I'm using. Thanks for the help! myConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " +"Data Source=" + Server.MapPath("/EquipmentCheckout.mdb")) strS...

Query Parameter
I have the following code:             Dim ConnectString As String             Dim MyDataSet As New DataSet                                                 Dim Connect As OleDbConnection = New OleDbConnection       &nbs...

Query with Parameter
I am trying to use values from query as keys for another query. I have one main form with tabforms on it. On the main form I have a main query, query_1. On the tabform I have a query, query_2. Each record in query_1 will have multiple corresponding records in query_2. Each time I move the cursor in query_1 I want query_2 to re-execute and produce a new recordset. I will do this by passing values from query_1 to query_2 as parameters. I can get the values from query_1 but I am having trouble getting query_2 to execute with the parameters. I am using SetParameter( ) but to no avail. Co...

query parameter
I have to create a stored procedure where the criteria is: "All", specific value and, all except one value so far this is what I have:@Status varchar (50)  -- as parameter from a dropdown boxDECLARE @NewStatus varchar(50) SET @NewStatus = CASE WHEN @Status ='All' AND @Status <> 'All but closed' THEN '%' WHEN @Status <>'All' AND @Status <> 'All but closed' THEN @Status END and in the stored procedure .......... WHERE Status like @NewStatus  I am a little confused as to how could I return all values except those that have  the ...

Query with parameters
This works. {code} query.SQL.text := 'select PK_VALUE from Admin.CR_KEY_GEN where PK_FIELD = ''CRFEE'''; query.Open; {code} This doesn't. {code} query.SQL.text := 'select PK_VALUE from Admin.CR_KEY_GEN where PK_FIELD = :TransType'; query.ParamByName('TransType').AsString := 'CRFEE'; query.Open; {code} The first case, I get as expected 1 row. The second case, I get nothing. Am I Lawrence Tse wrote: > query.ParamByName('TransType').AsString := 'CRFEE'; Try this: query.ParamByName('TransType'...

Query parameters
Hi, I have found a problem with the customizable queries. In the function SaveQuery in the file AccessDataAccessLayer.cs, there is a foreach loop to go through each query clause and add them in the database. However, if for example I create a query with two clauses, the boolean operator for the second clause will be the same of the one for the first clause. It seems that the new value is not set properly in the parameter. Also, the length of the fieldname of the first clause is applied to the fieldname of the second clause and if it is longer, the fieldname is cut, causing an er...

Query with parameters
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_8ad08.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" Parameterized and non-parameterized query trace file --JivePart=_8ad08.zeB8CwDOH5aMJzMl Content-Type: text/plain; name="FireDAC-trace.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="FireDAC-trace.txt" LS0tIG5ldyBzdGFydCBvZiBGaXJlREFDIFRyYWNlIC0tLQ0KNDA2Mjk3ODE0NDY5NyAxMjowNjo1 MC45OTcgLT0jISEhIEZpcm...

SSRS parameters
How can I pass a page header textbox value of a main report thru a parameter to a subreport? Thanks.Please mark the post(s) that have helped you as "Answer"...

Web resources about - Parameters in query - asp.net.ssrs

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google Webmaster Tools Parameter Handling - Flickr - Photo Sharing!
You aren't signed in Sign In Help Home The Tour Sign Up Explore Explore Home Last 7 Days Interesting Popular Tags Calendar Most Recent Uploads ...

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 12/13/2015 1:11:08 AM