none
Retrieving Sharepoint LIst Data Dynamically for a report in Dataset

    Question

  • Hi 

    In my report, I have to retrieve data from sharepoint list dynamically by passing value to one of the sharepoint list column that is being defined in "applied fileter" section during the creation of dataset.  

    I am illustrating the data below as it looks in sharepoint site as an example. 

    ReportName-----------------------------------------SaanctionNumber

    ReportABCD----------------------------------------1

    ReportABCD------------------------------------------2

    ReportABCD------------------------------------------3

    And the Applied filter sections would looks like below.

    FiledName-------------------Operator-------------------Value

    ReportName---------------- is----------------------------ReportABCD

    SanctionNumber------------is ---------------------------(this is where the value should                                                                                                   be passed dynamically, in this                                                                                                     case it should go as 1 or 2 or 3                                                                                                   based on some group in the                                                                                                       report)

    Can someone help me if any of you come across in your development.

    Thanks

    Eranna






    • Edited by erannaa Saturday, September 28, 2013 1:55 PM
    Saturday, September 28, 2013 1:43 PM

Answers

  • Hi Eranna,

    If I understand correctly, you want to retrieve data from SharePoint List based on the parameter selection dynamically. How does the parameter (supposing its name is pSanNum) get available values (SanctionNumber in your example)? If it gets available values from a dataset query, you can create another dataset which only retrieves the SanctionNumber column from the same SharePoint list and provides values for the parameter. Then, you can add a filter to the main dataset as follows:

    Expression: [SanctionNumber]
    Operator: =
    Value: [@pSanNum]

    If the parameter doesn’t have available values (i.e. users need to input the parameter value manually), you can directly add the above filter to the main dataset rather than create another dataset.

    If it is a multi-value parameter, you should change the operator to In in the above filter.

    Regards,


    Mike Yin
    TechNet Community Support

    Monday, September 30, 2013 4:12 PM
    Moderator

All replies

  • Do you have the option of importing the SharePoint list into a database?  If so, you can use SSIS to do so.  Here is a step-by-step:  http://dataqueen.unlimitedviz.com/2011/06/how-to-use-a-sharepoint-list-as-a-data-source-in-your-ssis-package/

    Martina White

    Monday, September 30, 2013 12:27 AM
  • Hi Eranna,

    If I understand correctly, you want to retrieve data from SharePoint List based on the parameter selection dynamically. How does the parameter (supposing its name is pSanNum) get available values (SanctionNumber in your example)? If it gets available values from a dataset query, you can create another dataset which only retrieves the SanctionNumber column from the same SharePoint list and provides values for the parameter. Then, you can add a filter to the main dataset as follows:

    Expression: [SanctionNumber]
    Operator: =
    Value: [@pSanNum]

    If the parameter doesn’t have available values (i.e. users need to input the parameter value manually), you can directly add the above filter to the main dataset rather than create another dataset.

    If it is a multi-value parameter, you should change the operator to In in the above filter.

    Regards,


    Mike Yin
    TechNet Community Support

    Monday, September 30, 2013 4:12 PM
    Moderator