3.1 Report State

The following is an example of a Report State document with two ReportSection elements. The first ReportSection contains two section filters and two DataRegion elements with filters. The second section contains a single section filter.

 <?xml version="1.0" encoding="utf-8"?>
 <ReportState xmlns="http://schemas.microsoft.com/sqlserver/reporting/2011/01/reportstate">
   <FilterAreaVisibility>Expanded</FilterAreaVisibility>
   <Theme>Theme1</Theme>  
   <ReportSections>
     <ReportSection>
       <SectionFilters>
         <Filters xmlns="http://schemas.microsoft.com/sqlserver/reporting/2011/01/reportstate">
           <Filter Type="String">
             <Mode>Basic</Mode>
             <Operand>
               <QueryExpression xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="QueryFieldExpression">
                 <Field>Genre</Field>
                 <Instance i:type="QdmEntityPlaceholderExpression">
                   <Target>Sandbox.Media</Target>
                 </Instance>
               </QueryExpression>
             </Operand>
             <Condition>
               <CompoundFilterCondition xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                 <Conditions>
                   <FilterCondition i:type="SimpleFilterCondition">
                     <LeftExpression i:type="QueryFieldExpression">
                       <Field>Genre</Field>
                       <Instance i:type="QdmEntityPlaceholderExpression">
                         <Target>Sandbox.Media</Target>
                       </Instance>
                     </LeftExpression>
                     <Operator>Equal</Operator>
                     <RightExpression i:type="QueryLiteralExpression">
                       <Value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:string">Action/Adventure</Value>
                     </RightExpression>
                   </FilterCondition>
                 </Conditions>
                 <Operator>Any</Operator>
               </CompoundFilterCondition>
             </Condition>
           </Filter>
           <Filter Type="String">
             <Mode>Cleared</Mode>
             <Operand>
               <QueryExpression xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="QueryFieldExpression">
                 <Field>Color</Field>
                 <Instance i:type="QdmEntityPlaceholderExpression">
                   <Target>Sandbox.Media</Target>
                 </Instance>
               </QueryExpression>
             </Operand>
           </Filter>
         </Filters>
       </SectionFilters>
       <ReportItems>
         <DataRegion Name="Tablix1">
           <Filters>
             <Filters xmlns="http://schemas.microsoft.com/sqlserver/reporting/2011/01/reportstate">
               <Filter Type="Decimal">
                 <Mode>Advanced</Mode>
                 <IsMeasure />
                 <Operand>
                   <QueryExpression xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="QueryCalculateExpression">
                     <Argument i:type="QueryFunctionExpression">
                       <FunctionName>Core.Sum</FunctionName>
                       <Arguments>
                         <QueryExpression i:type="QueryProjectExpression">
                           <Input>
                             <Expression i:type="QueryScanExpression">
                               <Target>Sandbox.Media</Target>
                             </Expression>
                             <VariableName>Media</VariableName>
                           </Input>
                           <Projection i:type="QueryFieldExpression">
                             <Field>Gross</Field>
                             <Instance i:type="QueryVariableReferenceExpression">
                               <VariableName>Media</VariableName>
                             </Instance>
                           </Projection>
                         </QueryExpression>
                       </Arguments>
                     </Argument>
                   </QueryExpression>
                 </Operand>
                 <Condition>
                   <CompoundFilterCondition xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                     <Conditions>
                       <FilterCondition i:type="SimpleFilterCondition">
                         <LeftExpression i:type="QueryCalculateExpression">
                           <Argument i:type="QueryFunctionExpression">
                             <FunctionName>Core.Sum</FunctionName>
                             <Arguments>
                               <QueryExpression i:type="QueryProjectExpression">
                                 <Input>
                                   <Expression i:type="QueryScanExpression">
                                     <Target>Sandbox.Media</Target>
                                   </Expression>
                                   <VariableName>Media</VariableName>
                                 </Input>
                                 <Projection i:type="QueryFieldExpression">
                                   <Field>Gross</Field>
                                   <Instance i:type="QueryVariableReferenceExpression">
                                     <VariableName>Media</VariableName>
                                   </Instance>
                                 </Projection>
                               </QueryExpression>
                             </Arguments>
                           </Argument>
                         </LeftExpression>
                         <Operator>GreaterThanOrEqual</Operator>
                         <RightExpression i:type="QueryLiteralExpression">
                           <Value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:decimal">1</Value>
                         </RightExpression>
                       </FilterCondition>
                       <FilterCondition i:type="SimpleFilterCondition">
                         <LeftExpression i:type="QueryCalculateExpression">
                           <Argument i:type="QueryFunctionExpression">
                             <FunctionName>Core.Sum</FunctionName>
                             <Arguments>
                               <QueryExpression i:type="QueryProjectExpression">
                                 <Input>
                                   <Expression i:type="QueryScanExpression">
                                     <Target>Sandbox.Media</Target>
                                   </Expression>
                                   <VariableName>Media</VariableName>
                                 </Input>
                                 <Projection i:type="QueryFieldExpression">
                                   <Field>Gross</Field>
                                   <Instance i:type="QueryVariableReferenceExpression">
                                     <VariableName>Media</VariableName>
                                   </Instance>
                                 </Projection>
                               </QueryExpression>
                             </Arguments>
                           </Argument>
                         </LeftExpression>
                         <Operator>LessThan</Operator>
                         <RightExpression i:type="QueryLiteralExpression">
                           <Value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:decimal">1000000000</Value>
                         </RightExpression>
                       </FilterCondition>
                     </Conditions>
                   </CompoundFilterCondition>
                 </Condition>
               </Filter>
             </Filters>
           </Filters>
         </DataRegion>
         <DataRegion Name="Tablix3">
           <Filters>
             <Filters xmlns="http://schemas.microsoft.com/sqlserver/reporting/2011/01/reportstate">
               <Filter Type="String">
                 <Mode>Basic</Mode>
                 <Operand>
                   <QueryExpression xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="QueryFieldExpression">
                     <Field>Color</Field>
                     <Instance i:type="QdmEntityPlaceholderExpression">
                       <Target>Sandbox.Media</Target>
                     </Instance>
                   </QueryExpression>
                 </Operand>
                 <Condition>
                   <CompoundFilterCondition xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                     <Conditions>
                       <FilterCondition i:type="SimpleFilterCondition">
                         <LeftExpression i:type="QueryFieldExpression">
                           <Field>Color</Field>
                           <Instance i:type="QdmEntityPlaceholderExpression">
                             <Target>Sandbox.Media</Target>
                           </Instance>
                         </LeftExpression>
                         <Operator>Equal</Operator>
                         <RightExpression i:type="QueryLiteralExpression">
                           <Value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:string">Red</Value>
                         </RightExpression>
                       </FilterCondition>
                     </Conditions>
                     <Operator>Any</Operator>
                   </CompoundFilterCondition>
                 </Condition>
               </Filter>
             </Filters>
           </Filters>
         </DataRegion>
       </ReportItems>
     </ReportSection>
     <ReportSection>
       <SectionFilters>
         <Filters xmlns="http://schemas.microsoft.com/sqlserver/reporting/2011/01/reportstate">
           <Filter Type="Int64">
             <Mode>Basic</Mode>
             <Operand>
               <QueryExpression xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="QueryFieldExpression">
                 <Field>Duration</Field>
                 <Instance i:type="QdmEntityPlaceholderExpression">
                   <Target>Sandbox.Media</Target>
                 </Instance>
               </QueryExpression>
             </Operand>
             <Condition>
               <CompoundFilterCondition xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                 <Conditions>
                   <FilterCondition i:type="SimpleFilterCondition">
                     <LeftExpression i:type="QueryFieldExpression">
                       <Field>Duration</Field>
                       <Instance i:type="QdmEntityPlaceholderExpression">
                         <Target>Sandbox.Media</Target>
                       </Instance>
                     </LeftExpression>
                     <Operator>GreaterThanOrEqual</Operator>
                     <RightExpression i:type="QueryLiteralExpression">
                       <Value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:long">8049</Value>
                     </RightExpression>
                   </FilterCondition>
                 </Conditions>
               </CompoundFilterCondition>
             </Condition>
           </Filter>
         </Filters>
       </SectionFilters>
     </ReportSection>
   </ReportSections>
 </ReportState>
Show: