带状列表问题提问
本帖最后由 Lenka.Guo 于 2016-9-7 09:20 编辑你好,我根据http://blog.gcpowertools.com.cn/post/ActiveReports-DrillDown.aspx介绍的设置在PageReports中进行设置,但是预览时报错,提示如下:
错误明细:
GrapeCity.ActiveReports.ReportException: 发生了一个意外错误。更多信息: '索引超出范围。必须为非负值并小于集合大小。
参数名: index' ---> System.ArgumentOutOfRangeException: 索引超出范围。必须为非负值并小于集合大小。
参数名: index
在 System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
在 GrapeCity.ActiveReports.Expressions.ExpressionInfoCollection.get_Item(Int32 index)
在 #xyA.#IyA.get_LabelValue()
在 #xyA.#PyA.#WTb(Int32 pointIndex, Int32 groupLevel)
在 #jyA.#8W.#S8(Int32 tickNumber, Double tickValue)
在 #jyA.#TW.#2FA()
在 #jyA.#TW.#1FA(#gyA device)
在 #jyA.#TW.#TFA(#gyA device)
在 #jyA.#TW.Prepare(#gyA device)
在 #jyA.#8W.Prepare(#gyA device)
在 #jyA.#g0g.Prepare(#gyA device)
在 GrapeCity.ActiveReports.Rendering.Components.Chart.Items.LayoutMgr.Prepare(#gyA device)
在 #jyA.#bX.Prepare(#gyA device)
在 GrapeCity.ActiveReports.Rendering.Components.Chart.Items.LayoutMgr.Prepare(#gyA device)
在 #jyA.#bX.Prepare(#gyA device)
在 #sxA.#Z3e.Layout(LayoutContext context)
在 GrapeCity.ActiveReports.Layout.Layout.Run(LayoutContext context, #e4e spaceManager)
在 #sxA.#l3e.#Rvf(LayoutContext context, #e4e spaceManager)
在 #sxA.#l3e.Run(LayoutContext context, #e4e spaceManager)
在 #97A.#g3e.#Ruf(LayoutDirection direction, Int32 index, Single maxAvailableHeight, Single& bandHeight)
在 #97A.#g3e.Layout(LayoutDirection direction, Single contentPageHeight, Single& verticalExtent)
在 #97A.#e3e.Layout(LayoutDirection direction, Single contentPageHeight, Single& verticalExtent)
在 #97A.#e3e.Layout(LayoutDirection direction, Single contentPageHeight, Single& verticalExtent)
在 #97A.#d3e.#tuf(LayoutContext context, Single contentPageHeight)
在 GrapeCity.ActiveReports.Layout.BandedListLayoutManager.#tuf(LayoutContext layoutContext)
在 GrapeCity.ActiveReports.Layout.BandedListLayoutManager.Run(LayoutContext layoutContext, #e4e spaceManager)
在 #sxA.#l3e.#Rvf(LayoutContext context, #e4e spaceManager)
在 #sxA.#l3e.Run(LayoutContext context, #e4e spaceManager)
在 GrapeCity.ActiveReports.Layout.FixedPageLayoutManager.Run(LayoutContext context, #e4e spaceManager)
在 #sxA.#l3e.#Rvf(LayoutContext context, #e4e spaceManager)
在 #sxA.#83e.#Rvf(LayoutContext context, #e4e masterSpaceManager)
在 #sxA.#93e.Run(LayoutContext context, #e4e spaceManager)
在 #sxA.#93e.#Xyf(LayoutContext context)
在 #sxA.#93e.#Dxf(#S2e masterTree)
在 #sxA.#93e.BuildLayout()
在 GrapeCity.ActiveReports.Layout.Engine.BuildLayout(LayoutInfo layoutInfo)
在 #GPr.#RLf.#NNf(IReport report, TargetDeviceCapabilities targetDevice, LayoutNotificationCallback callback)
在 GrapeCity.ActiveReports.Export.Image.Page.ImageRenderingExtension.Render(IReport report, StreamProvider streams, NameValueCollection settings)
在 GrapeCity.ActiveReports.Document.PageDocument.Render(IRenderingExtension renderingExtension, StreamProvider streams, NameValueCollection settings, Boolean forceDataRefresh, Boolean forceParameterDataRefresh)
--- 内部异常堆栈跟踪的结尾 ---
在 GrapeCity.ActiveReports.Document.PageDocument.Render(IRenderingExtension renderingExtension, StreamProvider streams, NameValueCollection settings, Boolean forceDataRefresh, Boolean forceParameterDataRefresh)
在 GrapeCity.ActiveReports.Document.PageDocument.Render(IRenderingExtension renderingExtension, StreamProvider streams, NameValueCollection settings, Boolean forceDataRefresh)
在 GrapeCity.ActiveReports.Viewer.Win.Rdlx.RdlReport.<>c__DisplayClassf.<LoadImpl>b__b()
在 GrapeCity.ActiveReports.Viewer.Win.AsyncLoader.<>c__DisplayClass7.#cAz(Object , DoWorkEventArgs )
在 System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
在 System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
我想问:1、带状报表是不是只能在RDL报表中使用,页面报表不适用;2、如果可以在页面报表使用,我的错误是因为什么
您好:
1. 带状报表是不是只能在RDL报表中使用,页面报表不适用;
》》》带状列表同样适用于页面报表;
2、如果可以在页面报表使用,我的错误是因为什么
》》》错误可能由于误删除了列表的组头或组尾;总之是报表中控件结构不正确导致的。
具体原因,还需要您提供报表模板来判断。
Lenka.Guo 发表于 2016-9-6 17:12
您好:
1. 带状报表是不是只能在RDL报表中使用,页面报表不适用;
》》》带状列表同样适用于页面报表;
我怎么提供给你呢 天心天思技术部 发表于 2016-9-6 17:32
我怎么提供给你呢
具体报表如附件
您好:
通过使用AR10 测试后,将您的报表模板下载后,在设计界面更改数据源为SQL 数据源后预览正常,没有报错。
第二,将报表改为运行时数据源绑定,将字段修改后并为图表控件绑定实际的数据字段,报表正常加载。
测试Demo:
你好,我这个是在9上面执行就报我发给你的错误的,是不是9有问题在10上面修复了呢? 您好
正在AR9 中测试,测试完成之后再给您回复。 您好,
通过AR9 测试,通过修改数据源后,报表通过修改为SQL Server 测试数据源, 为图表绑定字段;可以正常显示。
所以建议您,检查数据源连接和数据字段绑定是否正确,即图表,文本框控件、带状列表中数据字段绑定是否正确。
Winform ar9 测试程序:
你的demo我们看不了,能不能导出一个rdlx文件给我参考一下呢? 本帖最后由 Lenka.Guo 于 2016-9-7 16:25 编辑
天心天思技术部 发表于 2016-9-7 12:53
你的demo我们看不了,能不能导出一个rdlx文件给我参考一下呢?您好,
Demo看不了,是无法预览报表结果吗?
可能有以下原因导致的:
如果报的是版本号不一致类似的错误,需要使用VS 菜单的工具-》转换为AR9,将程序转换为您当前安装的版本的AR。
如果是数据库连接错误,您可以将Documen_LocateDataSource中的 数据库连接方式改为NWIND.mdb 的路径。
测试数据下载:http://gcdn.gcpowertools.com.cn/showtopic-21271-1-1.html
导出RDL 文件是给您提供一个报表模板文件吗?
如果是报表模板的话,在WinForm Demo中有一个带状列表.rdlx文件,就是报表模板文件,这个是在您的报表模板基础上,删除了DataSet里面的查询语句,修改了字段名称后,重新在报表中引用的。
如果想要一个带状列表的示例,可以在线Demo中下载:http://demo.gcpowertools.com.cn/ActiveReports/ASPNET/ControlExplorer/Viewers/Default.aspx?category=1002&action=2
页:
[1]
2