Browse Source

Work on <http://community.sharpdevelop.net/forums/thread/10479.aspx> (Reports with StoredProcedures and Parameters), add a new Dialog for Parameter entry, did some refactoring to eleminate parts of SharpQuery

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1694 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Peter Forstmeier 19 years ago
parent
commit
436fdde902
  1. 177
      src/AddIns/Misc/SharpReport/SharpReport/ParameterDialog.cs
  2. 1
      src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj
  3. 2
      src/AddIns/Misc/SharpReport/SharpReport/SharpReportManager.cs
  4. 4
      src/AddIns/Misc/SharpReport/SharpReportAddin/FieldsExplorer/ExplorerTree.cs
  5. 6
      src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportView.cs
  6. 37
      src/AddIns/Misc/SharpReport/SharpReportCore/BaseClasses/AbstractParameter.cs
  7. 82
      src/AddIns/Misc/SharpReport/SharpReportCore/BaseClasses/SqlParameter.cs
  8. 31
      src/AddIns/Misc/SharpReport/SharpReportCore/Collections/Collections.cs
  9. 8
      src/AddIns/Misc/SharpReport/SharpReportCore/DataManager/DataManager.cs
  10. 16
      src/AddIns/Misc/SharpReport/SharpReportCore/DataManager/SqlQueryChecker.cs
  11. 5
      src/AddIns/Misc/SharpReport/SharpReportCore/Events/SharpReportParametersEventArgs.cs
  12. 1
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs
  13. 14
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs
  14. 108
      src/AddIns/Misc/SharpReport/SharpReportCore/Printing/ReportDocument.cs
  15. 6
      src/AddIns/Misc/SharpReport/SharpReportCore/ReportParameters.cs
  16. 10
      src/AddIns/Misc/SharpReport/SharpReportCore/ReportSettings.cs
  17. 1
      src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportEngine.cs
  18. 23
      src/AddIns/Misc/SharpReport/SharpReportWizard/GeneratorCommands.cs
  19. 5
      src/AddIns/Misc/SharpReport/SharpReportWizard/Generators/GeneratePullDataReport.cs
  20. 55
      src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.cs
  21. 1
      src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj
  22. 72
      src/AddIns/Misc/SharpReport/SharpReportWizard/SqlParameterConverter.cs
  23. 195
      src/AddIns/Misc/SharpReport/SharpReportWizard/WizardPanels/ResultPanel.cs

177
src/AddIns/Misc/SharpReport/SharpReport/ParameterDialog.cs

