Differences

This shows you the differences between two versions of the page.

Link to this comparison view

control_error_-_no_data_found [2019/01/27 11:28] (current)
Line 1: Line 1:
 +
 +
 +
 +
 +==Error Message==
 +
 +
 +
 +Printing a report results in a mostly blank page with the text "No Data Found." in red.
 +
 +
 +
 +==Explanation of Error==
 +
 +
 +
 +To populate a Crystal Report, a query is generated and sent to the database for results.  Many of the system reports in Cyrious are designed to print "No Data Found" when no results are returned.  In technical terms, this occurs when the result set of the query is NULL.
 +
 +
 +
 +==Severity==
 +
 +**Normal**.  This only affects the particular report being displayed.  Operation of Control is unaffected.
 +
 +
 +
 +==Possible Causes==
 +
 +
 +
 +This occurs when the SQL result set is NULL.  This may be caused by:
 +  - Missing data.
 +  - Incorrect linking in the report (specifically, a FULL JOIN used when a LEFT JOIN was needed).  
 +
 +
 +
 +Example of each of these cases:
 +  - The invoice usually displays the contacts address.  However, if the address was missing, the resulting SQL might end up with no data because the address could not be matched. This would be a case of missing data that should be there.
 +  - The Purchase Order could also display the vendor contact information, but the vendor contact is not required (unlike a client contact).  If the vendor contact was not created and the Purchase Order did not take this into account, it might result in an empty dataset when the contact did not exist.  This would be a case where a LEFT JOIN was required in the SQL instead of a FULL JOIN.
 +
 +
 +
 +==Resolution==
 +
 +
 +
 +The solution depends on the specific problem, but general techniques are:
 +  - Add the missing data.  Often editing the records involved (e.g., the Order, Customer, and Salesperson records) can help find the missing information.
 +  - Make sure you are running the latest version of the reports.
 +  - Contact Technical Support by [[telephone_support_information|Phone]] or [[mailto:supportcyrious.com|mailto:support@cyrious.com]] to have this issue repaired.
 +
 +
 +
 +==Debugging Tips==
 +  - Open the errant report in preview mode.
 +  - Right click on a blank section of the report title bar (the bar containing the //Setup//, //View Full Screen//, and Page Navigation Buttons.
 +  - Click "**Save SQL Query Text..**" and save it to somewhere easy to find like your desktop.
 +  - Open SQL Server Management Studio Express and connect to your SQL Server.
 +  - Select your StoreData database and click "**New Query**"
 +  - Open the SQL Query Text file you saved earlier and paste it into the new query window.
 +  - Execute the query.  You should see that no data is returned.
 +  - You must correct this query to find how the report is linked improperly.
 +
 +
 +