SVN r1239
SVN-Revision: r1239
This commit is contained in:
@@ -165,7 +165,7 @@ namespace Lskj.FastReportDesign
|
|||||||
this.printFile = this.Model.printFile;
|
this.printFile = this.Model.printFile;
|
||||||
//主Sql
|
//主Sql
|
||||||
string mainSql = string.Empty;
|
string mainSql = string.Empty;
|
||||||
List<string> tmpSqls = tmpSql2.Split(';').ToList();
|
//List<string> tmpSqls = tmpSql2.Split(';').ToList();
|
||||||
form = new BaseForm();
|
form = new BaseForm();
|
||||||
form.Text = "打印程序";
|
form.Text = "打印程序";
|
||||||
form.IsMdiContainer = true;
|
form.IsMdiContainer = true;
|
||||||
@@ -267,6 +267,13 @@ namespace Lskj.FastReportDesign
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
Report report = new Report();
|
Report report = new Report();
|
||||||
|
//设置边距
|
||||||
|
//if(report.Pages.Count > 0 && report.Pages[0] is ReportPage page)
|
||||||
|
//{
|
||||||
|
// // 设置左边距(单位:缇,1英寸=1440缇)
|
||||||
|
// page.LeftMargin = 100; // 约等于0.07英寸或1.76毫米
|
||||||
|
//}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WaitForm.ShowForm(ResourceKeys.Handing);
|
WaitForm.ShowForm(ResourceKeys.Handing);
|
||||||
@@ -291,7 +298,7 @@ namespace Lskj.FastReportDesign
|
|||||||
}
|
}
|
||||||
if (Model.printStyle.Equals(1))
|
if (Model.printStyle.Equals(1))
|
||||||
{
|
{
|
||||||
if (ERPInfo.Instance.IsUserManager)
|
if (ERPInfo.Instance.IsUserManager || SystemInfo.Instance.PrintTemplate.Split(',').Contains(ERPInfo.Instance.UserName))
|
||||||
{
|
{
|
||||||
this.ReportObj.Prepare();
|
this.ReportObj.Prepare();
|
||||||
this.ReportObj.Design(form);
|
this.ReportObj.Design(form);
|
||||||
@@ -370,29 +377,4 @@ namespace Lskj.FastReportDesign
|
|||||||
|
|
||||||
if (e.Preview != null && e.Preview.Report != null && e.Preview.Report.Preview != null)
|
if (e.Preview != null && e.Preview.Report != null && e.Preview.Report.Preview != null)
|
||||||
{
|
{
|
||||||
this.ReportObj.PrintSettings.PageRange = PageRange.All; // 设置为全部页面
|
this.ReportObj.PrintSettings.PageRange = PageRange.All; // 设置为全部页�
|
||||||
this.ReportObj.PrintSettings.PageNumbers = ""; // 清空页码范围
|
|
||||||
bool isPrint = e.Preview.Report.Preview.Print();
|
|
||||||
if (isPrint)
|
|
||||||
{
|
|
||||||
if (_printSaveParams != null && _printSaveParams.Count > 0)
|
|
||||||
{
|
|
||||||
//打印完成后添加数据库
|
|
||||||
int result = BaseModuleImpl.SavePrintRecord(_printSaveParams[0], _printSaveParams[1], _printSaveParams[2], _printSaveParams[3], _printSaveParams[4]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageUtil.Show("Preview, Report or Report Preview is null");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
|
||||||
MessageUtil.Show(Message, ex.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user