@ -0,0 +1,177 @@ @@ -0,0 +1,177 @@
/*
* Created by SharpDevelop.
* User: Forstmeier Helmut
* Date: 09.08.2006
* Time: 13:55
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using SharpReportCore;
namespace SharpReport{
/// <summary>
/// Description of ParameterDialog.
/// </summary>
public class ParameterDialog : System.Windows.Forms.Form
{
private SqlParametersCollection collection;
public ParameterDialog(SqlParametersCollection collection):this(){
this.collection = collection;
this.dataGrid1.DataSource = this.collection;
}
public ParameterDialog()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
}
#region Designer generated
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.groupBox = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox.SuspendLayout();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(46, 87);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(363, 120);
this.dataGrid1.TabIndex = 1;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 77.28119F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.71881F));
this.tableLayoutPanel1.Controls.Add(this.cancelButton, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.okButton, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 233);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(10, 3, 10, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(457, 30);
this.tableLayoutPanel1.TabIndex = 3;
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Dock = System.Windows.Forms.DockStyle.Right;
this.cancelButton.Location = new System.Drawing.Point(374, 3);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(80, 24);
this.cancelButton.TabIndex = 0;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
//
// okButton
//
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Dock = System.Windows.Forms.DockStyle.Right;
this.okButton.Location = new System.Drawing.Point(275, 3);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 24);
this.okButton.TabIndex = 1;
this.okButton.Text = "Ok";
this.okButton.UseVisualStyleBackColor = true;
//
// groupBox
//
this.groupBox.Controls.Add(this.label2);
this.groupBox.Controls.Add(this.label1);
this.groupBox.Location = new System.Drawing.Point(46, 13);
this.groupBox.Name = "groupBox";
this.groupBox.Size = new System.Drawing.Size(363, 56);
this.groupBox.TabIndex = 5;
this.groupBox.TabStop = false;
//
// label2
//
this.label2.Location = new System.Drawing.Point(109, 17);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(248, 17);
this.label2.TabIndex = 5;
this.label2.Text = "label2";
//
// label1
//
this.label1.Location = new System.Drawing.Point(6, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(97, 17);
this.label1.TabIndex = 3;
this.label1.Text = "Stored Procedure:";
//
// ParameterDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(477, 273);
this.ControlBox = false;
this.Controls.Add(this.groupBox);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.dataGrid1);
this.Name = "ParameterDialog";
this.Padding = new System.Windows.Forms.Padding(10);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ParameterDialog";
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.groupBox.ResumeLayout(false);
this.ResumeLayout(false);
}
private System.Windows.Forms.GroupBox groupBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGrid dataGrid1;
#endregion
}
}

1
src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj

@ -94,6 +94,7 @@ @@ -94,6 +94,7 @@
<Compile Include="Designer\VisualControls\ITracker.cs" />
<Compile Include="Designer\VisualControls\ReportTableControl.cs" />
<Compile Include="ReportItems\TextBased\ReportTableItem.cs" />
<Compile Include="ParameterDialog.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Designer" />

2
src/AddIns/Misc/SharpReport/SharpReport/SharpReportManager.cs

@ -333,7 +333,7 @@ namespace SharpReport{ @@ -333,7 +333,7 @@ namespace SharpReport{
/// Collection of Parameters for the Report
/// </summary>
public AbstractParametersCollection SqlParametersCollection{
public SqlParametersCollection SqlParametersCollection{
get {
return this.baseDesignerControl.ReportModel.ReportSettings.SqlParametersCollection;
}

4
src/AddIns/Misc/SharpReport/SharpReportAddin/FieldsExplorer/ExplorerTree.cs

@ -8,9 +8,9 @@ @@ -8,9 +8,9 @@
*/
using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using ICSharpCode.Core;
@ -300,7 +300,7 @@ namespace SharpReportAddin{ @@ -300,7 +300,7 @@ namespace SharpReportAddin{
}
}
private void SetParamFields (AbstractParametersCollection collection){
private void SetParamFields (SqlParametersCollection collection){
ColumnsTreeNode node;
this.nodeParams.Nodes.Clear();

6
src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportView.cs

@ -315,10 +315,10 @@ namespace SharpReportAddin{ @@ -315,10 +315,10 @@ namespace SharpReportAddin{
/// </summary>
private void OnParametersRequest (object sender,SharpReportParametersEventArgs e) {
AbstractParametersCollection collection = e.SqlParametersCollection;
SqlParametersCollection collection = e.SqlParametersCollection;
if (collection != null && collection.Count > 0) {
using (ParameterInput parameterInput = new ParameterInput (e.ReportName,collection)){
DialogResult result = parameterInput.ShowDialog();
using (ParameterDialog dlg = new ParameterDialog(e.SqlParametersCollection)){
DialogResult result = dlg.ShowDialog();
}
}
}

37
src/AddIns/Misc/SharpReport/SharpReportCore/BaseClasses/AbstractParameter.cs

@ -22,27 +22,11 @@ namespace SharpReportCore { @@ -22,27 +22,11 @@ namespace SharpReportCore {
public class AbstractParameter : object {
string parameterName;
string prompt;
bool nullable;
object defaultValue;
public AbstractParameter() {
}
/// <summary>
/// Did we allow a null Value for this Parameter
/// </summary>
///
public bool Nullable {
get {
return nullable;
}
set {
nullable = value;
}
}
/// <summary>
/// Name of the Parameter
/// </summary>
@ -56,26 +40,5 @@ namespace SharpReportCore { @@ -56,26 +40,5 @@ namespace SharpReportCore {
}
}
/// <summary>
/// Display this string within a Custom Dialog for parameter entry
/// </summary>
public string Prompt {
get {
return prompt;
}
set {
prompt = value;
}
}
public virtual object DefaultValue {
get {
return defaultValue;
}
set {
defaultValue = value;
}
}
}
}

82
src/AddIns/Misc/SharpReport/SharpReportCore/BaseClasses/SqlParameter.cs

@ -28,7 +28,7 @@ namespace SharpReportCore { @@ -28,7 +28,7 @@ namespace SharpReportCore {
public class SqlParameter : AbstractParameter {
DbType dataType;
object defaultValue;
object parameterValue;
ParameterDirection parameterDirection = ParameterDirection.InputOutput;
@ -55,9 +55,9 @@ namespace SharpReportCore { @@ -55,9 +55,9 @@ namespace SharpReportCore {
base.ParameterName = parameterName;
this.DataType = dataType;
this.defaultValue = value;
base.Nullable = false;
base.Prompt = prompt;
// base.DefaultValue = value;
// base.Nullable = false;
// base.Prompt = prompt;
this.parameterDirection = parameterDirection;
}
@ -72,51 +72,51 @@ namespace SharpReportCore { @@ -72,51 +72,51 @@ namespace SharpReportCore {
case DbType.AnsiString :
case DbType.AnsiStringFixedLength :
case DbType.String :
case DbType.StringFixedLength : this.defaultValue = value; break;
case DbType.StringFixedLength : this.parameterValue = value; break;
case DbType.Boolean : {
this.defaultValue = bool.Parse( value);
this.parameterValue = bool.Parse( value);
break;
}
case DbType.SByte : {
this.defaultValue = sbyte.Parse( value,
this.parameterValue = sbyte.Parse( value,
CultureInfo.CurrentCulture );
break;
}
case DbType.Byte :{
this.defaultValue = byte.Parse( value ,
this.parameterValue = byte.Parse( value ,
CultureInfo.CurrentCulture );
break;
}
case DbType.Int16 : {
this.defaultValue = short.Parse( value,CultureInfo.CurrentCulture ); break;
this.parameterValue = short.Parse( value,CultureInfo.CurrentCulture ); break;
}
case DbType.Int32 : {
this.defaultValue = int.Parse( value,CultureInfo.CurrentCulture );
this.parameterValue = int.Parse( value,CultureInfo.CurrentCulture );
break;
}
case DbType.Int64 : {
this.defaultValue = long.Parse( value,CultureInfo.CurrentCulture );
this.parameterValue = long.Parse( value,CultureInfo.CurrentCulture );
break;
}
case DbType.UInt16 : this.defaultValue = ushort.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.UInt32 : this.defaultValue = uint.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.UInt64 : this.defaultValue = long.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.UInt16 : this.parameterValue = ushort.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.UInt32 : this.parameterValue = uint.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.UInt64 : this.parameterValue = long.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.Date :
case DbType.DateTime :
case DbType.Time : this.defaultValue = DateTime.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.Time : this.parameterValue = DateTime.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.Decimal : this.defaultValue = decimal.Parse( value ,CultureInfo.CurrentCulture ); break;
case DbType.Decimal : this.parameterValue = decimal.Parse( value ,CultureInfo.CurrentCulture ); break;
case DbType.Currency :
case DbType.VarNumeric :
case DbType.Double : this.defaultValue = double.Parse( value ,CultureInfo.CurrentCulture ); break;
case DbType.Single : this.defaultValue = float.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.Double : this.parameterValue = double.Parse( value ,CultureInfo.CurrentCulture ); break;
case DbType.Single : this.parameterValue = float.Parse( value,CultureInfo.CurrentCulture ); break;
case DbType.Guid : this.defaultValue = new Guid( value ); break;
case DbType.Guid : this.parameterValue = new Guid( value ); break;
default : {
throw new ArgumentOutOfRangeException("value");
}
@ -143,53 +143,51 @@ namespace SharpReportCore { @@ -143,53 +143,51 @@ namespace SharpReportCore {
case DbType.AnsiStringFixedLength :
case DbType.String :
case DbType.StringFixedLength :{
this.defaultValue = new string( (char[])null );
this.parameterValue = new string( (char[])null );
break;
}
//array type
case DbType.Binary : this.defaultValue = new byte[8000]; break;
case DbType.Binary : this.parameterValue = new byte[8000]; break;
//bool type
case DbType.Boolean : this.defaultValue = new bool(); break;
case DbType.Boolean : this.parameterValue = new bool(); break;
//interger type
case DbType.SByte : this.defaultValue = new sbyte(); break;
case DbType.Byte : this.defaultValue = new byte(); break;
case DbType.Int16 : this.defaultValue = new short(); break;
case DbType.Int32 : this.defaultValue = new int(); break;
case DbType.Int64 : this.defaultValue = new long(); break;
case DbType.UInt16 : this.defaultValue = new ushort(); break;
case DbType.UInt32 : this.defaultValue = new uint(); break;
case DbType.UInt64 : this.defaultValue = new long(); break;
case DbType.SByte : this.parameterValue = new sbyte(); break;
case DbType.Byte : this.parameterValue = new byte(); break;
case DbType.Int16 : this.parameterValue = new short(); break;
case DbType.Int32 : this.parameterValue = new int(); break;
case DbType.Int64 : this.parameterValue = new long(); break;
case DbType.UInt16 : this.parameterValue = new ushort(); break;
case DbType.UInt32 : this.parameterValue = new uint(); break;
case DbType.UInt64 : this.parameterValue = new long(); break;
//Date type
case DbType.Date :
case DbType.DateTime :
case DbType.Time :{
this.defaultValue = new DateTime();
this.parameterValue = new DateTime();
break;
}
//float type
case DbType.Decimal : this.defaultValue = new decimal(); break;
case DbType.Decimal : this.parameterValue = new decimal(); break;
case DbType.Currency :
case DbType.VarNumeric :
case DbType.Double : this.defaultValue = new double(); break;
case DbType.Single : this.defaultValue = new float(); break;
case DbType.Double : this.parameterValue = new double(); break;
case DbType.Single : this.parameterValue = new float(); break;
//user defined
case DbType.Object : this.defaultValue = new object(); break;
case DbType.Object : this.parameterValue = new object(); break;
//Guid
case DbType.Guid : this.defaultValue = new Guid(); break;
case DbType.Guid : this.parameterValue = new Guid(); break;
default : throw new ArgumentOutOfRangeException("value");
}
}
}
/// <summary>
/// When no value is entered, use this value
/// </summary>
public override object DefaultValue {
public object ParameterValue {
get {
return defaultValue;
return parameterValue;
}
set {
set{
SetValue (value.ToString());
}
}

31
src/AddIns/Misc/SharpReport/SharpReportCore/Collections/Collections.cs

@ -222,30 +222,15 @@ namespace SharpReportCore{ @@ -222,30 +222,15 @@ namespace SharpReportCore{
}
}
/*
/// <summary>
/// This class holds a COllection <see cref="RowItem"></see>
/// used in <see cref="TableItem"></see></summary>
public class RowItemCollection : List<RowItem> {
public event EventHandler<CollectionItemEventArgs<IItemRenderer>> Added;
public event EventHandler<CollectionItemEventArgs<IItemRenderer>> Removed;
public new void Add(IItemRenderer item){
base.Add(item);
this.OnAdded (item);
}
public new bool Remove(IItemRenderer item)
{
if (base.Remove (item)) {
this.OnRemoved(item);
return true;
public class SqlParametersCollection: List<SqlParameter>{
public SqlParameter Find (string parameterName) {
foreach (SqlParameter par in this){
if (String.Compare(par.ParameterName,parameterName)== 0){
return par;
}
}
return false;
return null;
}
}
*/
}

8
src/AddIns/Misc/SharpReport/SharpReportCore/DataManager/DataManager.cs

@ -52,13 +52,14 @@ namespace SharpReportCore { @@ -52,13 +52,14 @@ namespace SharpReportCore {
}
try {
this.connectionObject = connectionObject;
this.reportSettings = reportSettings;
CheckConnection (this.connectionObject);
CheckReportSettings(reportSettings);
CheckDataSource(this.FillDataSet().Tables[0]);
this.dataViewStrategy = new TableStrategy((DataTable)this.dataSource,
reportSettings);
this.dataViewStrategy.ListChanged += new EventHandler <ListChangedEventArgs> (NotifyListChanged);
// this.dataViewStrategy.GroupChanged += new EventHandler<GroupChangedEventArgs> (OnGroupChange);
}
@ -125,7 +126,7 @@ namespace SharpReportCore { @@ -125,7 +126,7 @@ namespace SharpReportCore {
void CheckReportSettings(ReportSettings settings) {
try {
if (settings.DataModel != GlobalEnums.PushPullModelEnum.PushData) {
SqlQueryChecker.Check(settings.CommandText);
SqlQueryChecker.Check(settings.CommandType,settings.CommandText);
}
} catch (IllegalQueryException) {
@ -208,7 +209,6 @@ namespace SharpReportCore { @@ -208,7 +209,6 @@ namespace SharpReportCore {
if (this.connection.State == ConnectionState.Closed) {
this.connection.Open();
}
OleDbCommand command = ((OleDbConnection)this.connection).CreateCommand();
command.CommandText = reportSettings.CommandText;
command.CommandType = reportSettings.CommandType;
@ -245,7 +245,7 @@ namespace SharpReportCore { @@ -245,7 +245,7 @@ namespace SharpReportCore {
if (rpPar.DataType != System.Data.DbType.Binary) {
oleDBPar = new OleDbParameter(rpPar.ParameterName,
rpPar.DataType);
oleDBPar.Value = rpPar.DefaultValue;
oleDBPar.Value = rpPar.ParameterValue;
} else {
oleDBPar = new OleDbParameter(rpPar.ParameterName,
System.Data.DbType.Binary);

16
src/AddIns/Misc/SharpReport/SharpReportCore/DataManager/SqlQueryChecker.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
*/
using System;
using System.Data;
using System.Globalization;
using System.Windows.Forms;
@ -15,16 +16,19 @@ namespace SharpReportCore{ @@ -15,16 +16,19 @@ namespace SharpReportCore{
/// <summary>
/// This Class checks for invalid SqlStatements
/// </summary>
internal class SqlQueryChecker{
public sealed class SqlQueryChecker{
private SqlQueryChecker () {
}
public static void Check (string queryString) {
if (!String.IsNullOrEmpty(queryString)) {
queryString = queryString.ToUpper(CultureInfo.CurrentCulture);
if (queryString.IndexOf("SELECT") < 0) {
throw new SharpReportCore.IllegalQueryException();
public static void Check (CommandType commandType,string queryString) {
if (commandType == CommandType.Text) {
if (!String.IsNullOrEmpty(queryString)) {
queryString = queryString.ToUpper(CultureInfo.CurrentCulture);
if (!queryString.StartsWith("SELECT")) {
throw new SharpReportCore.IllegalQueryException();
}
}
}
}

5
src/AddIns/Misc/SharpReport/SharpReportCore/Events/SharpReportParametersEventArgs.cs

@ -10,7 +10,6 @@ @@ -10,7 +10,6 @@
namespace SharpReportCore {
using System;
using System.Data;
/// <summary>
/// This Event is fired when SharpReport need Parameters to run a Query
@ -24,7 +23,7 @@ namespace SharpReportCore { @@ -24,7 +23,7 @@ namespace SharpReportCore {
public class SharpReportParametersEventArgs : System.EventArgs {
AbstractParametersCollection sqlParametersCollection;
SqlParametersCollection sqlParametersCollection;
string reportName;
public SharpReportParametersEventArgs () {
@ -34,7 +33,7 @@ namespace SharpReportCore { @@ -34,7 +33,7 @@ namespace SharpReportCore {
/// <summary>
/// The ParametersCollection
/// </summary>
public AbstractParametersCollection SqlParametersCollection {
public SqlParametersCollection SqlParametersCollection {
get {
return sqlParametersCollection;
}

1
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs

@ -73,6 +73,7 @@ namespace SharpReportCore { @@ -73,6 +73,7 @@ namespace SharpReportCore {
reportDocument.RenderPageEnd += new EventHandler<ReportPageEventArgs> (PrintPageEnd);
reportDocument.RenderReportEnd += new EventHandler<ReportPageEventArgs> (PrintReportFooter);
}
#region Event handling for SectionRendering
protected void AddSectionEvents () {

14
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs

@ -83,7 +83,6 @@ namespace SharpReportCore { @@ -83,7 +83,6 @@ namespace SharpReportCore {
private void DoPageEnd (ReportPageEventArgs rpea){
// System.Console.WriteLine("DoPageEnd");
this.CurrentSection.SectionOffset = base.Page.PageFooterRectangle.Location.Y;
base.RenderSection (rpea);
base.DoItems(rpea);
@ -143,8 +142,7 @@ namespace SharpReportCore { @@ -143,8 +142,7 @@ namespace SharpReportCore {
}
protected override void ReportBegin(object sender, PrintEventArgs pea) {
// System.Console.WriteLine("");
// System.Console.WriteLine("ReportBegin (BeginPrint)");
base.ReportBegin (sender,pea);
base.DataManager.ListChanged += new EventHandler<ListChangedEventArgs> (OnListChanged);
dataNavigator = base.DataManager.GetNavigator;
@ -157,18 +155,20 @@ namespace SharpReportCore { @@ -157,18 +155,20 @@ namespace SharpReportCore {
protected override void BodyStart(object sender, ReportPageEventArgs rpea) {
base.BodyStart (sender,rpea);
// this.currentPoint = new PointF (base.CurrentSection.Location.X,
// base.page.DetailStart.Y);
// System.Console.WriteLine("BodyStart with {0}",this.dataNavigator.Count);
if (this.dataNavigator.Count == 0){
this.ReportDocument.ReportHasData = false;
}
base.CurrentSection.SectionOffset = (int)this.page.DetailStart.Y + AbstractRenderer.Gap;
// base.AddSectionEvents();
}
protected override void PrintDetail(object sender, ReportPageEventArgs rpea){
Rectangle sectionRect;
bool firstOnPage = true;
// System.Console.WriteLine("PrintDetail");
base.PrintDetail(sender, rpea);
// no loop if there is no data

108
src/AddIns/Misc/SharpReport/SharpReportCore/Printing/ReportDocument.cs

@ -39,9 +39,9 @@ namespace SharpReportCore { @@ -39,9 +39,9 @@ namespace SharpReportCore {
int pageNumber;
bool detailsDone;
bool reportHasData;
public ReportDocument():base() {
this.reportHasData = true;
}
@ -83,24 +83,28 @@ namespace SharpReportCore { @@ -83,24 +83,28 @@ namespace SharpReportCore {
if (BodyStart != null) {
BodyStart (this,pea);
}
//
if (this.RenderDetails != null) {
this.RenderDetails(this,pea);
}
System.Console.WriteLine("ReportDocumnet:'NoData' = {0}",this.reportHasData);
if (pea.ForceNewPage) {
if (RenderPageEnd != null) {
RenderPageEnd (this,pea);
if (this.reportHasData == true) {
if (this.RenderDetails != null) {
this.RenderDetails(this,pea);
}
if (pea.ForceNewPage) {
if (RenderPageEnd != null) {
RenderPageEnd (this,pea);
return;
}
pea.ForceNewPage = false;
return;
}
pea.ForceNewPage = false;
return;
if (BodyEnd != null) {
BodyEnd (this,pea);
}
}
if (BodyEnd != null) {
BodyEnd (this,pea);
}
// ReportFooter
if (this.detailsDone) {
@ -123,74 +127,6 @@ namespace SharpReportCore { @@ -123,74 +127,6 @@ namespace SharpReportCore {
}
/*
protected override void OnPrintPage(PrintPageEventArgs e){
pageNumber ++;
base.OnPrintPage(e);
ReportPageEventArgs pea = new ReportPageEventArgs (e,pageNumber,
false,Point.Empty);
// ReportHeader only on first page
if (this.pageNumber == 1) {
if (this.RenderReportHeader != null) {
this.RenderReportHeader(this,pea);
}
}
// allway draw PageHeader
if (this.RenderPageHeader != null) {
this.RenderPageHeader (this,pea);
}
// Details
if (!this.detailsDone) {
if (BodyStart != null) {
BodyStart (this,pea);
}
if (this.RenderDetails != null) {
this.RenderDetails(this,pea);
}
}
if (pea.ForceNewPage) {
if (RenderPageEnd != null) {
RenderPageEnd (this,pea);
return;
}
pea.ForceNewPage = false;
return;
}
// ReportFooter
if (this.detailsDone) {
if (BodyEnd != null) {
BodyEnd (this,pea);
this.RenderReportEnd(this,pea);
if (pea.ForceNewPage) {
e.HasMorePages = true;
pea.ForceNewPage = false;
}
}
}
//PageFooter
if (RenderPageEnd != null) {
RenderPageEnd (this,pea);
e.HasMorePages = false;
return;
}
}
*/
protected override void OnEndPrint(PrintEventArgs e){
base.OnEndPrint(e);
}
@ -212,6 +148,12 @@ namespace SharpReportCore { @@ -212,6 +148,12 @@ namespace SharpReportCore {
}
}
public bool ReportHasData {
set {
reportHasData = value;
this.detailsDone = true;
}
}
#endregion
}

6
src/AddIns/Misc/SharpReport/SharpReportCore/ReportParameters.cs

@ -22,7 +22,7 @@ namespace SharpReportCore { @@ -22,7 +22,7 @@ namespace SharpReportCore {
public class ReportParameters : object {
private ConnectionObject connectionObject;
private AbstractParametersCollection sqlParameters;
private SqlParametersCollection sqlParameters;
private ColumnCollection sortColumnCollection;
@ -44,10 +44,10 @@ namespace SharpReportCore { @@ -44,10 +44,10 @@ namespace SharpReportCore {
}
}
public AbstractParametersCollection SqlParameters {
public SqlParametersCollection SqlParameters {
get {
if (this.sqlParameters == null) {
this.sqlParameters = new AbstractParametersCollection();
this.sqlParameters = new SqlParametersCollection();
}
return sqlParameters;
}

10
src/AddIns/Misc/SharpReport/SharpReportCore/ReportSettings.cs

@ -51,7 +51,7 @@ namespace SharpReportCore{ @@ -51,7 +51,7 @@ namespace SharpReportCore{
private GlobalEnums.ReportTypeEnum reportType;
private GlobalEnums.PushPullModelEnum dataModel;
private AbstractParametersCollection reportParametersCollection;
private SqlParametersCollection reportParametersCollection;
private ColumnCollection availableFields;
private ColumnCollection groupingsCollection;
private ColumnCollection sortingCollection;
@ -80,7 +80,7 @@ namespace SharpReportCore{ @@ -80,7 +80,7 @@ namespace SharpReportCore{
this.availableFields = new ColumnCollection();
sortingCollection = new ColumnCollection();
groupingsCollection = new ColumnCollection();
reportParametersCollection = new AbstractParametersCollection();
reportParametersCollection = new SqlParametersCollection();
this.reportType = GlobalEnums.ReportTypeEnum.FormSheet;
this.dataModel = GlobalEnums.PushPullModelEnum.FormSheet;
}
@ -548,17 +548,17 @@ namespace SharpReportCore{ @@ -548,17 +548,17 @@ namespace SharpReportCore{
[Browsable(false)]
[XmlIgnoreAttribute]
public AbstractParametersCollection SqlParametersCollection
public SqlParametersCollection SqlParametersCollection
{
get{
if (reportParametersCollection == null) {
reportParametersCollection = new AbstractParametersCollection();
reportParametersCollection = new SqlParametersCollection();
}
return reportParametersCollection;
}
set {
if (reportParametersCollection == null) {
reportParametersCollection = new AbstractParametersCollection();
reportParametersCollection = new SqlParametersCollection();
}
if (reportParametersCollection != value) {
reportParametersCollection = value;

1
src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportEngine.cs

@ -20,7 +20,6 @@ @@ -20,7 +20,6 @@
// Peter Forstmeier (Peter.Forstmeier@t-online.de)
using System;
using System.ComponentModel;
using System.Collections;
using System.Data;
using System.Drawing.Printing;

23
src/AddIns/Misc/SharpReport/SharpReportWizard/GeneratorCommands.cs

@ -13,11 +13,8 @@ @@ -13,11 +13,8 @@
/// </summary>
using System;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using SharpReport;
using SharpReportCore;
namespace ReportGenerator{
@ -84,27 +81,7 @@ namespace ReportGenerator{ @@ -84,27 +81,7 @@ namespace ReportGenerator{
}
}
/*
public class WriteXsdComplete : AbstractMenuCommand {
public override void Run() {
ResultPanel resultPanel = base.Owner as ResultPanel;
if (resultPanel != null) {
resultPanel.SaveXsdFile (false);
}
}
}
public class WriteXsdSchema : AbstractMenuCommand {
public override void Run() {
ResultPanel resultPanel = base.Owner as ResultPanel;
if (resultPanel != null) {
resultPanel.SaveXsdFile (true);
}
}
}
*/
}
public class WriteXsdComplete : AbstractMenuCommand {
public override void Run() {

5
src/AddIns/Misc/SharpReport/SharpReportWizard/Generators/GeneratePullDataReport.cs

@ -49,11 +49,10 @@ namespace ReportGenerator { @@ -49,11 +49,10 @@ namespace ReportGenerator {
base.ReportModel.ReportSettings.ReportType = GlobalEnums.ReportTypeEnum.DataReport;
base.ReportModel.ReportSettings.DataModel = GlobalEnums.PushPullModelEnum.PullData;
this.ReportModel.ReportSettings.AvailableFieldsCollection =
(ColumnCollection)base.Customizer.Get ("ColumnCollection");;
base.GenerateReport();
base.GenerateReport();
base.HeaderColumnsFromReportItems (base.ReportModel.PageHeader);
base.BuildDataSection (base.ReportModel.DetailSection);

55
src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.cs

@ -9,21 +9,12 @@ @@ -9,21 +9,12 @@
//------------------------------------------------------------------------------
using System;
using System.Data;
using System.Drawing;
using System.ComponentModel;
using System.Globalization;
using System.Data;
using System.Data.OleDb;
using SharpReport;
using SharpReportCore;
using SharpQuery;
using SharpQuery.Collections;
using SharpQuery.SchemaClass;
using SharpReportCore;
/// <summary>
/// This class creates settings for a report
/// </summary>
@ -31,7 +22,7 @@ using SharpQuery.SchemaClass; @@ -31,7 +22,7 @@ using SharpQuery.SchemaClass;
/// created by - Forstmeier Peter
/// created on - 28.01.2005 10:31:01
/// </remarks>
using System.Windows.Forms;
namespace ReportGenerator {
public class ReportGenerator : object,IDisposable {
@ -57,8 +48,8 @@ namespace ReportGenerator { @@ -57,8 +48,8 @@ namespace ReportGenerator {
private ReportItemCollection reportItemCollection;
private ColumnCollection columnCollection;
private SharpQuerySchemaClassCollection queryParameters;
public ReportGenerator() {
private SqlParametersCollection queryParameters;
public ReportGenerator() {
}
public ReportModel FillReportModel (ReportModel model) {
@ -75,37 +66,10 @@ namespace ReportGenerator { @@ -75,37 +66,10 @@ namespace ReportGenerator {
model.ReportSettings.CommandText = this.sqlString;
model.ReportSettings.CommandType = this.commandType;
model.ReportSettings.DataModel = this.dataModel;
model.ReportSettings.SqlParametersCollection = this.queryParameters;
return model;
}
/// <summary>
/// This methode build the ReportParameterCollection we use in ReportSettings
/// from the queryParameters
/// </summary>
/// <returns></returns>
public AbstractParametersCollection BuildSqlParameterList(){
if (this.queryParameters != null && this.queryParameters.Count > 0) {
AbstractParametersCollection paramCol = new AbstractParametersCollection();
SqlParameter reportPar;
SharpQueryParameter sqPar = null;
for (int i = 0;i < this.queryParameters.Count ;i++ ) {
sqPar = (SharpQueryParameter) this.queryParameters[i];
reportPar = new SqlParameter (sqPar.Name,
sqPar.DataType,
null,
String.Empty,
sqPar.Type);
reportPar.DefaultValue = sqPar.Value;
paramCol.Add(reportPar);
}
return paramCol;
}
return null;
}
#region BaseSettingsPanel property's
@ -200,13 +164,12 @@ namespace ReportGenerator { @@ -200,13 +164,12 @@ namespace ReportGenerator {
}
public SharpQuerySchemaClassCollection Parameters {
public SqlParametersCollection Parameters {
get {
return queryParameters;
}
set {
queryParameters = value;
this.queryParameters = value;
}
}

1
src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj

@ -61,6 +61,7 @@ @@ -61,6 +61,7 @@
<Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="SqlParameterConverter.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Generators" />

72
src/AddIns/Misc/SharpReport/SharpReportWizard/SqlParameterConverter.cs

@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
/*
* Created by SharpDevelop.
* User: Forstmeier Helmut
* Date: 09.08.2006
* Time: 22:13
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Data.OleDb;
using System.ComponentModel;
using SharpQuery.SchemaClass;
using SharpQuery.Collections;
using SharpReportCore;
namespace ReportGenerator
{
/// <summary>
/// Description of SqlTypeConverter.
/// </summary>
public class SqlParameterConverter:TypeConverter
{
public SqlParameterConverter()
{
}
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
if (sourceType == typeof(SharpQuerySchemaClassCollection)) {
return true;
}
return base.CanConvertFrom(context, sourceType);
}
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
{
return base.ConvertFrom(context, culture, value);
}
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
{
if (destinationType == typeof(SqlParametersCollection)) {
return true;
}
return base.CanConvertFrom(context, destinationType);
}
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType){
SharpQuerySchemaClassCollection tmp= value as SharpQuerySchemaClassCollection;
if (destinationType == typeof (SqlParametersCollection)) {
SqlParametersCollection a = new SqlParametersCollection();
foreach (SharpQueryParameter par in tmp){
SqlParameter reportPar = new SqlParameter();
reportPar = new SqlParameter (par.Name,
par.DataType,
null,
String.Empty,
par.Type);
reportPar.ParameterValue = par.Value;
a.Add(reportPar);
}
return a;
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
}

195
src/AddIns/Misc/SharpReport/SharpReportWizard/WizardPanels/ResultPanel.cs

@ -45,8 +45,7 @@ namespace ReportGenerator{ @@ -45,8 +45,7 @@ namespace ReportGenerator{
private ReportGenerator generator;
private Properties customizer;
private ReportModel model;
private SharpQuerySchemaClassCollection parametersClass;
private DataSet resultDataSet;
private ReportItemCollection colDetail;
private ColumnCollection abstractColumns;
@ -65,69 +64,36 @@ namespace ReportGenerator{ @@ -65,69 +64,36 @@ namespace ReportGenerator{
private DataSet FillGrid() {
this.grdQuery.DataSource = null;
this.txtSqlString.Text = null;
try {
SqlQueryChecker.Check(model.ReportSettings.CommandType,
model.ReportSettings.CommandText);
} catch (IllegalQueryException) {
throw;
}
DataSet dataSet = new DataSet();
dataSet.Locale = CultureInfo.CurrentCulture;
this.txtSqlString.Text = model.ReportSettings.CommandText;
if (model.ReportSettings.CommandType == CommandType.StoredProcedure){
if (generator.SharpQueryProcedure == null) {
throw new NullReferenceException("ResultPanel:FillGrid");
}
System.Console.WriteLine("\tStoredProcedure {0}",generator.SharpQueryProcedure.Name);
SharpQueryProcedure proc = generator.SharpQueryProcedure;
SharpQueryProcedure procedure = generator.SharpQueryProcedure;
// we have some Parameters, to get them we use the Dialogfrom SharpQuery
if (proc.GetSchemaParameters() != null && proc.GetSchemaParameters().Count > 0) {
SharpQuerySchemaClassCollection tmp = proc.GetSchemaParameters();
SharpQueryParameterCollection parameters = null;
if (tmp.Count == 1 && tmp[0] is SharpQueryNotSupported) {
parameters = new SharpQueryParameterCollection();
}
else{
parameters = new SharpQueryParameterCollection();
foreach (SharpQueryParameter par in tmp){
parameters.Add(par);
}
}
// SharpQueryParameterCollection parameters = new SharpQueryParameterCollection(tmp);
System.Console.WriteLine("\t\t # of params {0}",parameters.Count);
if (parameters != null && parameters.Count > 0){
using (SQLParameterInput inputform = new SQLParameterInput(parameters)){
if ( inputform.ShowDialog() != DialogResult.OK ){
parametersClass = null;
}else{
parametersClass = parameters.ToBaseSchemaCollection();
if (parametersClass != null) {
dataSet = (DataSet) proc.Execute(0,parametersClass);
generator.Parameters = parametersClass;
}
}
}
}
if (procedure.GetSchemaParameters() != null && procedure.GetSchemaParameters().Count > 0) {
// from here
dataSet = ExecuteStoredProcWithParameters (procedure);
} else {
System.Console.WriteLine("\t\t No params");
try {
// Stored Proc without Parameters
dataSet = (DataSet) proc.Execute(0,proc.GetSchemaParameters());
} catch (Exception) {
throw;
}
dataSet = ExecuteStoredProc (procedure);
}
}
// from here we create from an SqlString like "Select...."
if (model.ReportSettings.CommandType == CommandType.Text){
System.Console.WriteLine("\tCommandText");
try {
generator.Parameters = null;
this.txtSqlString.Text = model.ReportSettings.CommandText;
dataSet = BuildFromSqlString(model.ReportSettings);
} catch (OleDbException) {
throw;
}
@ -136,38 +102,134 @@ namespace ReportGenerator{ @@ -136,38 +102,134 @@ namespace ReportGenerator{
}
}
CreateCollections (dataSet);
return dataSet;
}
private void CreateCollections (DataSet dataSet) {
using (AutoReport auto = new AutoReport()){
abstractColumns = auto.AbstractColumnsFromDataSet (dataSet);
colDetail = auto.DataItemsFromSchema(this.model,dataSet);
private DataSet CreateDataSet() {
DataSet dataSet = new DataSet();
dataSet.Locale = CultureInfo.CurrentCulture;
return dataSet;
}
private OleDbCommand BuildCommand () {
ConnectionObject con = new ConnectionObject(this.model.ReportSettings.ConnectionString);
OleDbCommand command = null;
if (con != null) {
command = ((OleDbConnection)con.Connection).CreateCommand();
command.CommandText = this.model.ReportSettings.CommandText;
command.CommandType = this.model.ReportSettings.CommandType;
return command;
}
throw new MissingDataSourceException();
}
private DataSet ExecuteStoredProc (SharpQueryProcedure procedure) {
DataSet dataSet = this.CreateDataSet();
OleDbCommand command = null;
try {
command = this.BuildCommand();
OleDbDataAdapter adapter = new OleDbDataAdapter(command);
adapter.Fill(dataSet);
} catch (Exception) {
throw;
}finally {
if (command.Connection.State == ConnectionState.Open) {
command.Connection.Close();
}
}
return dataSet;
}
private static DataSet BuildFromSqlString(ReportSettings settings) {
OLEDBConnectionWrapper con = null;
DataSet ds = null;
if (settings.CommandText.IndexOf("?") > 0) {
throw new NotSupportedException ("Parameters in SqlText are not supportet");
private DataSet ExecuteStoredProcWithParameters (SharpQueryProcedure procedure) {
SharpQuerySchemaClassCollection tmp = procedure.GetSchemaParameters();
SqlParameterConverter converter = new SqlParameterConverter();
SqlParametersCollection sqlParamsCollection = new SqlParametersCollection();
if (converter.CanConvertFrom(typeof(SharpQuerySchemaClassCollection))) {
if (converter.CanConvertTo(null,typeof(SqlParametersCollection))){
sqlParamsCollection = (SqlParametersCollection)converter.ConvertTo(null,
CultureInfo.InstalledUICulture,
tmp,
typeof(SqlParametersCollection));
}
}
try {
con = new OLEDBConnectionWrapper(settings.ConnectionString);
con.Open();
if (con.IsOpen) {
ds = (DataSet)con.ExecuteSQL(settings.CommandText,0);
return ds;
if (sqlParamsCollection.Count > 0){
using (ParameterDialog inputform = new ParameterDialog(sqlParamsCollection)) {
if ( inputform.ShowDialog() != DialogResult.OK ){
return null;
}else{
DataSet dataSet = this.CreateDataSet();
OleDbCommand command = this.BuildCommand();
try {
OleDbDataAdapter adapter = new OleDbDataAdapter(command);
OleDbParameter oleDBPar = null;
foreach (SqlParameter rpPar in sqlParamsCollection){
if (rpPar.DataType != System.Data.DbType.Binary) {
oleDBPar = new OleDbParameter(rpPar.ParameterName,
rpPar.DataType);
oleDBPar.Value = rpPar.ParameterValue;
} else {
oleDBPar = new OleDbParameter(rpPar.ParameterName,
System.Data.DbType.Binary);
}
oleDBPar.Direction = rpPar.ParameterDirection;
command.Parameters.Add(oleDBPar);
}
generator.Parameters = sqlParamsCollection;
adapter.Fill (dataSet);
return dataSet;
} catch (Exception) {
throw;
} finally {
if (command.Connection.State == ConnectionState.Open) {
command.Connection.Close();
}
}
}
}
}
return null;
}
private DataSet BuildFromSqlString (ReportSettings settings) {
DataSet dataSet = this.CreateDataSet();
OleDbCommand command = this.BuildCommand();
try {
OleDbDataAdapter adapter = new OleDbDataAdapter(command);
adapter.Fill(dataSet);
return dataSet;
} catch (Exception) {
throw;
} finally {
con.Close();
if (command.Connection.State == ConnectionState.Open) {
command.Connection.Close();
}
}
}
private void CreateCollections (DataSet dataSet) {
using (AutoReport auto = new AutoReport()){
abstractColumns = auto.AbstractColumnsFromDataSet (dataSet);
colDetail = auto.DataItemsFromSchema(this.model,dataSet);
}
return null;
}
#endregion
#region Create a *.Xsd File
@ -222,10 +284,11 @@ namespace ReportGenerator{ @@ -222,10 +284,11 @@ namespace ReportGenerator{
this.resultDataSet.Locale = CultureInfo.InvariantCulture;
this.model = generator.FillReportModel(new ReportModel());
this.resultDataSet = FillGrid();
if (this.resultDataSet != null) {
this.grdQuery.DataSource = this.resultDataSet.Tables[0];
}
base.EnableNext = true;
base.EnableFinish = true;
} catch (Exception e) {

Loading…
Cancel
Save