我在MVC Web应用程序中使用Stimulsoft Reports。报告中有一个CODE128C
条形码,每页包含4个业务对象(每个项目都有一个条形码)。
当我从门户网站中点击“打印查看器”中的“使用预览打印”按钮时,只有第一页项目呈现条形码而其他项目条形码为空!很奇怪,当我再次这样做时(关闭打印对话框并点击“打印预览”再次打开它)将呈现所有页面中的条形码!
如果只有一个用户,我们可以强迫他打开两次打印预览! :)但我们有非常无知的用户,他们可能会浪费大量的纸张!
这是Stimulsoft的错误吗?或者我必须在报表设计器中更改内容?提前谢谢......
更新: 这是报告的样本
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<StiSerializer version="1.02" type="Net" application="StiReport">
<Dictionary Ref="1" type="Dictionary" isKey="true">
<BusinessObjects isList="true" count="1">
<ExitLicense Ref="2" type="Stimulsoft.Report.Dictionary.StiBusinessObject" isKey="true">
<Alias>ExitLicense</Alias>
<BusinessObjects isList="true" count="0" />
<Category>PrintVm</Category>
<Columns isList="true" count="4">
<value>ExitLicenseId,System.Int64</value>
<value>ContractNumber,System.String</value>
<value>CompanyName,System.String</value>
<value>CeoName,System.String</value>
</Columns>
<Dictionary isRef="1" />
<Guid>f04db6f6af57437ab6b3ec7eeecfdf44</Guid>
<Name>ExitLicense</Name>
</ExitLicense>
</BusinessObjects>
<Databases isList="true" count="0" />
<DataSources isList="true" count="0" />
<Relations isList="true" count="0" />
<Report isRef="0" />
<Resources isList="true" count="0" />
<Variables isList="true" count="1">
<value>,IndustrialEstateName,IndustrialEstateName,,System.String,,False,False,False,False</value>
</Variables>
</Dictionary>
<EngineVersion>EngineV2</EngineVersion>
<GlobalizationStrings isList="true" count="0" />
<MetaTags isList="true" count="0" />
<Pages isList="true" count="1">
<Page1 Ref="3" type="Page" isKey="true">
<Border>None;Black;2;Solid;False;4;Black</Border>
<Brush>Transparent</Brush>
<Components isList="true" count="1">
<DataBand1 Ref="4" type="DataBand" isKey="true">
<Brush>Transparent</Brush>
<BusinessObjectGuid>f04db6f6af57437ab6b3ec7eeecfdf44</BusinessObjectGuid>
<ClientRectangle>0,0.15,8.5,1.35</ClientRectangle>
<Components isList="true" count="1">
<BarCode1 Ref="5" type="Stimulsoft.Report.BarCodes.StiBarCode" isKey="true">
<BackColor>Transparent</BackColor>
<BarCodeType Ref="6" type="Stimulsoft.Report.BarCodes.StiCode128cBarCodeType" isKey="true" />
<ClientRectangle>4.9,0.35,2.1,0.8</ClientRectangle>
<Code>{ExitLicense.ExitLicenseId}</Code>
<Conditions isList="true" count="0" />
<Font>B Yekan,9.75,Regular,Point,False,178</Font>
<ForeColor>Black</ForeColor>
<HorAlignment>Center</HorAlignment>
<Name>BarCode1</Name>
<Page isRef="3" />
<Parent isRef="4" />
<VertAlignment>Center</VertAlignment>
</BarCode1>
</Components>
<Conditions isList="true" count="0" />
<DataSourceName isNull="true" />
<Filters isList="true" count="0" />
<Name>DataBand1</Name>
<Page isRef="3" />
<Parent isRef="3" />
<Sort isList="true" count="0" />
</DataBand1>
</Components>
<Conditions isList="true" count="0" />
<Guid>6743a7157e964eb5b4f79986bea69e48</Guid>
<Margins>0,0,0.2,0.2</Margins>
<Name>Page1</Name>
<PageHeight>11</PageHeight>
<PageWidth>8.5</PageWidth>
<PaperSize>Letter</PaperSize>
<Report isRef="0" />
<Watermark Ref="7" type="Stimulsoft.Report.Components.StiWatermark" isKey="true">
<Font>Arial,100</Font>
<TextBrush>[50:0:0:0]</TextBrush>
</Watermark>
</Page1>
</Pages>
<PreviewSettings>268435455</PreviewSettings>
<PrinterSettings Ref="8" type="Stimulsoft.Report.Print.StiPrinterSettings" isKey="true" />
<ReferencedAssemblies isList="true" count="8">
<value>System.Dll</value>
<value>System.Drawing.Dll</value>
<value>System.Windows.Forms.Dll</value>
<value>System.Data.Dll</value>
<value>System.Xml.Dll</value>
<value>Stimulsoft.Controls.Dll</value>
<value>Stimulsoft.Base.Dll</value>
<value>Stimulsoft.Report.Dll</value>
</ReferencedAssemblies>
<ReportAlias>Report</ReportAlias>
<ReportChanged>1/24/2018 2:30:06 PM</ReportChanged>
<ReportCreated>1/24/2018 2:19:05 PM</ReportCreated>
<ReportFile>D:\Reports\ExitLicense.mrt</ReportFile>
<ReportGuid>7e8a339e3b61494b8f5e88509c3c08ef</ReportGuid>
<ReportImage isNull="true" />
<ReportName>Report</ReportName>
<ReportUnit>Inches</ReportUnit>
<ReportVersion>2016.3.0</ReportVersion>
<Script>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
}
}
</Script>
<ScriptLanguage>CSharp</ScriptLanguage>
<Styles isList="true" count="0" />
</StiSerializer>