AR12 - CustomDataProvider Filters - not working? or how to access?

Posted by: gwestwater on 5 December 2017, 2:25 am EST

    • Post Options:
    • Link

    Posted 5 December 2017, 2:25 am EST

    I am trying to build a custom data provider for AR 12. I am using the Report Designer example in AR 12 with the custom data provider CSV as an example.

    The issue is when you use the report designer to create “filters” the CSV data provider produces 0 results. Do these get passed to the data provider someplace and are not implemented? are they processed client side (in the report) if so where?

    In my case I really need to have access to the filters to send them to the remote server to process the filters and return the data properly, however, I can not see where they are passed / accessible by the data provider.

    Any help or direction anyone can provide would be greatly appreciated

  • Posted 7 December 2017, 1:03 am EST

    Hello,

    We are sorry to say but we could not properly understand as to which example you are pointing out. Is it: http://help.grapecity.com/activereports/webhelp/AR12/webframe.html#CustomDataProvider.html. Also, could you please share the steps you are using to create “filters”.

    Thanks,

    Ruchir Agarwal

  • Posted 8 December 2017, 6:50 am EST

    Attached is the screen I am using in the designer to create the filters.

    I was incorrect the filters do appear to filter the data. However they filter only on the client side.

    Is there a way to get these filters from the report programmaticly to be accessed from the customer provider? If not from the provider how can I access them stored in the report so I could print them to screen, iterate over them, etc…

  • Posted 10 December 2017, 7:18 pm EST

    Hello,

    We are assuming that you are using the “CustomeDataProvider” sample located at “C:\Users\mohitg\Documents\GrapeCity Samples\ActiveReports 12\Professional\CustomDataProvider\C#”;

    Also, you need to access the filter at run time to send them to the remote server to process the filters and return the data properly. In order to achieve this , you could use the “DesignerTabChanged”

    event of the “ReportDesigner”. Please use the following code in “DesignerTabChanged” event:

    private void ReportDesigner_DesignerTabChanged(object sender, DesignerTabChangedEventArgs e)

    {

    PageReport rpt = (PageReport)reportDesigner.Report;

    GrapeCity.ActiveReports.PageReportModel.Filter filter = rpt.Report.DataSets[0].Filters[0];

    System.Diagnostics.Debug.WriteLine("Filter Expression " + filter.FilterExpression.ToString());

    System.Diagnostics.Debug.WriteLine("Filter Values " + filter.FilterValues[0].ToString());

    System.Diagnostics.Debug.WriteLine("Filter Operator " + filter.Operator.ToString());

    }

    If our assumption is wrong, could you please explain in detail so we can help you further accordingly.

    Thanks,

    Mohit

  • Posted 11 December 2017, 4:58 am EST

    I really need to do this outside of the designer but I will try accessing those fields and let you know if that works.

    thank you very much

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels