|
|
|
@ -38,7 +38,6 @@ namespace ICSharpCode.Reports.Core{
@@ -38,7 +38,6 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Designer(typeof(ReportSettingsDesigner))] |
|
|
|
|
public class ReportSettings :Component,IDisposable |
|
|
|
|
{ |
|
|
|
@ -48,32 +47,11 @@ namespace ICSharpCode.Reports.Core{
@@ -48,32 +47,11 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
private string reportName; |
|
|
|
|
private string fileName; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool useStandardPrinter; |
|
|
|
|
private bool landSacpe; |
|
|
|
|
private GraphicsUnit graphicsUnit; |
|
|
|
|
|
|
|
|
|
private Padding padding; |
|
|
|
|
private string connectionString; |
|
|
|
|
private string commandText; |
|
|
|
|
private string noDataMessage = "No Data for this Report"; |
|
|
|
|
private System.Data.CommandType commandType = System.Data.CommandType.Text; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Font defaultFont; |
|
|
|
|
|
|
|
|
|
private GlobalEnums.ReportType reportType; |
|
|
|
|
private GlobalEnums.PushPullModel dataModel; |
|
|
|
|
|
|
|
|
|
private ParameterCollection parameterCollection; |
|
|
|
|
private AvailableFieldsCollection availableFields; |
|
|
|
|
private ColumnCollection groupingsCollection; |
|
|
|
|
private SortColumnCollection sortingCollection; |
|
|
|
|
private int bottomMargin; |
|
|
|
|
private int topMargin; |
|
|
|
|
private int leftMargin; |
|
|
|
|
private int rightMargin; |
|
|
|
|
private Size pageSize; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Constructor
|
|
|
|
|
|
|
|
|
@ -102,27 +80,28 @@ namespace ICSharpCode.Reports.Core{
@@ -102,27 +80,28 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
this.fileName = BuildFilename(fileName); |
|
|
|
|
} |
|
|
|
|
BaseValues(); |
|
|
|
|
this.pageSize = pageSize; |
|
|
|
|
this.PageSize = pageSize; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BaseValues() |
|
|
|
|
{ |
|
|
|
|
this.useStandardPrinter = true; |
|
|
|
|
this.graphicsUnit = GraphicsUnit.Pixel; |
|
|
|
|
this.padding = new Padding(5); |
|
|
|
|
this.defaultFont = GlobalValues.DefaultFont; |
|
|
|
|
this.reportType = GlobalEnums.ReportType.FormSheet; |
|
|
|
|
this.dataModel = GlobalEnums.PushPullModel.FormSheet; |
|
|
|
|
this.pageSize = GlobalValues.DefaultPageSize; |
|
|
|
|
this.topMargin = GlobalValues.DefaultPageMargin.Left; |
|
|
|
|
this.bottomMargin = GlobalValues.DefaultPageMargin.Bottom; |
|
|
|
|
this.leftMargin = GlobalValues.DefaultPageMargin.Left; |
|
|
|
|
this.rightMargin = GlobalValues.DefaultPageMargin.Right; |
|
|
|
|
this.UseStandardPrinter = true; |
|
|
|
|
this.GraphicsUnit = GraphicsUnit.Pixel; |
|
|
|
|
this.Padding = new Padding(5); |
|
|
|
|
this.DefaultFont = GlobalValues.DefaultFont; |
|
|
|
|
this.ReportType = GlobalEnums.ReportType.FormSheet; |
|
|
|
|
this.DataModel = GlobalEnums.PushPullModel.FormSheet; |
|
|
|
|
this.CommandType = System.Data.CommandType.Text; |
|
|
|
|
this.TopMargin = GlobalValues.DefaultPageMargin.Left; |
|
|
|
|
this.BottomMargin = GlobalValues.DefaultPageMargin.Bottom; |
|
|
|
|
this.LeftMargin = GlobalValues.DefaultPageMargin.Left; |
|
|
|
|
this.RightMargin = GlobalValues.DefaultPageMargin.Right; |
|
|
|
|
this.availableFields = new AvailableFieldsCollection(); |
|
|
|
|
this.groupingsCollection = new ColumnCollection(); |
|
|
|
|
this.sortingCollection = new SortColumnCollection(); |
|
|
|
|
this.parameterCollection = new ParameterCollection(); |
|
|
|
|
this.NoDataMessage = "No Data for this Report"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
@ -180,64 +159,38 @@ namespace ICSharpCode.Reports.Core{
@@ -180,64 +159,38 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(true), Category("Base Settings")] |
|
|
|
|
public GlobalEnums.ReportType ReportType { |
|
|
|
|
get { |
|
|
|
|
return reportType; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (reportType != value) { |
|
|
|
|
reportType = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public GlobalEnums.ReportType ReportType {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Page Settings
|
|
|
|
|
|
|
|
|
|
[Category("Page Settings")] |
|
|
|
|
public int BottomMargin { |
|
|
|
|
get { return bottomMargin; } |
|
|
|
|
set { bottomMargin = value; } |
|
|
|
|
} |
|
|
|
|
public int BottomMargin {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Page Settings")] |
|
|
|
|
public int TopMargin { |
|
|
|
|
get { return topMargin; } |
|
|
|
|
set { topMargin = value; } |
|
|
|
|
} |
|
|
|
|
public int TopMargin {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Page Settings")] |
|
|
|
|
public int LeftMargin { |
|
|
|
|
get { return leftMargin; } |
|
|
|
|
set { leftMargin = value; } |
|
|
|
|
} |
|
|
|
|
public int LeftMargin {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Page Settings")] |
|
|
|
|
public int RightMargin { |
|
|
|
|
get { return rightMargin; } |
|
|
|
|
set { rightMargin = value; } |
|
|
|
|
} |
|
|
|
|
public int RightMargin {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Page Settings")] |
|
|
|
|
public Size PageSize { |
|
|
|
|
get { return pageSize; } |
|
|
|
|
set { pageSize = value; } |
|
|
|
|
} |
|
|
|
|
public Size PageSize {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Page Settings")] |
|
|
|
|
public bool Landscape { |
|
|
|
|
get { return this.landSacpe; } |
|
|
|
|
set { this.landSacpe = value;} |
|
|
|
|
} |
|
|
|
|
public bool Landscape {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
@ -246,32 +199,11 @@ namespace ICSharpCode.Reports.Core{
@@ -246,32 +199,11 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
|
|
|
|
|
[Category("Designer Settings")] |
|
|
|
|
[DefaultValueAttribute (System.Drawing.GraphicsUnit.Millimeter)] |
|
|
|
|
public System.Drawing.GraphicsUnit GraphicsUnit |
|
|
|
|
{ |
|
|
|
|
get { |
|
|
|
|
return graphicsUnit; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (graphicsUnit != value) { |
|
|
|
|
graphicsUnit = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public System.Drawing.GraphicsUnit GraphicsUnit{get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Designer Settings")] |
|
|
|
|
public Padding Padding |
|
|
|
|
{ |
|
|
|
|
get { |
|
|
|
|
return padding; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (this.padding != value) { |
|
|
|
|
this.padding = value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public Padding Padding{get;set;} |
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -317,76 +249,31 @@ namespace ICSharpCode.Reports.Core{
@@ -317,76 +249,31 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
[DefaultValueAttribute ("")] |
|
|
|
|
[EditorAttribute (typeof(DefaultTextEditor), |
|
|
|
|
typeof(System.Drawing.Design.UITypeEditor) )] |
|
|
|
|
public string ConnectionString { |
|
|
|
|
get { |
|
|
|
|
if (this.connectionString == null) { |
|
|
|
|
this.connectionString = String.Empty; |
|
|
|
|
} |
|
|
|
|
return connectionString; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (connectionString != value) { |
|
|
|
|
connectionString = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public string ConnectionString {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Data")] |
|
|
|
|
[DefaultValueAttribute ("")] |
|
|
|
|
[EditorAttribute ( typeof(DefaultTextEditor), |
|
|
|
|
typeof(System.Drawing.Design.UITypeEditor) )] |
|
|
|
|
public string CommandText { |
|
|
|
|
get { |
|
|
|
|
if (this.commandText == null) { |
|
|
|
|
this.commandText = String.Empty; |
|
|
|
|
} |
|
|
|
|
return commandText; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (commandText != value) { |
|
|
|
|
commandText = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public string CommandText {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Data")] |
|
|
|
|
public System.Data.CommandType CommandType { |
|
|
|
|
get { |
|
|
|
|
return commandType; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (commandType != value) { |
|
|
|
|
commandType = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public System.Data.CommandType CommandType {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Data")] |
|
|
|
|
public GlobalEnums.PushPullModel DataModel { |
|
|
|
|
get { |
|
|
|
|
return dataModel; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (dataModel != value) { |
|
|
|
|
dataModel = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public GlobalEnums.PushPullModel DataModel {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Data")] |
|
|
|
|
[EditorAttribute ( typeof(DefaultTextEditor), |
|
|
|
|
typeof(System.Drawing.Design.UITypeEditor) )] |
|
|
|
|
public string NoDataMessage { |
|
|
|
|
get { |
|
|
|
|
return noDataMessage; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
noDataMessage = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public string NoDataMessage {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
@ -394,31 +281,14 @@ namespace ICSharpCode.Reports.Core{
@@ -394,31 +281,14 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
#region OutPut Settings
|
|
|
|
|
|
|
|
|
|
[Category("Output Settings")] |
|
|
|
|
public Font DefaultFont { |
|
|
|
|
get { |
|
|
|
|
return defaultFont; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (defaultFont != value) { |
|
|
|
|
defaultFont = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public Font DefaultFont {get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Category("Output Settings")] |
|
|
|
|
[DefaultValueAttribute (true)] |
|
|
|
|
public bool UseStandardPrinter |
|
|
|
|
{ |
|
|
|
|
get { |
|
|
|
|
return useStandardPrinter; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
if (useStandardPrinter != value) { |
|
|
|
|
useStandardPrinter = value; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public bool UseStandardPrinter{get;set;} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -436,10 +306,10 @@ namespace ICSharpCode.Reports.Core{
@@ -436,10 +306,10 @@ namespace ICSharpCode.Reports.Core{
|
|
|
|
|
if (disposing) |
|
|
|
|
{ |
|
|
|
|
// free managed resources
|
|
|
|
|
if (this.defaultFont != null) |
|
|
|
|
if (this.DefaultFont != null) |
|
|
|
|
{ |
|
|
|
|
this.defaultFont.Dispose(); |
|
|
|
|
this.defaultFont = null; |
|
|
|
|
this.DefaultFont.Dispose(); |
|
|
|
|
this.DefaultFont = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|