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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting two different results 2

Status
Not open for further replies.
Aug 12, 2004
949
US
All

I have a wierd problem. Using CR 8.5 and Progress database. I created a report using two parameters so that users could look up a City or a Zip in the database and the report would give them back the results based on their input.

Here is my selection formula:

{ShipTo.City} <> "" and
{ShipTo.ZIP} <> "" and

({?City} = {ShipTo.City}
)
or

(

{?Zip} = {ShipTo.ZIP}
)

When I run this report on the PC using CR it works fine. However, when I build it and run the .exe it gives me black City fields as well in the records. It does this on other machines and even my machine (the CR machine). But, when I run it in CR itself, it works fine.

Example:

When I type in Orlando in my City and hit Enter it will bring up just the Cities with 'Orlando'. But, when I compile it and run the .exe on my PC it will bring up 'Orlando' and every other record with a blank City field as well. What is going on?

Thanks,

Erik
 
I would add parens:

{ShipTo.City} <> "" and
{ShipTo.ZIP} <> "" and
(
(
{?City} = {ShipTo.City}
)
or
(
{?Zip} = {ShipTo.ZIP}
)
)

-LB
 
It sees the defaults differently.

Change eahc parameter to have a default value of All, and change your record selection to:


(
if {?City} <> "All" then
{ShipTo.City} = {?City}
else
if {?City} = "All" then
true
)
and
(
if {?Zip} <> "All" then
{ShipTo.Zip} = {?Zip}
else
if {?Zip} = "All" then
true
)

The above format is optimized to assure SQL pass through as well.

-k
 
LB,

Thanks that worked! I see what you are doing with the parenths....but why would it work in CR and not when I compiled it? Just curious?

Thanks,

Erik
 
I don't really know. I'm surprised in worked correctly in CR alone though.

-LB
 
Synap,

I looked at your post. Is is as you say...It sees the defaults differently"...

So, using the parameter structure you and LB came up with, that's why I was getting two different results?

Just checking...

Erik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top