How to filter a sharepoint list with report parameters

Hello there,
I'm trying to make a sql report on a sharepoint library. I have no problems to connect to the library but i cannot find a way to filter my data source with report parameters. I've searched on the net a lot, found some stuffs about xml but nothing that shows
how to do it with sharepoint. Any help would be greatly appreciated!
Thanks in advance!

Hi mgarant,
As you mentioned, by default, we can use xml parameter "query" to filter a SharePoint list from SQL Server Reporting Services. We can also modify the value for the "query" to use SQL Server Reporting Serivces parameters to filter the SharePoint list.
Below are the detailed steps for your reference:
 1.Change the query string to be a string like this:
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
<Parameters>
<Parameter Name="listName">
<DefaultValue>{ADBE55DB-63A1-4C14-9DA0-B1B05C13B4C8}</DefaultValue>
</Parameter>
<Parameter Name="query" Type="xml">
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>
 2.In the dataset modification dialog, go to "Parameters" tab.
 3.Create a Report Parameter(e.g. CityParam).
 4.In parameter tab, create a parameter with:
Name: query
Value: ="<Query>
   <Where>
      <Eq>
         <FieldRef Name='WorkCity' />
         <Value Type='Text'>" & Parameters!CityParam.Value & "</Value>
      </Eq>
   </Where>
</Query>"
Please note, “case sensitive” is required. In this case, the parameter name for "query" must be in lower case. WorkCity is name of a field in the SharePoint list.
For more information about how to retrieve value from SharePoint list, I would suggest you reading the following article and threads:
http://vspug.com/dwise/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux/
http://blogs.msdn.com/mariae/archive/2007/12/13/querying-sharepoint-list-from-reporting-services-returns-only-not-null-columns.aspx
I also implemented a sample, you could download it from:
http://cid-3c7e963ff6ccd974.office.live.com/browse.aspx/.Public/SharePoint%20List%20sample?uc=2
Please feel free to ask, if you have any more questions.
Thanks,
Jin Chen
Jin Chen - MSFT

