Print Page | Close Window

number parameter

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9349
Printed Date: 02 May 2024 at 6:38am


Topic: number parameter
Posted By: tcr_andy
Subject: number parameter
Date Posted: 10 Mar 2010 at 8:04am
I have a report connecting to Oracle.  There is a where claause that used to say this
from tumour t, tumour_source ts, patient p
where (t.dco_status ='Y' or t.dco_status ='M')
and ts.patient_id = t.patient_id
and ts.tumour_id = t.tumour_id
and t.patient_id = p.patient_id
and ts.batch_number BETWEEN 2399
                                            and 2408
and ts.supplier_code = 'DEATH'

Field ts.batch_number is defined in the database as a number.

I want to set the start and end batches as parameters.  So - I have defined 2 parameter fields and I get prompted for them when refreshing the report.  But....  If I have this line
and ts.batch_number BETWEEN '{?bstart}'
                                            and '{?bend}'

I get nothing, I think because it is passing over strings and comparing them with numbers.

But if I get rid of the quotes and use this
and ts.batch_number BETWEEN {?bstart}
                                            and {?bend}

I then get a ORA-00911 error.  I tried using quotes and to_number as well but it didn't like that either.

How do I get around this. 


-------------
Andy



Print Page | Close Window