以前模板上数据源选择DataSet Provider 后台用Json转TABLE,能预览
现在选择Json Provider,后台直接用Json赋值,预览就不行这是用DataSet Provider 后台绑定数据源(能预览)
pageReport.Document.LocateDataSource += delegate (object sender, LocateDataSourceEventArgs args)
{
string url = AppSetting.WebServiceUrl + report.ServiceUrl;//组装路径
var jsonString = RemoteProxyClient.GetDataString(url, "Post", report.JsonString, report.TokenType + " " + report.Token);
var table = JsonToTable(jsonString);
args.Data = table ;
};
这是用Json Provider 后台绑定数据源(不能预览)
pageReport.Document.LocateDataSource += delegate (object sender, LocateDataSourceEventArgs args)
{
string url = AppSetting.WebServiceUrl + report.ServiceUrl;//组装路径
var jsonString = RemoteProxyClient.GetDataString(url, "Post", report.JsonString, report.TokenType + " " + report.Token);
//var table = JsonToTable(jsonString);
args.Data = jsonString;
};
这个设置是干什么,如何设置?有什么用途?
|