none
Passing OLAP Parameter in Query string for (SSRS 2008) Reports where SSRS is in MOSS integrated mode.

    Question

  • Hi,

    Does anybody know how to pass
    OLAP Parameter (SSAS Cube 2008) in Query string for (SSRS 2008) Reports where SSRS is in MOSS integrated mode.
    Actually i have crated a table where i m getting the Report Parameter and Default value to pass. Which I am getting it in cube so in Action of one column i want to open a url (Go to URL) which will be runtime created using the cube fields.

    But as dimension name has space i m not able to get the right value to report.
    I am getting error that the passed value is not a valid  value for that parameter.

    I Tried this thing with hardcoding the value. But same error

    I am using
    ="javascript:void(window.location('http://"&Fields!Server_Name.Value &"/"&Fields!Report_Folder.Value &"/Pages/MDC_FOB_Mensil.aspx?&"&Fields!Parameter1.Value &"=[Indici manuali].[Codice Indice].&[MDC FOB M]&"&Fields!Parameter2.Value &"=[Calendario].[Month ID].&[200901]'))"

    As i want to open another report in same window but in different page in MOSS (2007)

    As browser generating Ascci values for space and special characters like [Calendario].[Month ID]. where there is space between Month and ID also for "[" it genrated code due to that i m not receving right value for parameter.

    Anybody have any idea how can i pass parameters in this scenario.
     Or any SP or Addin need to be install.

    Your suggestions will be appreciated.

    Thanks,


    abhi
    Tuesday, November 24, 2009 7:23 AM

Answers

  • Hi Abhi,

     

    Please use the method “escape” to replace the character “&” with %xx encoding in the URL.

     

    The escape method returns a string value (in Unicode format) that contains the contents of [the argument]. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as "%20."
    Edge Core Javascript Guide: The escape and unescape functions let you encode and decode strings. The escape function returns the hexadecimal encoding of an argument in the ISO Latin character set. The unescape function returns the ASCII string for the specified hexadecimal encoding value

     

    Here is the sample:

    ="javascript:void(window.open('http://localhost/ReportServer?/AdventureWorks Sample Reports/SingelParameterAnalysis&DateFiscalYear=[Date].[Fiscal Year].' + escape('&') + '[2002]'))"

     

    If you have any more questions, please feel free to ask.

     

    Thanks,

    Jin Chen

    Friday, November 27, 2009 3:51 AM
    Moderator