views:

56

answers:

2

Hi,

Our ASP.Net application connects to the a SSRS 2008 web service.

The categories and reports are listed in a tree view in our application populated from a call to retrieve the list of reports from the web service.

When a user selects a report the parameters of the report are retrieved and we render the appropriate control for the parameter data type. i.e. Calendar for Date/Time Data Type, text box for string data type etc. The user enters the parameters values and the report renders in a VS Report Viewer

All of the above works fine.

The issue is that some of our reports have geospatial parameters. i.e Some of our reports will have parameters that will require a user to select a region on a map and that selected shape [Polygon etc] will be the value of the parameter. [It may be passed to the report as a series of XY coardinates but the implementation is not important here].

We have 2 options in order to determine that a map link needs to be displayed for a GeoSpatial parameter.

Option 1. Create a new SSRS Report parameter data type [Preferred option] When the report designed creates a new parameter and upon selecting the parameter datatype a new custom data type called Spatial will be available [in addition to the existing data types float, boolean, text etc]

Option 2. Name the parameter with a known prefix. i.e. Geo_ParameterName [Simple] The report designer [may not always be in-house designer] needs to know that the prefix has special meaning for our application and use it when appropriate.

Has anyone any ideas on whether option 1 is possible. There is a ease of deployment concern to this choice also even if its possible.

Thanks in advance,

Liam

+1  A: 

You can use custom datatypes, but you'll need to deploy an Assembly that defines these types to the SSRS server. You'd also then have to provide that assembly to anyone creating reports for you.

Benjamin Anderson
Thanks for that Benjamin.
Liam
A: 

I don't think its possible.

The RDL schema is detailed here and is limited to the 5 standard values. Even CLR types are mapped to one of these it seems.

RDL Schema

  <xsd:complexType name="ReportParameterType">
<xsd:choice minOccurs="1" maxOccurs="unbounded">
  <xsd:element name="DataType">
    <xsd:simpleType>
      <xsd:restriction base="xsd:string">
        <xsd:enumeration value="Boolean" />
        <xsd:enumeration value="DateTime" />
        <xsd:enumeration value="Integer" />
        <xsd:enumeration value="Float" />
        <xsd:enumeration value="String" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:element>

Option 2 [Naming the parameter with a significant prefix] seems to be the only option.

Liam

Liam