Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Wednesday, March 06, 2013

How to Pass Query within a SSRS Report Query Builder.

First Genrate every thing as you like.

After that press ok.

Now it will generate the code.

Now after ListName tag copy the query you had generated using CAML Query Builder.

Please go through the following Example.

<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ListName>lst_Country</ListName>
<Query>
   <OrderBy>
      <FieldRef Name='ID' />
   </OrderBy>
   <Where>
      <Eq>
         <FieldRef Name='Region' LookupId='TRUE' />
         <Value Type='Lookup'>2</Value>
      </Eq>
   </Where>
</Query>

  <ViewFields>
    <FieldRef Name="ID" />
    <FieldRef Name="Title" />
    <FieldRef Name="Region" />
    <FieldRef Name="Author" />
    <FieldRef Name="Modified" />
  </ViewFields>
</RSSharePointList>

Screenshot Example for  Condition Based Report.

No comments:

Post a Comment