From 0bdc450f18335af58e074b3090ef9bfbb6841cf8 Mon Sep 17 00:00:00 2001 From: Peter Forstmeier Date: Tue, 19 Sep 2006 08:25:21 +0000 Subject: [PATCH] Refactoring to use code from SharpReportCore\Printing in Exporters git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1826 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../SharpReport/SharpReport.csproj | 2 +- .../SharpReportAddin/SharpReportAddin.csproj | 2 +- .../Printing/AbstractRenderer.cs | 215 ++++-------------- .../Printing/MeasurementService.cs | 105 +++++++++ .../Printing/RenderDataReport.cs | 2 +- .../SharpReportCore/Printing/SectionBounds.cs | 91 +++++++- .../SharpReportCore/SharpReportCore.csproj | 1 + .../SharpReportCore/SharpReportEngine.cs | 78 +++++-- .../SharpReportWizard/ReportGenerator.csproj | 2 +- 9 files changed, 297 insertions(+), 201 deletions(-) create mode 100644 src/AddIns/Misc/SharpReport/SharpReportCore/Printing/MeasurementService.cs diff --git a/src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj b/src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj index c615312387..242590c5db 100644 --- a/src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj +++ b/src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj @@ -19,7 +19,7 @@ False - DEBUG%3bTRACE + DEBUG;TRACE true Full True diff --git a/src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportAddin.csproj b/src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportAddin.csproj index c29e3a1706..3bc1c85fc2 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportAddin.csproj +++ b/src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportAddin.csproj @@ -19,7 +19,7 @@ False - DEBUG%3bTRACE + DEBUG;TRACE true Full True diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs index 3f3656f7f5..c1dee1ce90 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/AbstractRenderer.cs @@ -216,87 +216,14 @@ namespace SharpReportCore { */ #endregion - protected Rectangle MeasureReportHeader (PrintPageEventArgs ppea) { - if (ppea == null) { - throw new ArgumentNullException("ppea"); - } - - Rectangle rect = new Rectangle(); - if (this.reportDocument.PageNumber == 1) { - - sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportHeader, - CultureInfo.InvariantCulture); - - if (this.CurrentSection.Items.Count > 0) { - this.CurrentSection.SectionOffset = reportSettings.DefaultMargins.Top; - AbstractRenderer.FitSectionToItems (this.CurrentSection,ppea); - - rect = new Rectangle(reportSettings.DefaultMargins.Left, - reportSettings.DefaultMargins.Top, - ppea.MarginBounds.Width, - this.CurrentSection.Size.Height + Gap); - } else { - - rect = new Rectangle (reportSettings.DefaultMargins.Left, - reportSettings.DefaultMargins.Top, - ppea.MarginBounds.Width, - 0); - } - - } - return rect; - } /// /// Section start at this PointF - /// ReportPageEventArgs - private Rectangle MeasurePageHeader (Rectangle startAfter,PrintPageEventArgs rpea) { - if (rpea == null) { - throw new ArgumentNullException("rpea"); - } - - sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageHeader, - CultureInfo.InvariantCulture); + /// Graphics - if (this.reportDocument.PageNumber == 1){ - this.CurrentSection.SectionOffset = (int)startAfter.Top + Gap; - } else { - this.CurrentSection.SectionOffset = reportSettings.DefaultMargins.Top; - } - - AbstractRenderer.FitSectionToItems (this.CurrentSection,rpea); - return new Rectangle (startAfter.Left, - startAfter.Bottom + Gap, - rpea.MarginBounds.Width, - this.CurrentSection.Size.Height + Gap); - } - private Rectangle MeasurePageFooter (PrintPageEventArgs e) { - sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageFooter, - CultureInfo.InvariantCulture); - this.CurrentSection.SectionOffset = reportSettings.PageSettings.Bounds.Height - reportSettings.DefaultMargins.Top - reportSettings.DefaultMargins.Bottom; - AbstractRenderer.FitSectionToItems (this.CurrentSection,e); - return new Rectangle(reportSettings.DefaultMargins.Left, - this.CurrentSection.SectionOffset, - e.MarginBounds.Width, - this.CurrentSection.Size.Height); - - - } - - - private Rectangle MeasureReportFooter (PrintPageEventArgs ppea) { - sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportFooter, - CultureInfo.InvariantCulture); - AbstractRenderer.FitSectionToItems (this.CurrentSection,ppea); - return new Rectangle (reportSettings.DefaultMargins.Left, - this.CurrentSection.SectionOffset, - ppea.MarginBounds.Width, - this.CurrentSection.Size.Height); - } - protected bool IsRoomForFooter(Point loc) { Rectangle r = new Rectangle( this.sectionBounds.ReportFooterRectangle.Left, loc.Y, @@ -333,6 +260,7 @@ namespace SharpReportCore { // } item.SectionOffset = this.CurrentSection.SectionOffset; + item.Render(rpea); drawPoint.Y = this.CurrentSection.SectionOffset + this.CurrentSection.Size.Height; rpea.LocationAfterDraw = new Point (rpea.LocationAfterDraw.X, @@ -349,126 +277,63 @@ namespace SharpReportCore { return drawPoint.Y; } - #region privates - protected static void FitSectionToItems (BaseSection section,PrintPageEventArgs rpea){ - if (section == null) { - throw new ArgumentNullException("section"); - } - if (rpea == null) { - throw new ArgumentNullException("rpea"); - } - Rectangle orgRect = new Rectangle (rpea.MarginBounds.Left, - section.SectionOffset, - rpea.MarginBounds.Width, - section.Size.Height); - - if ((section.CanGrow == true)||(section.CanShrink == true)) { - AbstractRenderer.AdjustSection (section,rpea); - } else { - AbstractRenderer.AdjustItems (section,rpea); - - } - } - private static void AdjustItems (BaseSection section,PrintPageEventArgs e){ - - int toFit = section.Size.Height; - foreach (BaseReportItem rItem in section.Items) { - if (!AbstractRenderer.CheckItemInSection (section,rItem,e)){ - - rItem.Size = new Size (rItem.Size.Width, - toFit - rItem.Location.Y); - - } - } - } - - private static void AdjustSection (BaseSection section,PrintPageEventArgs e){ - - foreach (BaseReportItem rItem in section.Items) { - if (!AbstractRenderer.CheckItemInSection (section,rItem,e)){ - - SizeF size = AbstractRenderer.MeasureReportItem (rItem,e); - - section.Size = new Size (section.Size.Width, - Convert.ToInt32(rItem.Location.Y + size.Height)); - - } - } - } + #region PrintDocument Events - private static bool CheckItemInSection (BaseSection section,BaseReportItem item ,PrintPageEventArgs e) { - Rectangle secRect = new Rectangle (0,0,section.Size.Width,section.Size.Height); - SizeF size = AbstractRenderer.MeasureReportItem(item,e); - Rectangle itemRect = new Rectangle (item.Location.X, - item.Location.Y, - (int)size.Width, - (int)size.Height); - if (secRect.Contains(itemRect)) { - return true; - } - return false; - } - - private static SizeF MeasureReportItem(IItemRenderer item, - PrintPageEventArgs e) { - SizeF sizeF = new SizeF (); - BaseTextItem myItem = item as BaseTextItem; - if (myItem != null) { - string str = String.Empty; + private void CalculatePageBounds (Graphics graphics) { + Rectangle rectangle; + sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportHeader, + CultureInfo.InvariantCulture); + if (this.reportDocument.PageNumber == 1) { + + rectangle = sectionBounds.MeasureReportHeader(this.CurrentSection,graphics); - if (item is BaseTextItem) { - BaseTextItem it = item as BaseTextItem; - str = it.Text; - } else if(item is BaseDataItem) { - BaseDataItem it = item as BaseDataItem; - str = it.DbValue; - } - sizeF = e.Graphics.MeasureString(str, - myItem.Font, - myItem.Size.Width, - myItem.StringFormat); } else { - sizeF = new SizeF (item.Size.Width,item.Size.Height); + rectangle = new Rectangle (reportSettings.DefaultMargins.Left, + reportSettings.DefaultMargins.Top, + this.sectionBounds.MarginBounds.Width, + 0); } - return sizeF; + this.CurrentSection.SectionOffset = this.reportSettings.DefaultMargins.Top; + sectionBounds.ReportHeaderRectangle = rectangle; + + //PageHeader + sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageHeader, + CultureInfo.InvariantCulture); + + this.sectionBounds.MeasurePageHeader(this.CurrentSection, + rectangle,graphics,reportDocument.PageNumber); + + //PageFooter + sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportPageFooter, + CultureInfo.InvariantCulture); + + this.sectionBounds.MeasurePageFooter (this.CurrentSection,graphics); + + //ReportFooter + sectionInUse = Convert.ToInt16(GlobalEnums.enmSection.ReportFooter, + CultureInfo.InvariantCulture); + sectionBounds.ReportFooterRectangle = this.sectionBounds.MeasureReportFooter(this.CurrentSection, + graphics); } - #endregion - - #region PrintDocument Events - private void ReportPageStart (object sender, PrintPageEventArgs e) { + private void ReportPageStart (object sender, PrintPageEventArgs ppea) { if (this.sectionBounds == null) { throw new ArgumentException("page"); } - - Rectangle r1; - - if (this.reportDocument.PageNumber == 1) { - r1 = this.MeasureReportHeader(e); - sectionBounds.ReportHeaderRectangle = r1; - } else { - r1 = new Rectangle (reportSettings.DefaultMargins.Left, - reportSettings.DefaultMargins.Top, - e.MarginBounds.Width, - 0); - } - sectionBounds.ReportHeaderRectangle = r1; - sectionBounds.PageHeaderRectangle = this.MeasurePageHeader(r1,e); - sectionBounds.PageFooterRectangle = this.MeasurePageFooter (e); - sectionBounds.ReportFooterRectangle = this.MeasureReportFooter(e); + this.CalculatePageBounds (ppea.Graphics); } protected virtual void ReportQueryPage (object sender,QueryPageSettingsEventArgs qpea) { qpea.PageSettings.Margins = reportSettings.DefaultMargins; - if (this.reportDocument.PageNumber == 1) { - sectionBounds = new SectionBounds (true); + if (this.reportDocument.PageNumber == 0) { + sectionBounds = new SectionBounds (qpea.PageSettings,true,AbstractRenderer.Gap); } else { - sectionBounds = new SectionBounds (false); + sectionBounds = new SectionBounds (qpea.PageSettings,false,AbstractRenderer.Gap); } } diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/MeasurementService.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/MeasurementService.cs new file mode 100644 index 0000000000..05b456e413 --- /dev/null +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/MeasurementService.cs @@ -0,0 +1,105 @@ +/* + * Created by SharpDevelop. + * User: Forstmeier Helmut + * Date: 17.09.2006 + * Time: 16:28 + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ + +using System; +using System.Drawing; + +namespace SharpReportCore +{ + /// + /// Description of MeasurementService. + /// + internal class MeasurementService + { + + + internal static void FitSectionToItems (BaseSection section,Graphics graphics){ + if (section == null) { + throw new ArgumentNullException("section"); + } + if (graphics == null) { + throw new ArgumentNullException("graphics"); + } + + + if ((section.CanGrow == true)||(section.CanShrink == true)) { + MeasurementService.AdjustSection (section,graphics); + } else { + MeasurementService.AdjustItems (section,graphics); + + } + } + + + public static void AdjustSection (BaseSection section,Graphics g){ + foreach (BaseReportItem rItem in section.Items) { + if (!MeasurementService.CheckItemInSection (section,rItem,g)){ + SizeF size = MeasurementService.MeasureReportItem (rItem,g); + section.Size = new Size (section.Size.Width, + Convert.ToInt32(rItem.Location.Y + size.Height)); + + } + } + } + + public static void AdjustItems (BaseSection section,Graphics g){ + + int toFit = section.Size.Height; + foreach (BaseReportItem rItem in section.Items) { + if (!MeasurementService.CheckItemInSection (section,rItem,g)){ + + rItem.Size = new Size (rItem.Size.Width, + toFit - rItem.Location.Y); + + } + } + } + + + public static bool CheckItemInSection (BaseSection section,BaseReportItem item ,Graphics g) { + Rectangle secRect = new Rectangle (0,0,section.Size.Width,section.Size.Height); + + SizeF size = MeasurementService.MeasureReportItem(item,g); + Rectangle itemRect = new Rectangle (item.Location.X, + item.Location.Y, + (int)size.Width, + (int)size.Height); + if (secRect.Contains(itemRect)) { + return true; + } + return false; + } + + public static SizeF MeasureReportItem(IItemRenderer item, + Graphics g) { + SizeF sizeF = new SizeF (); + BaseTextItem myItem = item as BaseTextItem; + if (myItem != null) { + string str = String.Empty; + + if (item is BaseTextItem) { + BaseTextItem it = item as BaseTextItem; + str = it.Text; + } else if(item is BaseDataItem) { + BaseDataItem it = item as BaseDataItem; + str = it.DbValue; + } + + sizeF = g.MeasureString(str, + myItem.Font, + myItem.Size.Width, + myItem.StringFormat); + } else { + sizeF = new SizeF (item.Size.Width,item.Size.Height); + } + + return sizeF; + } + } +} diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs index 53cf7a8033..96672206bc 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/RenderDataReport.cs @@ -192,7 +192,7 @@ namespace SharpReportCore { } - AbstractRenderer.FitSectionToItems (base.CurrentSection,rpea.PrintPageEventArgs); + MeasurementService.FitSectionToItems (base.CurrentSection,rpea.PrintPageEventArgs.Graphics); sectionRect = new Rectangle (rpea.PrintPageEventArgs.MarginBounds.Left, base.CurrentSection.SectionOffset, diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/SectionBounds.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/SectionBounds.cs index 90aa5cca71..288a10c17e 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/SectionBounds.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/Printing/SectionBounds.cs @@ -9,6 +9,7 @@ using System; using System.Drawing; +using System.Drawing.Printing; namespace SharpReportCore{ /// @@ -22,12 +23,97 @@ namespace SharpReportCore{ Rectangle reportFooterRectangle; bool firstpage; + int gap; - public SectionBounds(bool firstPage){ - this.firstpage = firstPage; + PageSettings pageSettings; + + public SectionBounds(PageSettings pageSettings,bool firstpage,int gap){ + this.firstpage = firstpage; + this.pageSettings = pageSettings; + this.gap = gap; + } + + public Rectangle MeasureReportHeader (BaseSection section,Graphics graphics) { + if (section == null) { + throw new ArgumentNullException("section"); + } + + if (graphics == null) { + throw new ArgumentNullException("graphics"); + } + + if (this.gap == 0) { + gap = 1; + } + + Point top = new Point(this.pageSettings.Margins.Left,this.pageSettings.Margins.Top); + Size size = Size.Empty; + + if (section.Items.Count > 0) { + section.SectionOffset = this.pageSettings.Bounds.Top; + MeasurementService.FitSectionToItems (section,graphics); + size = new Size(this.MarginBounds.Width,section.Size.Height + gap); + + } else { + size = new Size(this.MarginBounds.Width,0); + } + return new Rectangle(top,size); + } + + + public void MeasurePageHeader (BaseSection section,Rectangle startAfter,Graphics graphics,int pageNr) { + + if (graphics == null) { + throw new ArgumentNullException("graphics"); + } + + if (pageNr == 1){ + section.SectionOffset = (int)startAfter.Top + this.gap; + } else { + section.SectionOffset = this.pageSettings.Margins.Top; + } + + MeasurementService.FitSectionToItems (section,graphics); + this.pageHeaderRectangle = new Rectangle (startAfter.Left, + startAfter.Bottom + this.gap, + this.MarginBounds.Width, + section.Size.Height + this.gap); + + } + + + public void MeasurePageFooter (BaseSection section,Graphics graphics) { + + section.SectionOffset = this.pageSettings.Bounds.Height - this.pageSettings.Margins.Top - this.pageSettings.Margins.Bottom; + MeasurementService.FitSectionToItems (section,graphics); + this.pageFooterRectangle = new Rectangle(this.pageSettings.Margins.Left, + section.SectionOffset, + this.MarginBounds.Width, + section.Size.Height); } + public Rectangle MeasureReportFooter (BaseSection section,Graphics graphics) { + + MeasurementService.FitSectionToItems (section,graphics); + return new Rectangle (this.pageSettings.Margins.Left, + section.SectionOffset, + this.MarginBounds.Width, + section.Size.Height); + } + + #region Properties + + public Rectangle MarginBounds { + get { + Rectangle r = new Rectangle(this.pageSettings.Margins.Left, + this.pageSettings.Margins.Top, + this.pageSettings.Bounds.Width - this.pageSettings.Margins.Left - this.pageSettings.Margins.Right, + this.pageSettings.Bounds.Height - this.pageSettings.Margins.Top - this.pageSettings.Margins.Bottom); + return r; + } + } + public Rectangle ReportHeaderRectangle { get { return reportHeaderRectangle; @@ -106,5 +192,6 @@ namespace SharpReportCore{ } } + #endregion } } diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj b/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj index 74533bf107..e8828b1010 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj @@ -136,6 +136,7 @@ + diff --git a/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportEngine.cs b/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportEngine.cs index 2798c07264..dbafda0474 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportEngine.cs +++ b/src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportEngine.cs @@ -43,7 +43,7 @@ namespace SharpReportCore { public event EventHandler ParametersRequest; /// - /// This event is fired before a Section is Rendered, you can use + /// This event is fired before a Section is Rendered, you can use /// it to modify items to be printed /// public event EventHandler SectionRendering; @@ -63,7 +63,7 @@ namespace SharpReportCore { #region ParameterHandling private static void UpdateSqlParameters (ReportModel model, - SqlParametersCollection sqlParameters) { + SqlParametersCollection sqlParameters) { if (sqlParameters != null) { foreach (SqlParameter sourcePar in sqlParameters) { SqlParameter destinationPar = model.ReportSettings.SqlParametersCollection.Find(sourcePar.ParameterName); @@ -72,20 +72,24 @@ namespace SharpReportCore { } } + private void CheckAllReportParameters (ReportModel model, ReportParameters reportParameters) { - if (this.connectionObject == null) { + if (reportParameters != null) { + if (reportParameters.ConnectionObject != null) { + this.connectionObject = reportParameters.ConnectionObject; + UpdateSqlParameters (model,reportParameters.SqlParameters); + return; + } + } + if (this.connectionObject == null) { + if (!String.IsNullOrEmpty(model.ReportSettings.ConnectionString)) { this.connectionObject = new ConnectionObject (model.ReportSettings.ConnectionString); } } - if (reportParameters != null) { - this.connectionObject = reportParameters.ConnectionObject; - UpdateSqlParameters (model,reportParameters.SqlParameters); - } - } @@ -116,7 +120,7 @@ namespace SharpReportCore { return model; } - private void InitDataContainer (ReportSettings settings) { + private void InitDataContainer (ReportSettings settings) { if (settings.ReportType == GlobalEnums.ReportType.DataReport) { if (settings.CommandText != null) { try { @@ -124,7 +128,7 @@ namespace SharpReportCore { if (this.connectionObject != null) { this.dataManager = new DataManager(this.connectionObject, - settings); + settings); this.dataManager.DataBind(); } @@ -175,7 +179,7 @@ namespace SharpReportCore { if (this.dataManager.DataSource != null) { abstr = new RendererFactory().Create (model,dataManager); } - } + } break; default: @@ -186,7 +190,7 @@ namespace SharpReportCore { abstr.SectionRendered +=new EventHandler(OnSectionPrinted); return abstr; } catch (Exception) { - throw; + throw; } } @@ -200,10 +204,10 @@ namespace SharpReportCore { private void OnSectionPrinted (object sender,SectionRenderEventArgs e) { if (this.SectionRendered != null) { this.SectionRendered (this,e); - } + } } - + protected SharpReportCore.AbstractRenderer SetupPushDataRenderer (ReportModel model, IList list) { @@ -233,7 +237,7 @@ namespace SharpReportCore { return null; } - + protected SharpReportCore.AbstractRenderer SetupPushDataRenderer (ReportModel model, DataTable dataTable) { @@ -304,7 +308,7 @@ namespace SharpReportCore { model = ModelFromFile (fileName); ReportParameters pars = new ReportParameters(); pars.ConnectionObject = null; - + pars.SqlParameters.AddRange (model.ReportSettings.SqlParametersCollection); return pars; } catch (Exception) { @@ -354,9 +358,43 @@ namespace SharpReportCore { throw; } } + /* + public SharpReportCore.Exporters.PageBuilder_A BuildPages_A (string fileName,ReportParameters reportParameters) { + + try { + RendererFactory rf = new RendererFactory(); + ReportModel model = ModelFromFile (fileName); + + CheckAllReportParameters (model,reportParameters); + this.InitDataContainer (model.ReportSettings); + + SharpReportCore.Exporters.PageBuilder_A builder = + new SharpReportCore.Exporters.PageBuilder_A(model,dataManager); + builder.Go(); + return builder; + } catch (Exception ) { + throw; + } + } - - + public SharpReportCore.Exporters.PageBuilder_B BuildPages_B (string fileName,ReportParameters reportParameters) { + + try { + RendererFactory rf = new RendererFactory(); + ReportModel model = ModelFromFile (fileName); + + CheckAllReportParameters (model,reportParameters); + this.InitDataContainer (model.ReportSettings); + + SharpReportCore.Exporters.PageBuilder_B builder = + new SharpReportCore.Exporters.PageBuilder_B(model,dataManager); +// builder.ReportDocument.PrintController = new System.Drawing.Printing.PreviewPrintController(); + return builder; + } catch (Exception ) { + throw; + } + } + */ /// /// Preview a "PushModel - Report" /// @@ -397,7 +435,7 @@ namespace SharpReportCore { renderer = this.SetupPushDataRenderer (model,list); - if (renderer != null) { + if (renderer != null) { PreviewControl.ShowPreview(renderer,1.5,false); } @@ -517,7 +555,7 @@ namespace SharpReportCore { try { ReportModel model = new ReportModel(); - SharpReportCore.LoadModelVisitor modelVisitor = new SharpReportCore.LoadModelVisitor(model,fileName); + SharpReportCore.LoadModelVisitor modelVisitor = new SharpReportCore.LoadModelVisitor(model,fileName); model.Accept (modelVisitor); return model; } catch (Exception) { diff --git a/src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj b/src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj index a11114d850..d277fd1e32 100644 --- a/src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj +++ b/src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj @@ -19,7 +19,7 @@ False - DEBUG%3bTRACE + DEBUG;TRACE true Full True