locked
cascading parameters with null values RRS feed

  • Question

  • I have three parameters, the first is required the second and third are nullable.  Each parametr has the same available values.  After selecting the first parameter, it is not available in the 2nd and 3rd.  After selecting the 2nd, it is not available in the 3rd, unless the 2nd value is null.  But if the 2nd is null, the 3rd must be null.  That is where I need help.  
    Wednesday, May 4, 2011 5:45 PM

Answers

  •   <DataSet Name="dsGetColumn3">
       <Query>
        <DataSourceName>ArmorF</DataSourceName>
        <CommandText>select null name union
    select name from sys.columns where object_id = object_id('fvw_EventStatistics')
    and name &lt;&gt; 'TimeStamp'</CommandText>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
       </Query>
       <Fields>
        <Field Name="name">
         <DataField>name</DataField>
         <rd:TypeName>System.String</rd:TypeName>
        </Field>
       </Fields>
       <Filters>
        <Filter>
         <FilterExpression>=Fields!name.Value</FilterExpression>
         <Operator>NotEqual</Operator>
         <FilterValues>
          <FilterValue>=Parameters!Column1.Value</FilterValue>
         </FilterValues>
        </Filter>
        <Filter>
         <FilterExpression>=Fields!name.Value</FilterExpression>
         <Operator>NotEqual</Operator>
         <FilterValues>
          <FilterValue>=Iif(Parameters!Column2.Value="","XYX",Parameters!Column2.Value)</FilterValue>
         </FilterValues>
        </Filter>
        <Filter>
         <FilterExpression>=Fields!name.Value</FilterExpression>
         <Operator>In</Operator>
         <FilterValues>
          <FilterValue>=Iif(Parameters!Column2.Value="",System.DBNull.Value,Fields!name.Value)</FilterValue>
         </FilterValues>
        </Filter>
       </Filters>
    
    • Marked as answer by gao.seng Wednesday, May 4, 2011 9:23 PM
    Wednesday, May 4, 2011 9:23 PM

All replies

  •   <DataSet Name="dsGetColumn3">
       <Query>
        <DataSourceName>ArmorF</DataSourceName>
        <CommandText>select null name union
    select name from sys.columns where object_id = object_id('fvw_EventStatistics')
    and name &lt;&gt; 'TimeStamp'</CommandText>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
       </Query>
       <Fields>
        <Field Name="name">
         <DataField>name</DataField>
         <rd:TypeName>System.String</rd:TypeName>
        </Field>
       </Fields>
       <Filters>
        <Filter>
         <FilterExpression>=Fields!name.Value</FilterExpression>
         <Operator>NotEqual</Operator>
         <FilterValues>
          <FilterValue>=Parameters!Column1.Value</FilterValue>
         </FilterValues>
        </Filter>
        <Filter>
         <FilterExpression>=Fields!name.Value</FilterExpression>
         <Operator>NotEqual</Operator>
         <FilterValues>
          <FilterValue>=Iif(Parameters!Column2.Value="","XYX",Parameters!Column2.Value)</FilterValue>
         </FilterValues>
        </Filter>
        <Filter>
         <FilterExpression>=Fields!name.Value</FilterExpression>
         <Operator>In</Operator>
         <FilterValues>
          <FilterValue>=Iif(Parameters!Column2.Value="",System.DBNull.Value,Fields!name.Value)</FilterValue>
         </FilterValues>
        </Filter>
       </Filters>
    
    • Marked as answer by gao.seng Wednesday, May 4, 2011 9:23 PM
    Wednesday, May 4, 2011 9:23 PM
  • Hi,

    Could you please brief a more, your question is not clear.

    Thanks,

    Shobhit

    Thursday, May 5, 2011 4:44 AM
  • Hi gao.seng,

    For your requirement use 3 datasets for those 3 parameteres.

    For 1st parameter use 1st dataset which have all the values.

    For 2nd parameter use 2nd dataset which have all the values except what you selected in the 1st parameter.

    For 3rd parameter use 3rd dataset which have all the values except what you selected in 1st and 2nd parameter.

    let me now if you hav any queries.

    Thanks,

    Naveen.P

    Thursday, May 5, 2011 5:09 AM