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!

Parameter limiting # of records

Status
Not open for further replies.

Jillp

Technical User
Jun 7, 2001
75
US
I've made a simple report w/4 tables Vendor, POHeader, POLine, POReleaseLine -- links are straight forward.

When I look at all open POREleaselines, 2700 records. Made group on Buyer - still 2700 records, 10 buyer groups. Create a ?BuyerID parameter, put it in my Select Expert. Preview the report and fill in the ?BuyerID with a VALID buyer. 0 records.

This is only (1) specific buyer. I also tried formulas trim({buyer}) and if buyer = "DUN" then "BD".

I am using a progress database with ODBC connection.

Any thoughts would be greatly appreciated.

Thanks,

Jill
 
Please post your software version and the formula you used.

This formuloa makes no sense:

if buyer = "DUN" then "BD".

You should avoid using the expert and directly edit the Report->Selection Formula->Record, and have something like:

{table.field} = {?MyParameter}

If you do have something like this, either your criteria does not match, or you may have otehr characters or some such in the table.field you're comparing to.

So please don't post and just chat about code without supplying it in future posts. We can't help you fix code we can't review.

-k
 
Thank you for your comments. I am using crystal 8.5

1. While I am posting the formula that 'makes no sense' it is really irrelevant since it is no longer in my report -- I was simply trying to give you a sense of the various steps I have taken as 'work arounds' in order to get this report working.

2. Why should I avoid using the expert? It appears to do the same thing for me -- I am not a programmer.

Below is the information you requested.

Select Expert:
{PORel.DueDate} in {?StartDate} to {?EndDate} and
{@Open} = "Open" and
{POHeader.BuyerID} like {?BuyerID} and
{Vendor.VendorID} in {?VendorStart} to {?VendorEnd}


Tested Formula @ redefinebuyer
if {POHeader.BuyerID} = "DUN" then "BD" else {POHeader.BuyerID}


Tested Formula @trimbuyer
trim({POHeader.BuyerID})

 
Hi,
Your selection formula may be the problem..
Use the 'Show Sql' option to see how the

{POHeader.BuyerID} like {?BuyerID}

Is being parsed and passed to the database..
You may need to use = or add wildcards to use the Like
operator...



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Why are you using a LIKE for the @BUYERID?

If you want them to enter part of the filter criteria, use:

{POHeader.BuyerID} like "*"+{?BuyerID}+"*"

This assumes that it's a string field.

You've made no mention of needing to use pat of the buyerid to filter data, so perhaps you should change it to an = as you use for the other parameters?

Also we don't know what's in @OPEN, so of course you'd need to post what's in there to get accurate help.

Try using // (that makes comments out of the lines) in front of each part of your record selection lines to test the report without all of the criteria to determine which area is causing the failure.

If you're creating reports, you've become a programmer ;)

-k
 
Thank you both for your comments.

I have found my error -- I'm embarrased to admit that it was a foolish mistake. New Buyer -- was not in the date range I selected. :(

Thanks again for your input and sorry to have wasted your time.

Jill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top