?
Solved

Crystal Reports XI Check Dependencies

Posted on 2010-04-05
7
Medium Priority
?
1,867 Views
Last Modified: 2013-11-15
I have a command query in my report:

"select column_name1, column_name2 from table where column_name3 = {?P_NUMBER}"

column_name3 is a number field in my database. And the parameter P_NUMBER is a number the user enters. The parameter has no quotes around it. When I run the Report Check Dependencies I get the following error: "Data Source: Verify for table Command failed. Possible report corruption.". Now if I put quotes around this parameter I no longer get the error.

This error also occurs if the parameter is a Date parameter field. Which I can not put quotes around. So I wanted to know what the solution to getting rid of these error messages would be?

Also the report seems to be running correctly.

Thanks.
0
Comment
Question by:alayanna
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:PCIIain
ID: 29812429
The verify cannot pass the parameter, so when you put quotes around it it tests against the empty string (which is valid).

 Have you tried assigning a default value to the parameter? That might get ti pass something to the query and therefore not fail.
0
 
LVL 1

Author Comment

by:alayanna
ID: 29813689
That allows the query to pass the Check Dependency validation.

But if I don't want that parameter to have a default value then it is still going to fail the check. And I just don't want to chalk it up as error that should be ignored. That just doesn't seem good practice to me.
0
 
LVL 13

Expert Comment

by:PCIIain
ID: 29828676
I'm afraid that is hobsons choice.
Pass the check with a default value, or live with failing the check.
(Unless you can conceive of a sql script which will not return an error if the space for the parameter value is empty. )
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 29830846
How did you add the parameter to the command?
Is it a command or report parameter?

mlmcc
0
 
LVL 1

Author Comment

by:alayanna
ID: 29967164
mlmcc,

I added the parameter to the command during the creation of the command.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 29978326
SO you are showing the command?

Did you add the parameter to the SQL by selecting it?

mlmcc
0
 
LVL 13

Accepted Solution

by:
PCIIain earned 2000 total points
ID: 29995171
Parameters in commands are pretty much done as text replacement directly in the query. Therefore, in order to avoid using defaults you have to do one of two things.

1. Write a query which will still parse correctly and return column headings when the space where the parameter goes is empty.
2. Move the parameter to the select clause of your report. This may slow down the execution of the report however, as if Crystal doesn't pass the parameter to the end query, the database will return all the data and crystal will have to filter itself, which is obviously slower.

Personally, I'd  put defaults in place which are out of bounds (i.e. a date which will never have any data), this will then parse, but if the user runs the report and doesn't fill them in then no data is returned.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
How to increase the row limit in Jasper Server.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question