Custom datasource controller for AR14 web designer

Posted by: omer on 5 January 2020, 5:49 pm EST

  • Posted 5 January 2020, 5:49 pm EST

    Hi

    I’m trying to integrate the webdesigner in my application environment, and I can’t find the implementation for the api/datasource/* functions, nor any other explanation on how should a custom datasource controller look like.

    what am I missing?

  • Posted 6 January 2020, 12:09 am EST

    Hello,

    Could you please refer the following the link:

    https://www.grapecity.com/activereports/docs/v14/online/set-up-web-designer.html

    https://www.grapecity.com/activereports/docs/v14/online/web-designer-plugins-api.html

    Also, refer to the Web Designer MVC to use datasource customer controller which you can download from the following link:

    https://github.com/activereports/WebSamples14

    If the problem still occurs, please explain your use case in detail so that I can help you accordingly.

    Thanks,

    Mohit

  • Posted 6 January 2020, 12:39 am EST

    I think you misunderstand what I’m trying to do.

    these are all client side samples, what I’m talking about the server API. I want to write a webservice that I’ll be able to use as a datasource api, overriding the default one, so I can control what the end users do

  • Posted 6 January 2020, 9:50 pm EST

    Hello Omer,

    Have you checked the “WebDesigner_MVC” sample located at the following location:

    https://github.com/activereports/WebSamples14

    In the above sample, “DataSetsController.cs” controller class and “FileSystemDataSets.cs” class

    You can modify the “FileSystemDataSets” class to set the custom datasource in the web designer.

    Sorry if I still don’t understand your requirements.

    Thanks,

    Mohit

  • Posted 6 January 2020, 10:46 pm EST - Updated 30 September 2022, 8:22 am EST

    no, these are the dataset functions, I don’t have a problem with them. the services I want to shadow are /api/datasource/* and api/report/*

    like in the following calls:

  • Posted 9 January 2020, 11:23 pm EST

    Hello Omer,

    To override the reporting API, you need to implement your own report service. Please refer to the attachment to implement the same.

    About DataSource API, I still confuse why do you want to override it. If you want your own data provider, then you can use the following way:

    
                app.UseDesigner(config => config.UseDataProviders(ts));
    
    

    Request to please explain your use case in detail, so that I will help you accordingly.

    And sorry for inconvenience caused to you.

    Startup.zip

    Thanks,

    Mohit

  • Posted 11 January 2020, 5:01 pm EST

    basically, my product is an ERP, which includes an end-user report designer, so the user can design their own reports. but since they’re an end user, and have little to no technical knowladge, I don’t want to allow them to use whatever datasource they want.instead, I want to limit them only to the predefined data sources I give them, that I’ll generate programatically according to the user definition.

    Also, I want to set the route for the api services, because urls have some meaning in our architecture (basically, calling a service at address ~/cust1/* isn’t the same as calling the same service at address ~/cust2/*, even though it’s the same site and some users can access both)

  • Posted 12 January 2020, 9:56 pm EST

    Hello Omer,

    Thanks for the detail explanation. I have not found any direct way to achieve your requirement. Hence, I have escalated the issue to our development team(278105) for the same and will inform you once I get any information from them.

    Thanks,

    Mohit

  • Posted 15 January 2020, 1:57 am EST

    Hello Omer,

    Our development team wants to confirm, it would be enough to remove Edit and Remove options from datasource in the Webdesigner?

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels