Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Report Returning Partial Data Post Reply Post New Topic
Page  of 2 Next >>
Author Message
djandlo
Newbie
Newbie
Avatar

Joined: 16 Jun 2011
Location: United States
Online Status: Offline
Posts: 20
Quote djandlo Replybullet Topic: Report Returning Partial Data
     Posted: 16 Jun 2011 at 5:51am
Hi,
 
I'm new to the forum & not too advanced when it come to Crystal. I'm using Crystal 9 & iMIS 10.6...
 
I have a report that pulls members who have an "active" status & "unpaid dues for Chapter & National" (two seperate dues items).  The report returns results for both dues items (2 line items) for all but 3 states - theses 3 states only return 1 line item but it does add in to the summary the cost of the missing dues product.
 
When I check the records the missing dues item is on the record and coded correctly.
 
Can someone steer me in the right direction to solving this?
 
Btw: I didn't see a way to add an attachment.
 
Thanks,
 
DJandloCry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jun 2011 at 6:21am

exclusion of expected data is usually from

1. table join issues
2. select statement issue
3. a select statement altering the join type (turning an outer join into an inner join)
IP IP Logged
djandlo
Newbie
Newbie
Avatar

Joined: 16 Jun 2011
Location: United States
Online Status: Offline
Posts: 20
Quote djandlo Replybullet Posted: 16 Jun 2011 at 7:04am
In checking the linking below is what I found...  Should I try changing some of the join types myself?  Also, I added the select statement below.
Thanks!
Tables:
Name
Subscriptions
Activity
Product_Type
Get_Descriptions
Product_Sub
Trans (Transaction)
Linking:                                                 Join Type: Inner        Link Type: =
Name.ID --> Subscriptions.ID          
Subscription.Prod_Type --> Product_Type.Prod_Type
Product_Type.Descrip --> Get_Descriptions.Descrip
Subscriptions.Prod_Code --> Activity.Prod_Code
Subscriptions.ID --> Activity.ID (Removed this link)
Subscription.Prod_Code --> Product_Sub.Prod_Code
Product_Sub.Prod_Cod e --> Trans.Prod_Code
SELECT STATEMENT:
{Name.MEMBER_TYPE} in ["GEN", "AC", "AF", "CO", "FE", "RES"] and
{Name.PAID_THRU}= Date(2010,12,31) and
({Subscriptions.PRODUCT_CODE}in['GEN2011', 'AF2011', 'CO2011', 'FE2011', 'RES2011'] OR
{Subscriptions.PRODUCT_CODE} like "CHAPT*") and
{Name.STATUS} = "A"
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jun 2011 at 7:29am
so for the rows that are missing is there a part of the select statement that is excluding them?
IP IP Logged
djandlo
Newbie
Newbie
Avatar

Joined: 16 Jun 2011
Location: United States
Online Status: Offline
Posts: 20
Quote djandlo Replybullet Posted: 16 Jun 2011 at 8:30am
No, the portion that includes the missing info is:
 
{Subscriptions.PRODUCT_CODE} like "CHAPT*")
 
If I'm correct then it should be returning any product that has a chapter (the product code is CHAPT/<STATE>).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jun 2011 at 8:35am
so if you take out the IN [] do you get the missing ones?
{Name.MEMBER_TYPE} in ["GEN", "AC", "AF", "CO", "FE", "RES"] and
{Name.PAID_THRU}= Date(2010,12,31) and
{Subscriptions.PRODUCT_CODE} like "CHAPT*" and
{Name.STATUS} = "A"
IP IP Logged
djandlo
Newbie
Newbie
Avatar

Joined: 16 Jun 2011
Location: United States
Online Status: Offline
Posts: 20
Quote djandlo Replybullet Posted: 16 Jun 2011 at 8:36am
Also, the first part of this statement  in bold is being shown on the report. 
 
The second part is being shown for all but 3 states.
 
({Subscriptions.PRODUCT_CODE}in['GEN2011', 'AF2011', 'CO2011', 'FE2011', 'RES2011'] OR
{Subscriptions.PRODUCT_CODE} like "CHAPT*") and
Truly a head scratcher...Pinch
IP IP Logged
djandlo
Newbie
Newbie
Avatar

Joined: 16 Jun 2011
Location: United States
Online Status: Offline
Posts: 20
Quote djandlo Replybullet Posted: 16 Jun 2011 at 8:38am
I removed then "IN" and still no result... Even added an "=" in it's place.
IP IP Logged
djandlo
Newbie
Newbie
Avatar

Joined: 16 Jun 2011
Location: United States
Online Status: Offline
Posts: 20
Quote djandlo Replybullet Posted: 16 Jun 2011 at 8:57am
I copied your code and it does show the missing amounts but not the chapter codes. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jun 2011 at 9:00am
so it is likely a combo of the LIKE and another part of your statement
start removing them until you get the rows you expect or look in the DB to see what part would be causing the exclusion
IP IP Logged
Page  of 2 Next >>
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