Is it possible to pass parameters (query string) in a Web API request?

Posted by: harold.saavedra on 16 August 2020, 1:18 pm EST

    • Post Options:
    • Link

    Posted 16 August 2020, 1:18 pm EST

    Reference: https://stackoverflow.com/questions/63392884/in-activereportsjs-is-it-possible-to-pass-parameters-to-a-web-service

    I’m trying to get the DataSource from a web server API and I want to pass parameters to the API as a query string.

    I’m using the Content URI to call the API but I’m not able to put the report parameters into the query string:

    I have tried something like:

    http://northwind.netcore.io/customers?format=Parameters!Parameter1.value

    but it doesn’t work.

    Is it possible to set parameters in the Content URI when calling an API ?

  • Posted 16 August 2020, 8:07 pm EST

    Hello,

    Have you tried with the following connection strings:

    =“jsondoc=” & “http://northwind.netcore.io/customers?format=” &Parameters!Parameter1.Value

    Also, to create fields automatically, You can do one thing, create datasource and dataset with valid data and bind the table with the dataset. After that, you can just replace connection string in the connection string with the above one:

    Thanks,

    Mohit

  • Posted 17 August 2020, 1:25 pm EST

    Hello Mohit,

    Thank you for your help.

    I was able to pass the query parameters using the Connection String text area.

    It is confusing that the “Content URI” has to be empty and the “Connection String” has to be set though.

  • Posted 13 June 2021, 2:15 pm EST - Updated 2 October 2022, 11:12 pm EST

    Dear Mohitg,

    I have issue same harold.saavedra.

    I create reportParameters and passing to form activereport but when debug in back-end, it don’t get value.

    Please help me.

    Thank you.

  • Posted 13 June 2021, 9:14 pm EST

    Hello, Hà Bảo Dưỡng,

    Please, note that your question is about ActiveReports.NET, but this is the ActiveReportsJS forum. The link to ARNET forum is https://www.grapecity.com/forums/activereports

  • Posted 13 June 2021, 9:29 pm EST

    Dear sergey.abakumov,

    I use JSViewer in Angular to show file rdlx and ASP. NET Core to build API server.

    My problem can’t add parameter when run-time in Angular.

    I think I posted in the right place.

    If have any problem, please let me know.

    Thank you.

  • Posted 13 June 2021, 9:35 pm EST

    It is not the right place because you use ActiveReports.NET product that has the forum at https://www.grapecity.com/forums/activereports

Need extra support?

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

Learn More

Forum Channels