Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Field/Link Issue Post Reply Post New Topic
Page  of 2 Next >>
Author Message
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Topic: Field/Link Issue
     Posted: 04 Sep 2009 at 10:05am
Running CR 10.0
 
I'm not sure how best to word this question so here it goes...
 
I have a field {tvwr_SOPartsUsed.SOPartsUsedPriceBookFeatures} ("features" of parts) that when they are part of ticket the report works fine but if the ticket doesn't have this particular field then the report comes up empty for all records in the entire report.
 
The fields are listed in GH2a and GH2b {tblSOPartsUsed.SOPartsUsedKeyID} if I put the fields in the details section I get the same results.
 
If the information I provided is too vague, let me know and I'll try to supply additional information. Does this sound like a link or group issue?
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Sep 2009 at 10:56am
Likely a combination of a join and record select criteria.
How are these functioning your report?
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 04 Sep 2009 at 11:16am
I'm not sure I understand what you mean by "functioning the report" but...here's the link relationships:
 
tblSysListViewPrint.NumberID > tblServiceOrders.SONumber > tblSOPartsUsed.SONumber > tblSOPartsUsed.SOPartsUsedKeyID > tvwr_SOPartsUsed.SOPartsUsedKeyID
 
Record selection:
Group #1 tblSOPartsUsed.SONumber
Group #2 tblSOPartsUsed.SOPartsUsedKeyID
 
Hope that answers your question.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Sep 2009 at 11:22am
Sorry about that. I meant functioning in the report / how are they being used.
Are these left joins or inner joins and do you have any record select conditions in the select expert?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Sep 2009 at 11:41am

From you r description I would say you have an inner join so that when you are grabbing a particular record that has a value in the tvwr_SOPartsUsed field it "works fine" but if there is no value then it "excludes all the records" becauuse the join is inner not a left join which would still get records from one table even if there was no match in the tvwr_SOPartsUsed table.

Does that help?
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 04 Sep 2009 at 1:18pm

All of the links are (left outer joint types, not forced join, = link type). Yes, the select expert is set to tblSysListViewPrint.SysListViewPrintKeyID > 0.00 and tblSOPartsUsed.SONumber = 259553 (which works) but 259535 does not.

HTH
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Sep 2009 at 1:26pm

If I understand your set up the culprit is likely the second part of your select expert statement.

change it from using tblSOPartsUsed.SONumber to tblServiceOrders.SONumber
Likely the tblSOPartsUsed has no match at all 259535 and therefore it drops everything.
Even if you use a left outer join the select statement call force it to be an inner join which this would do.
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 04 Sep 2009 at 2:22pm
I agree with your thought process because I tried the same thing before with the same results. Just to be certain though I followed your suggestion; I added tblServiceOrders.SONumber to the groups and added it to the sort criteria. So now GH1 is SONumber and GH2 is SOPartsUsedKeyID. I ran it with the fields listed in GH2 and then moved them to GH1 but got the same results as before. I also removed all the formula's listed in the section expert just to be certain nothing was preventing 259535 from printing.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Sep 2009 at 2:34pm
Hmmm. I am not sure what is causing it. Almost always with what you are describing it has to do with a join and an outer join can become an inner join quickly.
I would not give up on this as the problem.
I would make a quick test report add all of your tables with your joins as they are now. don't add any select criteria.
add your primary key fields or something similar from each and every table. JOins are not enforced until you add a field from that table to the report (or you force it in the join set up).
Do a search for 259535 to see if it is there at this point. It should be. If not then something is real screwy. Assuming it is there start adding in just part of your select statment or other things until you see it disappear to figure out what is causing it.
I usually handle these things in views and use that as the source and is is much easier to control but I don't recall if you had access to making views or not.
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 04 Sep 2009 at 2:42pm

Well, something you said regarding record selection made me think that it might have something to do with the other selection formula SysListViewPrint > 0, I removed it in Crystal and I can pull the report for both SO's. So I included it in my CRM and ran it and it failed (

So there's something in the CRM causing it to change the relationship to inner not sure how to workaround this problem...
 
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