Crystal报告11:你如何调试水晶报告?

时间:2022-01-06 16:37:35

When I'm creating a crystal report and when I add fields and fields to a database, the report outputs a completely blank report for the invoice I am creating. How do you debug a crystal report?

当我创建水晶报表时,当我向数据库添加字段和字段时,报表会为我正在创建的发票输出一个完全空白的报表。你如何调试水晶报告?

Do you setup markers or flags to output? Is there an error log somewhere which describes which field the report is having an issue with etcs?

你设置标记或标志输出?是否有某个错误日志描述了报告与etcs有问题的哪个字段?

2 个解决方案

#1


Your 'no records' empty report can be caused by some inexpected 'default' links between tables that CR would add each time you modify the list of tables and views needed for the report. There is this 'intelligent linking' option that can even automatically create some recursive links. Be carefull while looking at these in the relations screen, as they might not be viewable 'at once'. Another situation leading to 'empty' reports is when tables are linked with an inner join instead of an outer join, or when outer joins should be switched between left and right.

每次修改报表所需的表和视图列表时,CR将添加的表之间的某些不必要的“默认”链接可能导致您的“无记录”空报表。这种“智能链接”选项甚至可以自动创建一些递归链接。在关系屏幕中查看这些内容时要小心,因为它们可能无法“立刻”查看。导致“空”报告的另一种情况是,表与内部联接而不是外部联接链接,或者外部联接应在左侧和右侧之间切换。

If you cannot find which relation(s) is causing your report to be empty (sometimes it is not so obvious), I advise you to make some trial & errors test by adding/removing tables or modifying your links.

如果您无法找到导致报告为空的关系(有时不太明显),我建议您通过添加/删除表格或修改链接来进行一些试验和错误测试。

#2


You should get an error if there is an issue with the report. I'm guessing there is some logic in a join or display formula that is blanking the report. Can you verify the datasource is correct?

如果报告出现问题,您应该收到错误消息。我猜测连接或显示公式中存在一些消隐报告的逻辑。你能验证数据源是否正确吗?

You can catch more errors if you handle the CrystalReportViewer error event (are you using .net?). I don't have much experience with the VS built-in designer. I use CR XIr2 standalone designer, which makes it much much easier to build reports.

如果处理CrystalReportViewer错误事件(是否使用.net?),则可以捕获更多错误。我对VS内置设计师没有多少经验。我使用CR XIr2独立设计器,这使得构建报告变得更加容易。

#1


Your 'no records' empty report can be caused by some inexpected 'default' links between tables that CR would add each time you modify the list of tables and views needed for the report. There is this 'intelligent linking' option that can even automatically create some recursive links. Be carefull while looking at these in the relations screen, as they might not be viewable 'at once'. Another situation leading to 'empty' reports is when tables are linked with an inner join instead of an outer join, or when outer joins should be switched between left and right.

每次修改报表所需的表和视图列表时,CR将添加的表之间的某些不必要的“默认”链接可能导致您的“无记录”空报表。这种“智能链接”选项甚至可以自动创建一些递归链接。在关系屏幕中查看这些内容时要小心,因为它们可能无法“立刻”查看。导致“空”报告的另一种情况是,表与内部联接而不是外部联接链接,或者外部联接应在左侧和右侧之间切换。

If you cannot find which relation(s) is causing your report to be empty (sometimes it is not so obvious), I advise you to make some trial & errors test by adding/removing tables or modifying your links.

如果您无法找到导致报告为空的关系(有时不太明显),我建议您通过添加/删除表格或修改链接来进行一些试验和错误测试。

#2


You should get an error if there is an issue with the report. I'm guessing there is some logic in a join or display formula that is blanking the report. Can you verify the datasource is correct?

如果报告出现问题,您应该收到错误消息。我猜测连接或显示公式中存在一些消隐报告的逻辑。你能验证数据源是否正确吗?

You can catch more errors if you handle the CrystalReportViewer error event (are you using .net?). I don't have much experience with the VS built-in designer. I use CR XIr2 standalone designer, which makes it much much easier to build reports.

如果处理CrystalReportViewer错误事件(是否使用.net?),则可以捕获更多错误。我对VS内置设计师没有多少经验。我使用CR XIr2独立设计器,这使得构建报告变得更加容易。