February 9, 2012  
   Login  
Forum  
 
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Trying to add 3rd parameter to existing reportTrying to add 3rd parameter to existing report
Previous Previous
 
Next Next
New Post
 1/14/2010 9:42 PM
 

I build my reports in MS Visual Studio 2005.  I have an existing report with two parameter fields designed to allow users to run a report in a more targeted fashion (i.e. for specific customers and products vs. the default of getting everybody).  I need to add a 3rd parameter, but when I do - I get the following error:

Exception of type 'Microsoft.SharePoint.SoapServerException' was thrown. (Enesys.ReportingServices.Ersde2008)

If I remove one of the previously existing parameter fields, the report runs fine with the new parameter - the problem seems to be that I am defining more than 2.  I am selftaught at all of this - so possibly I have to change to a different approach if I have 3 or more parameter fields?

The query looks like this, with StatusType being the 3rd parameter:

<?xml version="1.0" encoding="utf-8" ?>
<root xmlns="http://enesyssoftware.com/schemas">
<list title="MasterList" relativeSiteUrl="/sites/field-partner/61EAP/" stripHtml="true" tableName="MasterList">
<fields>*</fields>
<query>
                                                <Where>
                                                        <And>
                                                                <In>
                                                                                                <FieldRef Name="Customer_x0020_Name_x0020_N" />
                                                                                                <Value Type="Text">@CustomerName!</Value>
                                                                                </In>
                                                                <In>
                                                                                                <FieldRef Name="Product_x0020_N" />
                                                                                                <Value Type="Text">@Product!</Value>
                                                                                </In>
                                                                <In>
                                                                                                <FieldRef Name="Status_x0020_Type" />
                                                                                                <Value Type="Text">@StatusType!</Value>
                                                                                </In>
                                                        </And>
                                                       
                                               </Where>
                                </query>
</list>
                                <sqlQuery tableName="SortList">
               SELECT *
               FROM MasterList
                                            WHERE Category LIKE 'Current'
              ORDER BY Customer_x0020_Name_x0020_N, Title
                                </sqlQuery>
</root>

 

Thanks for your help!

New Post
 1/14/2010 10:35 PM
 

Hi Bill,

A “<And></And>” element is missing. You can only have 2 filters within a logical element but you can nest in order to achieve the desired behavior.

That said, you should not have encountered this problem by using our query designer. It will have built the proper syntax automatically. In the latest versions, the query designer is completely integrated within BIDS (visual studio) which makes things even easier. Any specific reason why you are not using the designer?

 

<?xml version="1.0" encoding="utf-8"?>
<root xmlns="http://enesyssoftware.com/schemas">
  <list title="MasterList" relativeSiteUrl="/sites/field-partner/61EAP/" stripHtml="true" tableName="MasterList">
    <fields>*</fields>
    <query>
      <Where>
        <And>
          <And> <!-- Added -->
            <In>
              <FieldRef Name="Customer_x0020_Name_x0020_N" />
              <Value Type="Text">@CustomerName!</Value>
            </In>
            <In>
              <FieldRef Name="Product_x0020_N" />
              <Value Type="Text">@Product!</Value>
            </In>
          </And> <!-- Added -->
          <In>
            <FieldRef Name="Status_x0020_Type" />
            <Value Type="Text">@StatusType!</Value>
          </In>
        </And>
      </Where>
    </query>
  </list>
  <sqlQuery tableName="SortList">
    SELECT *
    FROM MasterList
    WHERE Category LIKE 'Current'
    ORDER BY Customer_x0020_Name_x0020_N, Title
  </sqlQuery>
</root>

I believe you could go a bit further and remove the sqlQuery statement which is better for performance when manipulating large lists.

<?xml version="1.0" encoding="utf-8"?>
<root xmlns="http://enesyssoftware.com/schemas">
  <list title="MasterList" relativeSiteUrl="/sites/field-partner/61EAP/" stripHtml="true" tableName="MasterList">
    <fields>*</fields>
    <query>
      <Where>
        <And>
          <And>
            <And>
              <!-- Added -->
              <In>
                <FieldRef Name="Customer_x0020_Name_x0020_N" />
                <Value Type="Text">@CustomerName!</Value>
              </In>
              <In>
                <FieldRef Name="Product_x0020_N" />
                <Value Type="Text">@Product!</Value>
              </In>
            </And>
            <!-- Added -->
            <In>
              <FieldRef Name="Status_x0020_Type" />
              <Value Type="Text">@StatusType!</Value>
            </In>
          </And>
          <Contains>
            <FieldRef Name="Category" />
            <Value Type="Text">Current</Value>
          </Contains>
        </And>
      </Where>
      <OrderBy>
        <FieldRef Name="Customer_x0020_Name_x0020_N" />
        <FieldRef Name="Title" />
      </OrderBy>

    </query>
  </list>
</root>


Let me know if it solves your problem.

Regards,


Frederic LATOUR
ENESYS
New Post
 1/15/2010 4:19 PM
 

Frederic,

Thank you for your help.  I do appreciate the high level of support that I always recieve from you and the rest of the team at Enesys.  Your suggestion worked.  I had a feeling that the solution lay in how the nesting of the multiple parameters was done - but I couldn't get the proper configuration on my own.  As I say - I am self taught at all of this, which is why I haven't yet moved on to using your query builder.  But take heart - I am moving in that direction!  I am in the process of getting access to BIDS and hope to be able to then learn your tool and take advantage of the integration features.

Thanks again for your help!

Sincerely,

Bill

Previous Previous
 
Next Next
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Trying to add 3rd parameter to existing reportTrying to add 3rd parameter to existing report

 
You need to login for posting to the forums.
If you don't have a login, click here to register.
 
Copyright 2010 Enesys - All rights reserved Terms Of UsePrivacy Statement