2

I am using SSRS 2008 R2 with Sharepoint 2010 list and I have two reports from same SharePoint list. They return the same thing, only diffrence is the filtering part.

How can we check in a CAML query if Program parameter is empty then run below part?

Qeuries are as follow:

<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ListName>HealthData</ListName>
<ViewFields>
<FieldRef Name="ReportingDate1" />
<FieldRef Name="Program" />
<FieldRef Name="Project" />
<FieldRef Name="Package" />
<FieldRef Name="DataProvider" />
<FieldRef Name="Parameter" />
<FieldRef Name="InternalPlanned_x002f_Raised" />
<FieldRef Name="InternalActual_x002f_Closed" />
<FieldRef Name="Note" />
</ViewFields>
<Query>
  <Where>
    <And>
     <Eq>
      <FieldRef Name="Program" />
      <Value Type="Text">
        <Parameter Name="Program" />
      </Value>
    </Eq>
    <Eq>
      <FieldRef Name="Package" />
      <Value Type="Text">
        <Parameter Name="Package" />
      </Value>
    </Eq>
  </And>
 </Where>
 </Query>
</RSSharePointList>

HealthData

0

assign a parameter CAML query is mistaken, assign parameter as below

<Query>
  <Where>
    <And>
     <Eq>
      <FieldRef Name="Program" />
      <Value Type="Text">**=Parameters!ProgramName.Value**
      </Value>
    </Eq>
    <Eq>
      <FieldRef Name="Package" />
      <Value Type="Text">**=Parameters!PackageName.Value**
      </Value>
    </Eq>
  </And>
 </Where>
 </Query>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.