using DevExpress.DataAccess.Json; namespace Lux.Report.Data.Template { public partial class OfferReport : DevExpress.XtraReports.UI.XtraReport { public OfferReport() { InitializeComponent(); } public OfferReport(string baseUrl, int offerID) { InitializeComponent(); //Parameters["pImgPath"].Value = baseUrl; Parameters["pOfferId"].Value = offerID; _offerId = offerID; _basePath = baseUrl; RequestParameters = false; } private int _offerId = 0; private string _basePath = ""; protected override void OnDataSourceDemanded(EventArgs e) { var jsonDataSource = DataSource as JsonDataSource; if (jsonDataSource != null && !string.IsNullOrEmpty(_basePath) && _offerId > 0) { string url = $"{_basePath}/{_offerId}"; jsonDataSource.JsonSource = new UriJsonSource(new Uri(url)); jsonDataSource.ConnectionName = null; //RequestParameters = false; } } } }