This example demonstrates how to provide a report's JSON data source with authentication parameters at runtime. You can see two approaches to provide authentication to the specified Web Service Endpoint:
-
Approach 1
You can use a connection string to create a JsonDataSource object. The connection string can include authentication parameters.
In this approach, only the JsonDataSource's connection name is serialized to the report's definition. The JsonDataSource's JsonSource property is not specified. -
Approach 2
You can use the UriJsonSource object to specify authentication parameters. Assign this object to the JsonDataSource's JsonSource property.
In this approach, authentication parameters are serialized to the report's definition together with the JsonDataSource's UriJsonSource object.
- MyUriJsonSource.cs (VB: MyUriJsonSource.vb)
- Form1.cs (VB: Form1.vb)
(you will be redirected to DevExpress.com to submit your response)