|
|
@ -312,6 +312,8 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
var printFileName = $"{fileName}.frx";
|
|
|
|
var printFileName = $"{fileName}.frx";
|
|
|
|
var printFile = Path.Combine(savePath, printFileName);
|
|
|
|
var printFile = Path.Combine(savePath, printFileName);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//写入CRX文件
|
|
|
|
//写入CRX文件
|
|
|
|
using (FileStream fs = new FileStream(printFile, FileMode.Create))
|
|
|
|
using (FileStream fs = new FileStream(printFile, FileMode.Create))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -331,13 +333,14 @@ namespace DS.WMS.PrintApi.Service
|
|
|
|
report.Dictionary.Connections.Add(new JsonDataSourceConnection()
|
|
|
|
report.Dictionary.Connections.Add(new JsonDataSourceConnection()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ConnectionString = str.ConnectionString,
|
|
|
|
ConnectionString = str.ConnectionString,
|
|
|
|
Name = "Connection",
|
|
|
|
Name = "Connection",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
//else {
|
|
|
|
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
// var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
dataSource.ConnectionString = str.ConnectionString;
|
|
|
|
// dataSource.ConnectionString = str.ConnectionString;
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
|
|
|
|
//var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder();
|
|
|
|
//var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder();
|
|
|
|
//str.Json = JsonConvert.SerializeObject(data);
|
|
|
|
//str.Json = JsonConvert.SerializeObject(data);
|
|
|
|