Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Not sure how to Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 26 May 2011 at 5:11am
What are you grouping on? Student? Course? Both? Other maybe?

Have you managed to produce the desired report, despite not having any filters set in place?

It would be nice if the filtering was completely separate from the data itself so you could tackle that once you know you have at least everything you need.
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 26 May 2011 at 2:27pm
Thank you,
 
I went back and re-thought out my display and I have it working I can create each section I want in a seperate report.  So what I have is on my design form.
 
STANDARDS.NAME          TANDARDARDSGRADES.TRANSAVERAGSCORE STOREDGRADES.STORECODE
 
These 3 lines display exactly the results I want for now
Which looks like the following

Works well with others                                                                                                   U                                        T1

 

Demonstrates respect to self, others and property                                                          C                                        T1

 

Accepts responsibility for own behavior                                                                         I                                         T1

 

Exercises self‑control                                                                                                    U                                        T1

Works well with others                                                                                                   U                                        T1

 

Demonstrates respect to self, others and property                                                          C                                        T1

 

Accepts responsibility for own behavior                                                                         I                                         T1

 

Exercises self‑control                                                                                                    U                                        T1

 

This is what my CR record select looks like

{STANDARDS.IDENTIFIER} like "*SD*" and
{STUDENTS.LAST_NAME} = {?LastName} and
{STOREDGRADES.COURSE_NUMBER} like "*HR*"

 

In the next report I have

 

{STANDARDS.IDENTIFIER} like "*LA*" and
{STUDENTS.LAST_NAME} = {?LastName} and
{STOREDGRADES.COURSE_NUMBER} like "*LA*"

 

Which dispalys the following

 

Writing                                                                                                                          3                                        T1

 

Reading                                                                                                                        4                                        T1

 

 
Say for Language Arts, so each section is a sub report, I need to figure out my linking as I have some issue there I think has to do with using  four tables.  Anyway what I would love to do is know if there is a way to make this work without using Sub reports. 
 
If I could have Detail Section a hold the report selection for

 

{STANDARDS.IDENTIFIER} like "*SD*" and
{STUDENTS.LAST_NAME} = {?LastName} and
{STOREDGRADES.COURSE_NUMBER} like "*HR*"

 

And then Detail Section B hold

 

{STANDARDS.IDENTIFIER} like "*LA*" and
{STUDENTS.LAST_NAME} = {?LastName} and
{STOREDGRADES.COURSE_NUMBER} like "*LA*"

 

and so on that would be perfect as I could edit around each detail as needed.  However I am thinking once I filter I can not filter again, maybe I am thinking of this wrong though.

 

Once again Thank you all, I feel I am actually making progress on this.

 
I dropped down to using only one group that being student ID so I can seperate the reports.


Shawn



Edited by Shawnlo - 26 May 2011 at 2:28pm
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 27 May 2011 at 2:48am
Judging from the first couple lines, you probably won't be able to get it in one report. Unless those U's and C's and I's and T1's are hardcoded. Then it might be possible depending on your query.

Anyways in your subreport you will have a reference to {?LastName} (which I guess should be student ID?)

This value would be sent from the master report as a subreport link cause a different ID would be sent at each separate page of the report (since it goes down the list of ID's retrieved from the DB).

The subreport would only show the student with this ID at that specific instance, effectively producing distinct results for each page.

Edited by Keikoku - 27 May 2011 at 2:49am
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 27 May 2011 at 3:38am
The  U's and C's and I's and T1's are pulled from the table standardsgrades.transaveragescore Which also contains scores 1 2 3 4 5. 
 
That makes complete sense to use student ID, just got excited when putting the report together forgot to change that and clean it up.  Seeing as student ID distinct for each student.
 
When I link the subreport do all tables need to have a link or can I link with just student ID?
 
Im just amazed at how helpfull this forum has been.
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 27 May 2011 at 3:44am

Switched my Sub reports to use

 
{STOREDGRADES.COURSE_NUMBER} like "*HR*" and
{STANDARDS.IDENTIFIER} like "*GL*" and
{STUDENTS.ID} = {?Pm-STUDENTS.ID}
 
And seems to work so far using that link :D
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 27 May 2011 at 4:59am
If it works then it works I guess.

Perhaps you can give an example of how a record from the result set looks like (column names would be enough).
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 30 May 2011 at 9:09am
Ok I am not 100% sure this is what you are asking for however I have taken some screenshots of the tables I am using.
 
The standards table:
 
Standardsgrades table:
 
 Storedgrades table


Edited by Shawnlo - 30 May 2011 at 9:09am
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 30 May 2011 at 9:14am
The following is the sub-report I am creating:
 
Name =Standards.name Tra=Standardsgrades.transaveragescore
 
I have discovered one otherr problem now I think I may need to try and do an if transaveragescore = 0 then only display the comment value, and another field have to figure out which one first.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 May 2011 at 8:44pm
Hi Shawn -

Here are a few thoughts for you to think about.

First, in your post to me you mentioned null values messing up your formula. This is because when a formula has a null value in it, it will force the entire formula to return False no matter what. To get around this problem you need to test the value for Null as the first part of the formula If IsNull({table.field})....  But an easier way to handle nulls is to set the report property that tells Crystal Reports to convert nulls to their default values (a Null string becomes the empty string ''). (File > Report Option > Convert Database Nulls). You may still need to check for '', but at least it won't force the entire formula to go to False every time there is a null field in the data.

Next, I think the problem you are getting with the subreports is called a Cartesian Product. This frequently happens when the subreport isn't joined to the main report on a unique field. The fields in the subreport will match too many fields in the main report and you get tons of extra rows which are meaningless and redundant. You have to go under the suberport dialog box and choose the linking options tab to set which field in the main report should be joined with which field in the subreport. Picking the correct field is critical for clean data.


Brian


Edited by BrianBischof - 30 May 2011 at 8:54pm
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Shawnlo
Newbie
Newbie


Joined: 24 May 2011
Location: Canada
Online Status: Offline
Posts: 22
Quote Shawnlo Replybullet Posted: 31 May 2011 at 4:57am
I had tried this:
{STUDENTS.ID} = {?Pm-STUDENTS.ID} and
If IsNull({STANDARDS.IDENTIFIER}  ) Or
   InStr({STANDARDS.IDENTIFIER}, " ") = 0 Then
  
{STOREDGRADES.COURSE_NUMBER} like "*LA*" and
{STUDENTS.ID} = {?Pm-STUDENTS.ID}
 
Else
 
{STOREDGRADES.COURSE_NUMBER} like "*LA*" and
{STANDARDS.IDENTIFIER} like "*LA*" and
{STUDENTS.ID} = {?Pm-STUDENTS.ID}
 
I have to refine it because it seems that there is a bunch of redundancy it seems, as well I am not checking for null first like you mentioned.
 
  I need to figure out how to make the red section just hide my standards,name field on the form, and the box around it.
 
As far as getting correct data I think I am ok, student ID links to Student ID, the student table is then linked together in the database expert.
 
 
It seems changing the property for NULL in the report has fixed part of my issue. 


Edited by Shawnlo - 31 May 2011 at 8:25am
IP IP Logged
<< Prev Page  of 3 Next >>
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.016 seconds.