Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upper/Lower Bound

Status
Not open for further replies.

josefin

Programmer
Oct 29, 2002
26
NZ
What is the effect if the user unchecks no upper/lower bound in the parameter window on a compiled report. My parameter is a string.
 
You've a range designated for the parameter, this option says that there is no upper and/or lower value passed for the range.

Meaning nothing is passed to limit the rows accordingly.

So if you say the lower range value is "American Company", and you check No Upper Bound, the rows will be limited only by the lower value ({MyTable.MyField >= 'American Company').

Note that you have the Include Value option also. This states whether a <= (Include Value) or < (uncheck Include Value is used).

This is common for date types, less so for strings.

-k kai@informeddatadecisions.com
 
No lower bound would mean that the lower bound would be &quot;&quot;.
No upper bound would mean that upper bound would be &quot;ZZZ&quot; or the highest possible string value. In effect this becomes a Greater than or a Less than criteria. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
When I run my report in Crystal Reports Professional 9.2.2.634 and enter my parameters, if I check "No Upper Bound" and enter a date for the lower bound, it returns no records because it generates this SQL clause:
AND "CSHJRNL"."DATE">={ts '1999-01-01 00:00:00'} AND "CSHJRNL"."DATE"<{ts '1899-12-30 00:00:00'}

Somehow it's taking "No Upper Bound" as less than 12/30/1899.

It does this whether the parameter is defined as range-limited or not.

When this report is run by the end-users, it will tell them something that isn't true. Can I either fix this or disable "No Upper Bound" so they can't check it?
 
By the way, the database this runs against is Microsoft SQL Server.
 
I don't normally use 9, but I tried it to SQL Server 2K with the same version of Crystal 9 as you and I get WHERE "table"."Actual finish date">={ts '2004-11-02 00:00:00'}

I used a ODBC (RDO), ver 2000.81.9002.00

Cheers
Fred
 
The database has a DateTime and the parameter is a date. Should that make a difference?

Oddly enough, it works in the other direction. "No lower bound" generates the <= code in the SQL that I would expect.

If the service pack doesn't work (and I'm not sure I can install it - I'm a consultant here), is there a way to keep them from choosing "No Upper Bound"?
 
THe parameter being a date will not matter.
I've also tried using ADO, (OLEDB) connection and that too is okay.

There is no way to prevent them from not choosing No Upper bound with the range parameter.

You should try CR on another workstation and 'encourage' then to apply the service pack. Its best to fix the cause rather than trying to work round it.
Check/apply your CR service packs, MS MDAC service pack(This will update the ODBC driver) and lastly the OS service packs.




Cheers
Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top