none
How to Use Fields from a Custom Dataset? RRS feed

  • Question

  • Hello!

     

    I've created a report that uses custom code to create an MDX query allowing me to pass in a row, column, and measure the user would like to use in a report (these come from a wizard page outside of SSRS).  I have the custom dataset working with the code, but I don't know how to fill in the Fields section of the dataset properties in order to let me take the results.

     

    Here is the custom code (yes, its crude -- Its only a proof of concept! ):

    Code Snippet

    Public Function BuildMDX(Rows as String, Cols as String, Meas as String) as String

     Dim MDXString as String
     
     MDXString = "SELECT NON EMPTY { [Measures].[Member Count] } ON COLUMNS, NON EMPTY { ("

     MDXString = MDXString & Rows & " * "

     MDXString = MDXString & Cols & ") } DIMENSION PROPERTIES MEMBER_CAPTION, " & _
      "MEMBER_UNIQUE_NAME ON ROWS FROM [Membership] CELL PROPERTIES " & _
      "VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, " & _
      "FONT_NAME, FONT_SIZE, FONT_FLAGS"

     Return MDXString

    End Function

     

    In the above, Rows and Cols are parameters.

     

    Probably a newbie question, but how do I set up fields for a DataSet that uses custom code?

     

    Thanks in advance!

     

    Wednesday, May 7, 2008 2:59 PM