Crystal Reports-SQL的某些输出未显示 [英] Crystal Reports - Certain output from SQL not displaying

查看:70
本文介绍了Crystal Reports-SQL的某些输出未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试解决与从显示的存储过程返回的某些行相关的Crystal Report/SQL存储过程的问题.显示.

I'm currently attempting to fix an issue with a Crystal Report/SQL stored procedure related to certain rows returned from a stored procedure not displaying.

一些背景知识:存储过程从某个表中获取记录,并包括一个WHERE子句,该子句与表中的两个外键匹配.水晶报表显示此过程返回的行.出现了一个问题,即输入表中的数据可能缺少给定的外键之一.然后,存储过程将无法返回该行.

A little background: A stored procedure gets records from a certain table and includes a WHERE clause that matches against two foreign keys in the table. The crystal report displays the rows returned from this procedure. An issue arose, where data being entered into the table may lack one of the given foreign keys. The stored procedure would then fail to return that row.

已决定更改存储过程WHERE子句,使其仅与键之一(保证行具有的键)匹配.当前不记得为什么需要检查另一个密钥,原因是时间丢失了.:/

A decision was made to alter the stored procedure WHERE clause to only match against one of the keys (the one the row is guaranteed to have). It is not currently remembered why it was a requirement to check the other key, the reason is lost to time. :/

无论如何都进行了更改,但是没有出现受影响的行.直接运行存储过程时,可以看到正确的输出.

In any case, the change was made, however the affected rows did not appear. When the stored procedure was ran directly, the correct output was seen.

我的问题:是否有一种方法可以基于字段的值从Crystal Report内限制结果集,类似于SQL查询中的WHERE子句,这可能会导致某些记录无法显示在报告?

My question: Is there a way to restrict a result set from within a Crystal Report based on the value of a field, similar to a WHERE clause in a SQL query, and might this be causing certain records to not display in the report?

另外:可能没有显示整个结果集的其他原因吗?检查的地方?

Additionally: Any other reasons the whole result set might not be displayed? Places to check?

我是Crystal Reports的新手.

I'm a complete Crystal Reports newbie.

推荐答案

因为您可以看到存储过程返回的记录...以下是对您有帮助的几点:

since you can see the records returned from stored procedure... below are few points that will help you:

  1. Crystal报表中的select expert用作where子句...因此,如果您希望将数据限制为报表,则可以将条件放入select expert.
  2. 如果您在报表中使用参数,并且参数中的值与存储过程返回的数据不匹配,则CR也会为空.
  3. 检查与Crystal Report的数据库连接,是否连接到正确的数据库.

这篇关于Crystal Reports-SQL的某些输出未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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