报告崩溃

发布于 2024-09-12 06:19:53 字数 922 浏览 9 评论 0原文

您好,我正在尝试提供一份主详细报告。但当我点击预览的下一页时,报告总是崩溃。这两个查询在查询编辑器中都运行良好。

主报告查询

select a.Name,a.ftid,a.instno from testschema.ViewA a where a.ftid={?ftid}

在主报告中单独声明的共享变量

shared numbervar instno;
instno:={Command.INSTNO}

shared stringVar gnpidesc;
gnpidesc:={Command.Name}

子报告查询

select a.TOTALAMT,b.Name from  testschema.ViewB a CROSS JOIN testschema.View3 b where a.ftid={?ftid} AND  b.ftid=a.ftid AND  b.instno={?instno} AND a.Name='{?gnpidesc}' ORDER BY a.GENGNPIDESC

在子报告标题中单独声明的共享变量

shared numbervar instno;
shared stringVar gnpidesc;

我已经定义了3个同名的参数字段。子报告仅显示主报告中的第一行,如果我单击下一页应用程序崩溃。

编辑 子报表在子报表标题部分包含一个交叉表报表。 报告布局

Main Report
 - Details Section (Main report query)
 - Details Section2 (Sub report)
 - Cross-tab (Sub report Footer- Query 2)
Main Report

Hi I am trying to have a master detail report. But the report always crashes as i hit the next page on the preview. Both the queries work fine in the query editor.

Main report query

select a.Name,a.ftid,a.instno from testschema.ViewA a where a.ftid={?ftid}

Shared variables declared in main report separately

shared numbervar instno;
instno:={Command.INSTNO}

shared stringVar gnpidesc;
gnpidesc:={Command.Name}

Sub report query

select a.TOTALAMT,b.Name from  testschema.ViewB a CROSS JOIN testschema.View3 b where a.ftid={?ftid} AND  b.ftid=a.ftid AND  b.instno={?instno} AND a.Name='{?gnpidesc}' ORDER BY a.GENGNPIDESC

Shared variables declared inside subreport header separately

shared numbervar instno;
shared stringVar gnpidesc;

I have delcared 3 parameters fields also with the same name.Sub report only shows for first row in master, if I click next page the application crashes.

Edit
The Sub report contains a cross-tab report in the sub report head section.
Report Layout

Main Report
 - Details Section (Main report query)
 - Details Section2 (Sub report)
 - Cross-tab (Sub report Footer- Query 2)
Main Report

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墟烟 2024-09-19 06:19:53

我确信我以前在自己的报告中见过这种情况。您可能存在一些数据质量/一致性问题。

  1. 您的连接字段是否有空值?只需 1 条记录即可;)

  2. 您是否有引用空值字段的公式?

  3. 我不知道您的数据源是什么,但是这些视图中是否有 Crystal 无法识别的自定义公式?例如,我经常从 MS Access 查询中提取数据,但如果我使用 nz() 函数,Crystal 会抛出错误。

  4. 找到罪魁祸首的一种方法是滚动预览,直到找到无法显示并崩溃的页面。查看那里显示哪些数据。

您必须在数据到达 Crystal 之前修复数据或重新设计函数。祝你好运。

I'm certain I've seen this before with my own reports. You probably have some data quality/consistency issues.

  1. Do any of your joining fields have a null value? All it takes is 1 record ;)

  2. Do you have a formulae that references a field with a null value?

  3. I don't know what your data source is, but do any of those views have custom formulae that Crystal wouldn't recognize? For example, I often pull data from MS Access queries, but Crystal throws an error if I use the nz() function.

  4. One way to find your culprit is to scroll through your preview until you find the page that can't display and crashes. See what data would have displayed on there.

You'll have to either fix the data before it gets to Crystal or rework a function. Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文