Similar Messages

  • How to query the sharepoint list with using lookup column

    hi,
    I have requrement like below
     List A
    Title                         Postionid(Lookup)       PositionDescription
    [email protected]             1                              
    xxxx
    [email protected]             1                               
    xxx
    [email protected]           1                                
    xxx
    [email protected]                    2                               
    sss
    [email protected]             2                               
    www
    List B
    Title                         fistname  lastname age fathername
    [email protected]         x             x             10      y
    [email protected]         p            p               12      p
    [email protected]               q           q                12    
    y
     here in List A positionid is lookup column i have creating one visual web part i am querying the List A using  query string as Positionid in that web part .finally what i want is i need date from list B on basis of corresponding position id here
    List A Title and List B title are same i need each candidate info how can i do it
    Srinivas

    Hello,
    Still you have not told that whether Position id is there in listB or not. Anyway if Poistion id is not there in list B then you have to use Title column of listA to gete data from ListB. Look at sample code below. It will first get data from ListA,
    and use StringBuilder class to create dynamic CAML query because one Position id is having multiple values in listA.
    query.Query = "<Where><Eq><FieldRef Name='Postionid' /><Value Type='Lookup'>1</Value></Eq></Where>";
    SPListItemCollection items = list.GetItems(query);
    if(items.Count > 0)
    foreach(SPListItem item in items)
    string strTitle = Convert.Tostring(item["Title"]);
    //since listA is having multiple values for Postionid so you have to build a dynamic query here to get data from listB
    //Refer link to build dynamic query
    SPQuery listB = new SPQuery ();
    query.Query = stringbuilder;
    SPListItemCollection ListBitems = listB.GetItems(query);
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2dfe5fd6-e556-4132-a35c-e9f240360307/issue-with-caml-query?forum=sharepointdevelopmentlegacy
    http://sharepoint.stackexchange.com/questions/69690/foreach-loop-inside-caml-query
    Above links will help you to create dynamic query (in your case you need to use multiple <OR> operator in listB.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Report workload by calculating how many versions of SharePoint list items created in a certain time period

    I have a total of 66 SharePoint 2010 lists - yes, 66! - each lists contains between 1500 and 3200 list items.  My employees update these various list items throughout their workday.  Each update to a list item creates a new version of the list
    item.  On average each list item will have anywhere from 5 to 10 versions before it is done.  I need to create a report that tells me how many list items they've updated in a certain time frame.  I have come close but still cannot arrive at
    the data I'm looking for. 
    This is what I have so far:
    I've created a report using SQL Report Builder 2008 v3 where I've filtered it to show only items MODIFIED between, for example, Feb1 and Feb28.  Of those records, I want the report to tell me how many versions were created during that time
    frame.  The result is one list item with 5 total versions.  Versions 1.0, 2.0, & 3.0 were created on 12/12/14.  The last two versions, 4.0 and 5.0, were created on 2/24/15.  Therefore, the answer I'm looking for is 2 because they
    created 2 versions between Feb1 and Feb28.
    However I get the following results using these queries:
    If I do a =Sum(Fields!owshiddenversion.Value) in the expression field I get the total versions which is 5
    If I do a =Count(Fields!owshiddenversion.Value) in the expression field I get the instance which is 1
    Is there a way to count ONLY the number of versions created in a time period?  Is there another hidden field in SharePoint that I can use in the expression that will give me results I'm looking for?

    Hi Rafael70,
    Per my understanding that you have already get all the need fields and informaiton of the updated version of list items and now you want to calculate how many versions of SharePoint list items created in a certain time period, you can't get desired result
    using sum and count function, right?
    I have tried to tested on my local environment but because I am not clear what is value in the field "owshiddenversion", I assumed you have two datatype parameters (StartDate and EndDate) to help filter the report in a certain time period.
    Generally, if you have add the filter correctly, it will filter the correct number's updated version in this time period, I would like you to provide details information as below to help better analysis the requirements:
    Could you please provide sample data of the table.
    Please provide snapshot of the report structure you have currently designed.
    Please try to provide all the expression you have used.
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Update SharePoint list with project finish date on Project.Updated event

    Hello,
    I want to update a column in a SharePoint list with the project finish date when a project is updated on Project Server. My OnUpdated event handler is being called ok, but if I change the project start date Project Server runs an asynchronous republishing
    on the project, and my event handler ends up being called before the finish date is update by the republishing job, so the code writes the "old" finish date on the SharePoint list. The solutions I could think of are:
    Identify the republishing job on Project Server queue, pool the queue waiting for it to finish, then read the finish date and update the list item in SharePoint.
    Include a custom job on Project Server queue after the republishing job, that reads the finish date and update the list item in SharePoint.
    I don't know if any of the solutions are feasible and how to implement them. Has anyone coded something like this and/or have a better solution?
    Thanks,
    GB

    I vote for the option 1.
    I did for one of my event handler..Did you try "on published" event?
                projectSvc.QueueUpdateProject(jobUid, SessionUID, projectDss, false);
                //WaitForQueue(q, jobUid);
                jobUid = Guid.NewGuid();
                projectSvc.QueuePublish(jobUid, e.ProjectGuid, false, string.Empty);
                jobUid = Guid.NewGuid()
    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

  • How i do search in list with textinput

    how i do search in list with textinput ?
    i make textinput with list and list have data i want to do search in list when right my information in textinput

    On change event of TextInput, apply a filter.I am giving sample code over here:
    private function filter():void {
                                            (your list dataprovider).filterFunction = filterMyArrayCollection;
                                             (your list dataprovider).refresh();
                                  private function filterMyArrayCollection(item:Object):Boolean {
                                            var searchString:String = (Your textinput id).text.toLowerCase();
                                            var itemName:String = (item.(property of list provider which is to be searched) as String).toLowerCase();
                                            return itemName.indexOf(searchString) > -1;
    This will help you in following manner:
    when you type "D" in textinput, the list will show you the names which start with "D" or include the letter "D" in their spelling.

  • How to export All computer list with operating system from AD and all attributes like disable or enable and OU location also?

    how to export All computer list with operating system from AD and all attributes like disable or enable and OU location also?
    I have tried with dsquery below but status is not showing there.
    dsquery * -filter "(objectCategory=computer)" -attr name operatingSystem

    last logon user name - not really stored (or lined) with computer object.  However, you can get this info during the logon process or from the computer.  Here is method:
    http://portal.sivarajan.com/2010/07/user-profile-and-os-info-powershell.html
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • Need to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.

    Hi All
    I have one sharepoint list with huge data i.e with 20columns and more than 200 records with the fields .
    Suppose lets consider there are A,B,C,D,E,F,G,H columns.
    Now i want to create one form with the fields A,C,E.
    When the user enter the existing data of list for columns A,C..based on C value the E column value should change and update that particular item in the list.
    Please guide me without visual web part can we acheive this by Sharepoint designer 2013 or what would be the preferable solution.
    Please help me on this as it is very urgent from me..
    Thanks in Advance
    Sowjanya G

    Hi,
    According to your post, my understanding is that you wanted to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.
    I recommend to create workflow associated to the list and then start the workflow automatically when an item is changed.
    In the workflow, you can add condition and actions as below:
    If current item: C equal to Test1
         Set E to Test2
    Then the value of the filed E will be changed based on the value of the filed C.
    In addition, if you create the form using InfoPath, you can add rule to the filed C as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can we display the list of Report Names in Dashboard Prompt?

    How can we display the list of Report Names in Dashboard Prompt?

    Hi,
    No its not possible to display list of reports in dashboard prompts.
    Can do this using SQl results in prompt(we write query checking out report names manualy),but its not easy thing if you are having many report names to be displayed.
    Assign points and close your threads if answered.
    Refer : http://forums.oracle.com/forums/ann.jspa?annID=939
    Regards,
    Srikanth

  • How to extract all the list of reports names available in the WEBI public?

    can anyone please help me how  to extract all the list of reports names which are available in the WEBI Public folder?
    I ran the VB macro downloaded from net but that is extracting all crystal,deski & webi reports..
    but i want only webi list of reports..
    Please help me to achieve this?
    Thanks
    Radha

    Is this about Business Objects WEBI? You might want to post in the BOBJ forums instead.[BOBJ Forums|/community [original link is broken];

  • How do I change multiple list items at once in a SharePoint list with ribbon button

    Hi
    I have a sharepoint list and a ribbon button that open a dialog box with buttons to set color on a row
    The problem is that i can only selecet one item at once to set the color. 
    How can i do so it could set all or a couple items att once to the color i want 
    I want to do this with javascript
    here is the code i use to get the item id and the color code is in a seperate js file
    'use strict';
    var clientContext, hostweburl, parentContext, parentWeb, selectedItem, itemId, listId;
    clientContext = new SP.ClientContext.get_current();
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    listId = decodeURIComponent(getQueryStringParameter("SPListId"));
    itemId = decodeURIComponent(getQueryStringParameter("SPListItemId"));
    parentContext = new SP.AppContextSite(clientContext, hostweburl);
    parentWeb = parentContext.get_web();
    selectedItem = parentWeb.get_lists().getById(listId).getItemById(itemId);
    $(document).ready(function () {
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(OnSuccess, OnFail);
    function OnSuccess() {
    $("#Blue").click(function () {
    selectedItem.set_item('Color', 'Blue');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Green").click(function () {
    selectedItem.set_item('Color', 'Green');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Red").click(function () {
    selectedItem.set_item('Color', 'Red');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Transparent").click(function () {
    selectedItem.set_item('Color', 'No Color');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });

    Check if below can help you
    http://sp2010batchedit.codeplex.com/
    http://sharepoint.stackexchange.com/questions/35935/use-view-ribbon-custom-action-on-multiple-list-items
    http://webcache.googleusercontent.com/search?q=cache:XqMO-PRLHQIJ:dannyjessee.com/blog/index.php/2014/06/enabling-custom-ribbon-buttons-dynamically-based-on-multiple-selected-item-values-using-refreshcommandui-and-jsom/+&cd=1&hl=en&ct=clnk&gl=in
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="DannyJessee.TestCustomAction"
    Location="CommandUI.Ribbon"
    RegistrationId="100"
    RegistrationType="List">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.ListItem.Actions.Controls._children">
    <Button Id="DannyJessee.MarkItemsFinishedButton"
    Command="cmdMarkItemsFinished"
    Image16by16="/_layouts/images/kpinormallarge-0.gif"
    Image32by32="/_layouts/images/kpinormallarge-0.gif"
    LabelText="Mark as Finished"
    TemplateAlias="o2" />
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="cmdMarkItemsFinished"
    CommandAction="javascript:MarkItemsFinished();"
    EnabledScript="javascript:EnableFinishedButton();">
    </CommandUIHandler>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    <CustomAction Id="DannyJessee.TestScript"
    Location="ScriptLink"
    ScriptSrc="/_layouts/15/CustomRibbonButton/CustomAction.js" />
    </Elements>
    If this helped you resolve your issue, please mark it Answered

  • How do I filter a SharePoint list on blanks?

    I have a large SharePoint list and want to create a view the shows only rows where a particular column is blank.  I know there are some special values like [Today] and [Me].  Is there one for [Blank] or [Null]?  How can this be done?

    Hi ChrisHoll,
    Is the column you use to filter the view a multiple lines of text type?
    Please Convert it to XSLT Data View in SPD then Filter option (Select the column name IsNull) could be set in Common Data View Tasks.
    For detail please check out this similar thread.
    http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/77e37df7-0286-4a30-8b67-03317eff63b7
    Thanks.
    Best regards. Emir

  • How do I Create a SharePoint List with two Attachment fields

    Hi Everyone
    I am using SharePoint 2013 Enterprise and Visual Studio 2013.
    I need to create a SharePoint list that has two fields of attachment type.
    Possible is a list supports this functionality natively?
    Tanks in advance.
    Eduardo

    Hi Muruguesa!
    When I customize the form in InfoPath Designer the following message appears:
    The publish operation Could Not Be completed. It can not be determined if the form template was successfully published. Try publishing the form template again, or change the settings to list
    Catastrophic failure
    I reported this error recently but not yet success in solving the problem:
    https://social.msdn.microsoft.com/Forums/office/en-US/687f2282-ad3d-4d13-a548-d25641b6b293/cannot-edit-form-in-infopath-when-list-was-created-in-visual-studio?forum=sharepointcustomization
     Do you have any ideas on how I can solve this case.
    PS: My list was created on Visual Sudio an Im using  SharePoint 2013 Enterprise and Visual Studio 2013.
    Thanks

  • How to auto populate a column/SharePoint list with Current Date?

    I have a SharePoint list and I created a column called ‘CurrDate’. 
    I need this column to;
     Display the current      date,
    Auto populate all rows with the current date in the      SharePoint list
    Dynamically update with the current date
    I first tried creating the column using the default SharePoint interface Date Time but it’s not doing any of the steps listed above:
    I even tried entering =[Today] in the Calculated Value field. 
    Still nothing…
    So, I’m sure you will toss out a code snippet to make this work, which is great. 
    However, I’m a total noob with SPD, where the heck do I insert this snippet?
    Always in need of help.

    Hi ,
    I understand that you want to add a column  to a list to hold current date. Here is a workaround:
    Add a single line of text column to the list. Name the list as Today.
    Add a calculated column to the list. Use the [Today] as the formula. Set the calculated column to be Date and Time type.
    Delete the Today column from the list.
    Thanks,
    Entan Ming
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please [email protected]
    Entan Ming
    TechNet Community Support

  • Import sharepoint list with di

    Has anyone successfully imported a SharePoint List using Data Integrator (DI)? We are having an issue with the mixed content WSDL generated by SharePoint.

    Hi Keith,
    I've seen that kinda issue with trying to use the Sharepoint lists.asmx WSDL in Data Integrator before.  Because that WSDL file has mixed content for almost all of its functions, DI doesn't know how to properly format the metadata.  Without a specific metadata schema to follow, you can't design a dataflow to map between fields.  When a WSDL file provides actual schema definitions for its functions, DI can use the functions properly.  The same is true for mixed content in an XSD you want to import and use as an XML source -- how would DI know how to use the data if the format is unpredictable?
    Thanks,
    ~Scott

  • How to remove a Sharepoint list from the Powerpoint app on iPads??

    Hello,
    I have added a Sharepoint "place" in Powerpoint app on an iPad and cannot find a way to remove it, the address of the SharePoint page/place/list has been changed so it is no longer relevant to me. Any tips?

    Hello Scott,
    I did post a question but for some reason it didn't post. What I typed was removed for some reason. So I'm trying again. I'll keep trying until it posts. I had installed a 3rd party sound editor program which added a sound device to the list with Mic and line in. It's also in the output list. All I need to do is remove the device and then AU will allow me to select line in as an input device. Right now AU is confused by the extra device and wont let me select an input device. AU is a developer app. But that's not the problem. The problem is removing the device from the list of sound devices.
    If someone knows where this device might be and how to remove it, please let me know.
    Thanks,
    Dave

Maybe you are looking for

  • How do you display Roles?

    In the old Enterprise Console, it was possible to display Roles, and see what privileges had been granted to each, and what users had been linked to an individual role. Is it possible to do something similar in SQL Developer? I can write my own queri

  • SCCM2012 R2 intune - Cannot dowload csr file APN from SCCM console

    I want to enroll IOS device, but when i want to generate csr, after successful login on intune, i have a message "Service unavailable". So, i can't download csr file. The Management for windows phone works as well as for android.

  • Hard drive exchange between MacBook(2007) and MacBookPro(2009)

    I have a MacBook(2005) that I upgraded with a 500GB hard drive and other stuff. I just did a fresh install of Snow Leopard and all my settings are right where I want them and it fells perfect. Currently I am using 300GB of hard drive space. However,

  • Error : Connection factory has been stopped

    Hi , i Have a JPA/Toplink application to be depolyed on OAS 10.1.3.3 , i defined a DataSource on the Application Server , but iam getting this error when iam trying to run my application : Caused by: java.sql.SQLException: javax.resource.spi.Applicat

  • Changing design of FAQ module

    Hi, I can't seem to find the way to change the search button in the FAQ module. I when trough all the CSS and can't find a clue how to do this. Has you have figured out, I know very little about coding so any help would be welcome. Here is the url of