Browse Source

报表调整

master
yibo 7 years ago
parent
commit
9bd148dc77
2 changed files with 38 additions and 2 deletions
  1. +4
    -1
      B3QingDaoWanFu.Web/DFGridReportPage.cs
  2. +34
    -1
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs

+ 4
- 1
B3QingDaoWanFu.Web/DFGridReportPage.cs View File

@ -34,7 +34,10 @@ namespace BWP.Web
int height;
if (int.TryParse(bodyHeight, out height) && height > 180)
{
mDFGrid.Height = height - 160;
if (EnableExcelExport && EnablePrint)
mDFGrid.Height = height - 160;
else
mDFGrid.Height = height - 100;
}
else
{


+ 34
- 1
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/Reports/ComprehensiveReport.cs View File

@ -23,6 +23,8 @@ using TSingSoft.WebControls2.DFGrids;
using TSingSoft.WebPluginFramework;
using BWP.B3Frameworks;
using System.Web.UI;
using TSingSoft.WebPluginFramework.Controls;
using TSingSoft.WebPluginFramework.Exports;
namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
{
@ -160,7 +162,6 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
return r;
}
TextBox _reportLockCol;
protected override void AddQueryControls(VLayoutPanel vPanel)
{
@ -193,6 +194,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
protected override void InitQueryPanel(QueryPanel queryPanel)
{
base.InitQueryPanel(queryPanel);
AppendButtonPanel(queryPanel);
var panel = queryPanel.CreateTab("显示字段");
var hPanel = new HLayoutPanel();
panel.EAdd(hPanel);
@ -252,6 +254,37 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.Reports
queryPanel.ConditonPanel.EAdd(CreateDataRangePanel());
}
protected override bool EnablePrint
{
get
{
return false;
}
}
protected override bool EnableExcelExport
{
get
{
return false;
}
}
void AppendButtonPanel(QueryPanel queryPanel)
{
queryPanel.ButtonsPanel.EAdd(new TSButton("打印")).OnClientClick = "print();return false;";
var exporter = new Exporter();
var excelExporter = new DFGridServiceExcelExporter(ExportExcelName, this);
excelExporter.CreateQuerySettings = delegate
{
return new QuerySettings(SelectRange.All, mDFGrid.SortField, mDFGrid.SortDirection);
};
queryPanel.ButtonsPanel.EAdd(new TSButton("导出到Excel", (sender, args) => exporter.Export(excelExporter)));
queryPanel.ButtonsPanel.EAdd(exporter);
}
Control CreateDataRangePanel()
{
var hPanel = new HLayoutPanel();


Loading…
Cancel
Save