CR Version: Crystal Reports XI Professional SP2
Database: Oracle 10.2
Connection: Native Oracle Driver
Problem:
I'm attempting to select only data that starts with a string provided by a parameter(Or All). The "All" function works fine, but when I enter a value, like "A", no records are returned.
I've verified that the parameter and field data types are both strings, and that data exists that matches the criteria I'm entering into the parameter. I've even tried hard coding a valid value into the formula.
This database will get quite large and I have several parameters like this to setup for this report, so it's important that I get as much stuff to process at the database level as possible...
I've tried the following:
(
{PATIENT.PAT_NAME} startswith {?Patients Name} or
{?Patients Name} = "All"
)
This passes to the database, it just doesn't return data.
Next, I tried:
(
totext ({PATIENT.PAT_NAME}) startswith {?Patients Name} or
{?Patients Name} = "All"
)
This works (returns the correct data) however, it does not pass to the database.
Since that returned data, I've tried creating a SQL expression to convert the string in an attempt to get it to pass the select statement to the database.
SQL Expression Field:
(TO_CHAR ("PATIENT"."PAT_NAME" )
Select Statement:
(
{%PatientName} startswith {?Patients Name} or
{?Patients Name} = "All"
)
Again, this passes to the database, but does not return data.
Any Ideas?
Database: Oracle 10.2
Connection: Native Oracle Driver
Problem:
I'm attempting to select only data that starts with a string provided by a parameter(Or All). The "All" function works fine, but when I enter a value, like "A", no records are returned.
I've verified that the parameter and field data types are both strings, and that data exists that matches the criteria I'm entering into the parameter. I've even tried hard coding a valid value into the formula.
This database will get quite large and I have several parameters like this to setup for this report, so it's important that I get as much stuff to process at the database level as possible...
I've tried the following:
(
{PATIENT.PAT_NAME} startswith {?Patients Name} or
{?Patients Name} = "All"
)
This passes to the database, it just doesn't return data.
Next, I tried:
(
totext ({PATIENT.PAT_NAME}) startswith {?Patients Name} or
{?Patients Name} = "All"
)
This works (returns the correct data) however, it does not pass to the database.
Since that returned data, I've tried creating a SQL expression to convert the string in an attempt to get it to pass the select statement to the database.
SQL Expression Field:
(TO_CHAR ("PATIENT"."PAT_NAME" )
Select Statement:
(
{%PatientName} startswith {?Patients Name} or
{?Patients Name} = "All"
)
Again, this passes to the database, but does not return data.
Any Ideas?