Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameter field no results Post Reply Post New Topic
Author Message
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Topic: Parameter field no results
    Posted: 24 May 2011 at 8:20am
Hi,
I have been searching the web and forums all morning, maybe I have not been searching the right keywords, I am hoping someone here can help me.
 
I have set up a parameter field, however When I select the field it goes through about 15000 records then returns nothing, I believe my joins are correct.  My thoughts are I need to test for NUll maybe, I just don't know how to do this properly.
 
My SQL statement is as follows
 
 SELECT "STUDENTS"."FIRST_NAME", "STUDENTS"."LAST_NAME", "STUDENTS"."GRADE_LEVEL", "STOREDGRADES"."STORECODE", "STOREDGRADES"."TEACHER_NAME", "STOREDGRADES"."COURSE_NUMBER", "STANDARDSGRADES"."TRANSAVERAGESCORE", "STANDARDSGRADES"."STORECODE"
 FROM   ("PS"."STUDENTS" "STUDENTS" LEFT OUTER JOIN "PS"."STOREDGRADES" "STOREDGRADES" ON "STUDENTS"."ID"="STOREDGRADES"."STUDENTID") LEFT OUTER JOIN "PS"."STANDARDSGRADES" "STANDARDSGRADES" ON "STUDENTS"."ID"="STANDARDSGRADES"."STUDENTID"
 WHERE  "STANDARDSGRADES"."STORECODE"='T2'
 
The storecode is the filter I am trying to create, I am using an Oracle Database.  I am thinking I have blank or null values in the database so i am getting no results when it  hits the blank or null field.
 
Parameter is {STANDARDSGRADES.STORECODE} = {?Storecode}
 
Any help would be greatly appreciated!
 
Thank you
Shawn
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 24 May 2011 at 8:38am
1. Verify that your report displays the expected records without the parameter
2. Verify the datatype is consistent. Since STORECODE is a string, {?storecode} should also be a string

If you are retrieving records, then your query is correct.

If you're not getting them anymore after implementing your parameter then the parameter is causing problems.

Null value shouldn't be a problem since your WHERE clause forces it to contain a value (namely, "T2")

Edited by Keikoku - 24 May 2011 at 8:39am
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 24 May 2011 at 8:58am
Thanks for the quick reply, without the Parameter the results returned are as expected.  I double checked and I am using string.
 
This is where I am lost, maybe it is my join statements:
 
I have 3 tables
Students StoredGrades and StandardsGrades
 
Links
 
Students.ID ---Left Join enforce to = -->StoredGrades.studentID
                     |--Left Join enForce to = -->StandardsGrades.StudnetID
 
Now I believe the StandardsGrades table may or may not have Data, though I get the same results if I use a Right Join.
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 24 May 2011 at 10:32am
So I figured out my Problem, kind of interesting I thought When I used Report Select Expert,  Record new rather than using the Report fields I had scrolled down to the Database fields which apparently made a diffrence as soon as I used The tables under Report fields everything is working.
 
Thank you
Shawn
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.