Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crsytal 10 - Subreport help! Post Reply Post New Topic
Author Message
DWT78
Newbie
Newbie


Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 3
Quote DWT78 Replybullet Topic: Crsytal 10 - Subreport help!
    Posted: 16 Oct 2008 at 8:33am
I have a subreport that pulls the same data as the main report.

Main report = Company data
Subreport = Subsidiary Companies and their data

I am passing the company_Id param to the subreport as company.parent_Id

The main report and subreport both display data *IF* the main report has data.....  If the main report is blank, the subreport is also blank even though data should be present in the sub.  Why is this happening?  Any ideas??

Im losing my mind!!


Edited by DWT78 - 16 Oct 2008 at 8:34am
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 16 Oct 2008 at 12:23pm
when you join the main to the sub it looks for the value to link to, if your main report is blank your sub will be as well.
 
i gather you are using parameters to filter the data.  is it a distinct selection or can it return all values.
 
what data should be present in the sub?
 
does the table contain null values?
sharona
IP IP Logged
keval300
Newbie
Newbie
Avatar

Joined: 18 Jul 2008
Location: India
Online Status: Offline
Posts: 24
Quote keval300 Replybullet Posted: 21 Oct 2008 at 9:51am

Hi,

If Your main report is blank,Does it mean that your parentId(Link Field) is NULL?

If its null then there might be a problem.

Let Us Assume that your ParentID is Blank Or Null.

Then if your link field in sub Report say "ChildId" should be Blank or NULL.
so if these two fields that is
the ParentID in Main Report and the ChieldId in sub Report has same data then you will have your report displayed.
 
 Regards
Keval Raj
Enjoy...
IP IP Logged
DWT78
Newbie
Newbie


Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 3
Quote DWT78 Replybullet Posted: 10 Nov 2008 at 10:44am
The main report pulls in the corporate company along with issues attached to the corp company.  The sub report pulls in child companies (Company.parent_company_Id = company.company_Id) for example.

* IF the main report which is keyed off the company does not contain any issues, it will not return the sub report, even though issues do exist at the sub report level...

I have tried passing the company_ID, acronym (Which is a text based field).  I have tried every combination of joins for company.company_id = issue.company_id) but nothing seems to jive.

If the main report does infact contain issues for the parent "main report" then the subreport will pull.  Very confused...Any ideas?


Edited by DWT78 - 10 Nov 2008 at 10:45am
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 11 Nov 2008 at 4:56am

you need to account for null values.

are you using outer joins?
do you have null values checked under report options?
what are you links to the sub report?
sharona
IP IP Logged
DWT78
Newbie
Newbie


Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 3
Quote DWT78 Replybullet Posted: 11 Nov 2008 at 12:30pm
Hi Sharona,

Thanks for your suggestions.

I did not have the null values checked in v10.  I checked both options:
- Convert Database NULL values to default
- Convert other NULL values to default

I checkmarked both options, re-ran the report, but it only scrambled the data further, adding empty Support Tickets to the the Issue level.

I removed the check for "Convert Database NULL values to default" keeping "Convert other NULL values to default" and the report seems to be back to square1 where report still doesn't show subreports openm issue data when main report (Corp Company) is void of open Issues.

I am using left outer joins on all relationships, but for my amusement, I have tried all the joins

I am starting to wonder if Crystal doesn't like joining a table onto itself, but I don't see any logic as to why it would have difficulties with this.  Very puzzled..


Edited by DWT78 - 11 Nov 2008 at 12:32pm
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.016 seconds.