Web Service Data Source API Call Behavior on Preview

1 Answer 5 Views
General Discussions
Prabesh
Top achievements
Rank 1
Iron
Prabesh asked on 20 May 2025, 08:15 AM | edited on 20 May 2025, 09:54 AM

Hi Telerik Team,

I’m working with Telerik Report Designer and using a Web Service Data Source that is protected with two-step authentication. In my report, I have three report parameters: ClientId, Year, and Month. These parameters are passed to the API and are also used in three corresponding filters on the data source to dynamically fetch data for a crosstab.

From my understanding, when I click on the Preview button in the Report Designer:

  1. The first API call is made to retrieve the schema of the web service (to understand the structure).

  2. The second API call is made to fetch the actual data, using the parameter values I’ve provided.

Could you please confirm whether this is the expected behavior — i.e., that the Web Service Data Source initiates two separate API calls (one for schema, one for data), or it calls more than three times during preview?

I’m asking this to clarify internally, as I need to explain this behavior to my team.

Thank you in advance!

Best regards,
Prabesh Shrestha

Prabesh
Top achievements
Rank 1
Iron
commented on 21 May 2025, 07:31 AM

Hi Telerik Team, 

As a follow-up, I also wanted to ask about schema handling:

Suppose my API endpoint returns a response like the following:

GET https://api.example.com/v1/clients?clientid=12345

Response:
{
"Id": "12345",
"Name": "Sample Client",
"LogoUrl": null,
"Address": "123 Main St",
"Website": "www.example.com",
"CreatedDate": "2023-11-10T05:48:53.103",
"CreatedBy": "admin",
"Status": "Active"
}


To make this work with Telerik Report Designer, I noticed that if the API returns no data, the report throws an error — unless I return an **empty object** with all the expected fields (even if no actual records are returned).

My question is:
> Is there any **workaround** that allows me to **define the schema manually** inside Telerik Report Designer so I **don’t have to return a dummy/empty model** from the API just to satisfy the schema requirement?

This would help keep the API behavior cleaner and more efficient.

Thanks again!

Regards,
Prabesh Shrestha

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 21 May 2025, 07:59 AM

Hello Prabesh,

I confirm that the Report Designers make separate requests for the schema and then for the actual data. The schema is needed to show the available fields in the data explorer.

The report designer's functionalities can't be customized. Only the Web Report Designer allows limited customizations, however, they are not related to the WebServiceDataSource.

You may log a feature request if you want - https://feedback.telerik.com/reporting.

As a workaround, you may replace the WebServiceDataSource with an ObjectDataSource that triggers custom functionality for fetching the data from your Web Service.

Regards,
Todor
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Prabesh
Top achievements
Rank 1
Iron
commented on 21 May 2025, 11:36 AM | edited

Hi Todor,

Thank you for the insights provided in this thread.

I wanted to follow up with some details from my side. I'm using an ASP.NET MVC Web API controller to serve data to my reports, and I’m working with the Standalone Telerik Report Designer (not the Visual Studio integrated version).

I’ve tried the following approaches to avoid the double API call behavior (one for schema, one for data):

  1. Setting the inline JSON schema using the “Use Inline Data String” option in the WebServiceDataSource — unfortunately, even with this in place, the designer still makes a schema call before retrieving data during preview.

  2. Completing the data source configuration and supplying sample data manually — but this doesn't stop the initial schema-fetch request either.

I also looked into using ObjectDataSource, but that doesn’t work in my case because:

  • The Standalone Designer doesn’t support referencing compiled code or service methods directly.

  • My data comes from a Web API, not a local assembly or data method.

At this point, the only workaround I’ve found is to handle the schema-fetch request in the API itself by detecting when parameters are null or default, and then returning a dummy record just to satisfy the schema requirement. However, this isn’t ideal, especially for performance-sensitive APIs.

Is there any workaround that allows me to define the schema manually inside the Telerik Report Designer so I don’t have to return a dummy/empty model from the API just to satisfy the schema requirement?

I'd really appreciate any further suggestions or updates from the Telerik team on this.

Best regards,
Prabesh Shrestha

Tags
General Discussions
Asked by
Prabesh
Top achievements
Rank 1
Iron
Answers by
Todor
Telerik team
Share this question
or