Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sub Report Problem Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Dawn08
Newbie
Newbie


Joined: 12 Feb 2008
Location: United States
Online Status: Offline
Posts: 22
Quote Dawn08 Replybullet Topic: Sub Report Problem
     Posted: 27 Jul 2009 at 2:21pm

I have four sub reports that I have merged into a Main report. My Group is on @Sort ( Employee Last Name + SSN#). I currently do not have any of the reports linked to one another. Each report contains employee data and not every report has an exact match of data across the four reports. In other words an employee could have data in one or two of the sub reports and not the others. My report seems to be pulling in my entire employee population. I have set a ISActive formula to try and filter the non essential employees out, but that is not working well. The big issues is I'm getting the entire four sub reports for every employees name, over and over again. Any help would be GREATLY appreciated.....I have spent hours trying to figure this out.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jul 2009 at 3:47pm

If you have a primary Key / unique record in your DB that is a on you employee table use it to link the Main report to each sub report.

Make sure each sub report is on its own GH or GF that is on the level of the @SORT field.
 
If you do not have a primary key...
Assuming all of your records have a unique SSN link each sub report to the main report on the SSN field.
 
If you do not have unique SSN per record then you can try and create the same formula field (@SORT) in each sub report and link on that.


Edited by DBlank - 27 Jul 2009 at 3:51pm
IP IP Logged
Dawn08
Newbie
Newbie


Joined: 12 Feb 2008
Location: United States
Online Status: Offline
Posts: 22
Quote Dawn08 Replybullet Posted: 28 Jul 2009 at 7:00am
Thank you !!!! I did as you indicated and it is working much better, but I have one residual problem. If the employee does not have any activity for one of the given sub-reports that section is still displaying (blank). I have the supress Blank Section checked off for each GF. Is there something else I need to do to hide the blank sections? Would a Suppress Formula under the Format Sections work?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jul 2009 at 7:09am

Right click on the Sub Report and select FOrmat Sub Report.

Click on the SubReport Tab.
Check the box for "Suppress Blank Subreprot" as True.
Did that work?
 
IP IP Logged
Dawn08
Newbie
Newbie


Joined: 12 Feb 2008
Location: United States
Online Status: Offline
Posts: 22
Quote Dawn08 Replybullet Posted: 28 Jul 2009 at 7:55am
Yes, that worked. I realy appreciate your help!!!!
This forum is worth it's weight in gold. When I think of how many hours I spent troubleshooting this issue. Again, Thank you.
IP IP Logged
Dawn08
Newbie
Newbie


Joined: 12 Feb 2008
Location: United States
Online Status: Offline
Posts: 22
Quote Dawn08 Replybullet Posted: 30 Jul 2009 at 8:05am
I have come across one more issue. I can't seem to edit the SQL now that the 4 sub-reports are linked etc. I have done a large amount of formatting from within the main report, so re-importing isn't a good option since the original version no longer matched the current sub-report. Have I backed myself into a corner? Is there a way to edit the SQL now?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Jul 2009 at 8:14am
What SQL are you referencing?
IP IP Logged
Dawn08
Newbie
Newbie


Joined: 12 Feb 2008
Location: United States
Online Status: Offline
Posts: 22
Quote Dawn08 Replybullet Posted: 30 Jul 2009 at 8:16am
The SQL attached to one of the Sub-Report, not the main report SQL.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Jul 2009 at 8:18am
A command? A view or stored procedure, a SQL expression field?
IP IP Logged
Dawn08
Newbie
Newbie


Joined: 12 Feb 2008
Location: United States
Online Status: Offline
Posts: 22
Quote Dawn08 Replybullet Posted: 30 Jul 2009 at 8:29am
A Command.
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