How binding a json value into the textbox

1 Answer 47 Views
.NET Core DataSource WebService Expressions Report Designer - Web
Kelvin
Top achievements
Rank 1
Kelvin asked on 27 Nov 2024, 04:59 PM
Hi team, i using the WebServiceDatasource in the Web Report Designer, response of the datasource as below
{
  "CurrentCompanyID": "{{CurrentUserID}}",
  "CurrentUserID": "{{CurrentUserID}}",
  "CurrentUserEmail": "{{CurrentUserEmail}}",
  "CurrentCompanyName": "{{CurrentCompanyName}}",
  "CurrentPlacementID": "{{CurrentPlacementID}}"
}
in the page, i just binding [= Fields.CurrentCompanyID] in textbox
but preview, this textbox is empty. Can you tell me why? Any restriction with the value?
One more question. If the response is a array, how to i get the item by index? Something like this [= Fields.CompanyID(0).Value]

1 Answer, 1 is accepted

Sort by
0
Ivet
Telerik team
answered on 02 Dec 2024, 02:15 PM

Hello Kelvin,

Thank you for reaching out.

The problem may come because the data source component of the DataSource property of the report is not put. This issue can occur if you drag and drop the item - Dragging a Data field to Report in Web Report Designer should set automatically its DataSource property. To solve it you have to add the data source component as a DataSource to the report.

Regarding the question of how to get the item by index, you can use this function Item(idx, args) which you can see how it works in this Utility Functions at a Glance - Telerik Reporting article.

I hope the above information will be useful. Let me know if you have other questions.

Regards,
Ivet
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
.NET Core DataSource WebService Expressions Report Designer - Web
Asked by
Kelvin
Top achievements
Rank 1
Answers by
Ivet
Telerik team
Share this question
or