|
|
|
@ -91,9 +91,13 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
dataSource.Name = "Connection";
|
|
|
|
|
dataSource.ConnectionString = $"JSON={req.JsonDataStr};Encoding=utf-8";
|
|
|
|
|
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
//dataSource.Name = "Connection";
|
|
|
|
|
//dataSource.ConnectionString = $"JSON={req.JsonDataStr};Encoding=utf-8";
|
|
|
|
|
foreach (JsonDataSourceConnection connection in report.Dictionary.Connections)
|
|
|
|
|
{
|
|
|
|
|
connection.ConnectionString = $"JSON={req.JsonDataStr};Encoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
report.Save(printFile);
|
|
|
|
@ -214,9 +218,13 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
dataSource.Name = "Connection";
|
|
|
|
|
dataSource.ConnectionString = $"JSON={req.JsonDataStr};Encoding=utf-8";
|
|
|
|
|
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
//dataSource.Name = "Connection";
|
|
|
|
|
//dataSource.ConnectionString = $"JSON={req.JsonDataStr};Encoding=utf-8";
|
|
|
|
|
foreach (JsonDataSourceConnection connection in report.Dictionary.Connections)
|
|
|
|
|
{
|
|
|
|
|
connection.ConnectionString = $"JSON={req.JsonDataStr};Encoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
report.Save(printFile);
|
|
|
|
|
|
|
|
|
@ -396,8 +404,7 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
// var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
// dataSource.Name = "Connection";
|
|
|
|
|
// dataSource.ConnectionString = str.ConnectionString;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
if (report.Dictionary.Connections.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
//重置数据源
|
|
|
|
@ -409,13 +416,19 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
dataSource.Name = "Connection";
|
|
|
|
|
dataSource.ConnectionString = $"JSON={JsonConvert.SerializeObject(data)};Encoding=utf-8";
|
|
|
|
|
foreach (JsonDataSourceConnection connection in report.Dictionary.Connections)
|
|
|
|
|
{
|
|
|
|
|
connection.ConnectionString = $"JSON={JsonConvert.SerializeObject(data)};Encoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
////dataSource.Name = "Connection";
|
|
|
|
|
//dataSource.ConnectionString = $"JSON={JsonConvert.SerializeObject(data)};Encoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
report.Save(printFile);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
report.Load(printFile);
|
|
|
|
|
|
|
|
|
|
report.Prepare();
|
|
|
|
|
var printName = string.Empty;
|
|
|
|
|
var saveFile = string.Empty;
|
|
|
|
@ -590,9 +603,13 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
dataSource.Name = "Connection";
|
|
|
|
|
dataSource.ConnectionString = $"JSON={JsonConvert.SerializeObject(data)};Encoding=utf-8";
|
|
|
|
|
foreach (JsonDataSourceConnection connection in report.Dictionary.Connections)
|
|
|
|
|
{
|
|
|
|
|
connection.ConnectionString = $"JSON={JsonConvert.SerializeObject(data)};Encoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
|
//dataSource.Name = "Connection";
|
|
|
|
|
//dataSource.ConnectionString = $"JSON={JsonConvert.SerializeObject(data)};Encoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
report.Save(printFile);
|
|
|
|
|