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.
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.
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.
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?
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:
are the tables correctly linked? Sounds like this could be a INNER JOIN vs OUTER JOIN issue.
the part about restricting a result from within crystal - If I understand this correctly you need to use the select expert. Choose the field in question and choose something like "is not equal to" and put the value in.