есть проблема. вопроизводится на Stimulsoft Reports.Net в версиях 2008, 2010, 2012.
привожу упрощенный пример отчета версии 2012.
в отчете необходимо для каждого продукта выводить картинку (ProductImage) и его описание (DescriptionProductText).
Но т.к. описание продукта может превышать высоту страницы, то для DescriptionProductText, а также для датабэнда (DataSource), содержащего его, выставлен атрибут CanBreak=true.
см. отчет ProductsReportTemplate_temp4 [simplified] [2012].mrt:
Код: Выделить всё
ProductReportParameters
CategoryName,System.String
ProductReportParameters
ProductReportParameters
ProductsReportBusinessWrapper
Image,System.Byte[]
NetPrice,System.String
ProductDescription,System.String
ProductName,System.String
SupplierName,System.String
Units,System.String
ProductsReportBusinessWrapper
ProductsReportBusinessWrapper
EventsReportBusinessWrapper
Image,System.Byte[]
ManufactureName,System.String
ProductName,System.String
Telephone,System.String
Email,System.String
Website,System.String
House,System.String
HouseStreetNumber,System.String
TownCounty,System.String
Postcode,System.String
EventsReportBusinessWrapper
EventsReportBusinessWrapper
EngineV1
None;Black;2;Solid;False;4;Black
Transparent
Transparent
16,27.2,2.8,0.4
Verdana,8.25,Regular,Point,False,204
Right
0,0,0,0
PageNumber
{PageNofM}
Black
Expression
Transparent
True
0,0.4,19,3.2
True
Transparent
True
3.4,0.4,3,2.2
ProductsReportBusinessWrapper.Image
True
Center
ProductImage
OnlyInWidthOfComponent
Transparent
True
True
9.8,1.6,5.8,0.4
Verdana,9,Regular,Point,False,204
True
0,0,0,0
DescriptionProductText
{ProductsReportBusinessWrapper.ProductDescription}
Black
HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
Expression
ProductsReportBusinessWrapper
DataSource
True
0,0,19,27.8
239, 239, 239
c653049b66474dd58900173e53522645
Rectangle
5
19,27.8,0,0
EndPointPrimitive
c653049b66474dd58900173e53522645
0,0,0,0
StartPointPrimitive
c653049b66474dd58900173e53522645
bb365a02dca74b3395ed2e8874601306
1,1,1,1
Page
29.7
21
Arial,100
[50:0:0:0]
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
Report
4/25/2012 8:30:53 PM
9/17/2008 2:59:59 PM
b7bba75f255e441bb14dc5ea83e9d754
Report
Centimeters
2012.1.1300
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Stimulsoft.Report.Engine.StiPostProcessDuplicatesHelper.PostProcessDuplicates(StiComponentsCollection comps, Hashtable parentCont)
at Stimulsoft.Report.Engine.StiPostProcessProviderV1.PostProcessPage(StiPage page, Boolean isFirstPage, Boolean isLastPage)
at Stimulsoft.Report.Engine.StiPostProcessProviderV1.PostProcessPages(StiPagesCollection pages)
at Stimulsoft.Report.Engine.StiRenderProviderV1.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV1Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render()
если у датабэнда DataSource убрать атрибут CanBreak (т.е. выставить его в false), то отчет строится ок, но описания продуктов, которые не влазят на страницу, обрезаются.
см. отчет ProductsReportTemplate_WORKS8 [simplified] [no-canbreak] [2012].mrt:
Код: Выделить всё
ProductReportParameters
CategoryName,System.String
ProductReportParameters
ProductReportParameters
ProductsReportBusinessWrapper
Image,System.Byte[]
NetPrice,System.String
ProductDescription,System.String
ProductName,System.String
SupplierName,System.String
Units,System.String
ProductsReportBusinessWrapper
ProductsReportBusinessWrapper
EventsReportBusinessWrapper
Image,System.Byte[]
ManufactureName,System.String
ProductName,System.String
Telephone,System.String
Email,System.String
Website,System.String
House,System.String
HouseStreetNumber,System.String
TownCounty,System.String
Postcode,System.String
EventsReportBusinessWrapper
EventsReportBusinessWrapper
EngineV1
None;Black;2;Solid;False;4;Black
Transparent
Transparent
16,27.2,2.8,0.4
Verdana,8.25,Regular,Point,False,204
Right
0,0,0,0
PageNumber
{PageNofM}
Black
Expression
Transparent
0,0.4,19,3.2
True
Transparent
True
3.4,0.4,3,2.2
ProductsReportBusinessWrapper.Image
True
Center
ProductImage
OnlyInWidthOfComponent
Transparent
True
True
9.8,1.6,5.8,0.4
Verdana,9,Regular,Point,False,204
True
0,0,0,0
DescriptionProductText
{ProductsReportBusinessWrapper.ProductDescription}
Black
HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
Expression
ProductsReportBusinessWrapper
DataSource
True
0,0,19,27.8
239, 239, 239
c653049b66474dd58900173e53522645
Rectangle
5
19,27.8,0,0
EndPointPrimitive
c653049b66474dd58900173e53522645
0,0,0,0
StartPointPrimitive
c653049b66474dd58900173e53522645
bb365a02dca74b3395ed2e8874601306
1,1,1,1
Page
29.7
21
Arial,100
[50:0:0:0]
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
Report
4/25/2012 8:32:51 PM
9/17/2008 2:59:59 PM
32173ed4fe334749b9523f88ae2ce6dc
Report
Centimeters
2012.1.1300
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
см. отчет ProductsReportTemplate_WORKS7 [simplified] [no-image] [2012].mrt:
Код: Выделить всё
ProductReportParameters
CategoryName,System.String
ProductReportParameters
ProductReportParameters
ProductsReportBusinessWrapper
Image,System.Byte[]
NetPrice,System.String
ProductDescription,System.String
ProductName,System.String
SupplierName,System.String
Units,System.String
ProductsReportBusinessWrapper
ProductsReportBusinessWrapper
EventsReportBusinessWrapper
Image,System.Byte[]
ManufactureName,System.String
ProductName,System.String
Telephone,System.String
Email,System.String
Website,System.String
House,System.String
HouseStreetNumber,System.String
TownCounty,System.String
Postcode,System.String
EventsReportBusinessWrapper
EventsReportBusinessWrapper
EngineV1
None;Black;2;Solid;False;4;Black
Transparent
Transparent
16,27.2,2.8,0.4
Verdana,8.25,Regular,Point,False,204
Right
0,0,0,0
PageNumber
{PageNofM}
Black
Expression
Transparent
True
0,0.4,19,3.2
Transparent
True
True
9.8,1.6,5.8,0.4
Verdana,9,Regular,Point,False,204
True
0,0,0,0
DescriptionProductText
{ProductsReportBusinessWrapper.ProductDescription}
Black
HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
Expression
ProductsReportBusinessWrapper
DataSource
True
0,0,19,27.8
239, 239, 239
c653049b66474dd58900173e53522645
Rectangle
5
19,27.8,0,0
EndPointPrimitive
c653049b66474dd58900173e53522645
0,0,0,0
StartPointPrimitive
c653049b66474dd58900173e53522645
bb365a02dca74b3395ed2e8874601306
1,1,1,1
Page
29.7
21
Arial,100
[50:0:0:0]
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
Report
4/25/2012 8:39:31 PM
9/17/2008 2:59:59 PM
150705f143cc488483e7bec0e075a3da
Report
Centimeters
2012.1.1300
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
Заранее благодарю!