水晶报表 - 如果图表包括数据重复 [英] Crystal Reports - Data repeating if chart is included

查看:258
本文介绍了水晶报表 - 如果图表包括数据重复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用的Crystal Reports XI R3为我们的报告目的。我们已经创建了类型化的DataSet充当数据源的报告。

We are using Crystal Reports XI R3 for our reporting purposes. We have created typed dataset which act as the datasource for the reports.

我现在面临的问题包括:条形图随着上的报告之一的网格。图表被嵌入到默认标题部分和电网产生出来的细节部分。

I am facing an issue including a bar chart along with the grid on one of the reports. The chart gets embedded into the header section by default and the grid is generated out of the details section.

如果我设计的报告没有图表,这一切工作正常。如果我提供8行数据,它发布8行报告过。但是,如果我有一个图表上的同一份报告,在细节部分得到的数据相乘,我得到64行或某事与相同的数据源。

If I design the report without the chart, it all works fine. If I supply 8 rows of data, it publishes 8 rows in the report too. But if I include a chart on the same report, the data in the details section gets multiplied, and I get 64 rows or something with the same datasource.

这应该是pretty的直线前进功能,但它似乎并没有为我工作。我想有一个子报告,并在子报表的细节部分,它工作正常。但是,我不能用这种方法去任何本报告中本身将被纳入到另外一个子报告,我们不能有水晶嵌套的子报告。

This should be a pretty straight forward functionality, but it doesn't seem to be working for me. I tried include a sub-report and have the details section in the sub-report and it works fine. But, I can't go with this approach either as this report in itself would be included to another as a sub-report and we cant have nested sub-reports in Crystal.

请帮我一些指点什么可以去错了吗?

Please help me with some pointers on what could be going wrong ?

编辑:在进一步的调查,它看起来像有两个不同的表来填充图表和电网的一个问题。如果我使用一个表两种,它工作正常。

On further investigation, it looks like a problem with having two different tables to populate the chart and the grid. If I use a single table for both, it works fine.

附加截图上@格利扬的要求:

Attaching screenshot on @Kalyan's request:

推荐答案

这个问题确实是使用多个不相关的表为一个报告。水晶报表默认情况下,不允许使用多个表,除非它们以某种方式联系在一起的。如果你不指定一个链接,它会尝试使用自己的链接,并运行一个连接,而发布的报告。

The issue indeed was with using multiple unrelated tables for a single report. Crystal Reports by default doesn't allow using multiple tables, unless they are linked in someway. If you dont specify a link, it tries to apply a link on its own and runs a join while publishing the report.

由于这个连接,数据是得到反复对我来说。

Due to this join, the data was getting repeated for me.

要解决这个问题,我创建了相应的网格表的主键一组,使用的组生成网格和SUP pressed细节部分。问题解决了。

To resolve the issue, I created a group on the primary key of the table corresponding to the grid, and used the group to generate the grid and suppressed the details section. Problem resolved.

这篇关于水晶报表 - 如果图表包括数据重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