Need to pass custom parameters to Report source as ObjectDataSource

2 posts, 0 answers
  1. Epep
    Epep avatar
    7 posts
    Member since:
    Jul 2018

    Posted 08 Jul 2018 Link to this post

    Hello,

    I am very new to Telerik Reporting and I have downloaded the trial version of it to see if Telerik reporting is able to fulfill the reporting requirements.

    Before, I have been using SSRS to generate the reports but I faced some issues and bugs that made me look for other options out there. I have some reports that have quite a complex logic in generating the data that is going to be used on the report. With RDLC, I had created some dataset that would serve as data source for the report and afterwards, I would fill the data on these datasets from code. Moreover, I used to create some partial views that were used for keeping custom parameters. I did not use any parameters on RDLC report, but instead, I would fill the datasets with already filtered data because in this way I keep the logic of data that should be displayed more under control.

    What would be the way how to implement the same with Telerik reporting? I mean, can I somehow interfere on the logic how the data are filtered on the report, or maybe use the same approach as I was using with RDLC? I.e., I use some custom parameters via the partial views that I have already created and using these values, I fill the datasets which will serve as data source to the reports? In this way I would not use the filters of Telerik reporting.

    To add some complexity logic to this, I have a report which uses two data sources which are basically two datatables of the same dataset. One data source will be used on the header of the report, meanwhile the second one will be used on the details section of the reports. So I will need to apply the filtering on both datasources.

     

    I tried to find some solutions to my case, but I am just not sure what would the best approach...

     

    Thanks a lot

  2. Epep
    Epep avatar
    7 posts
    Member since:
    Jul 2018

    Posted 09 Jul 2018 Link to this post

    Well, it looks like I found a good approach on solving the issue and moreover to not make many changes to my existing solution with SSRS.

    So, I still use the ObjectDataSource, but now I have created some REST API services on the MVC project (where I keep the full logic of filling the datasets). In the reports library project, I have created another class the methods of which just consume the REST services from the MVC project (using RestSharp) and return the results. So, now the reports will use as data source the client of the rest services.

    I can also protect the REST APIs and have the client class authenticate before consuming the services. I think this approach seems right the correct one.

    Thanks to whoever found some time to read my very long questions which honestly do not seem that concise and clear.

    Kind Regards

Back to Top