Print Page | Close Window

Subreport not showing data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15798
Printed Date: 01 May 2024 at 11:02pm


Topic: Subreport not showing data
Posted By: tin337
Subject: Subreport not showing data
Date Posted: 05 Mar 2012 at 9:44am
Hi -- I'm in need of some help with a report that someone else created and is not here anymore.
 
This report have a main report and a sub-report. The subreport's parameters are linked to the main report's values. The main report seems to work fine, but the data set for the subreport is not displaying.
 
I trying running the subreport by it's self and still no data showing, when I go into the design view of the subreport and click on browse data, it does return the correct data set.
 
I'm not an advance user of CR and have never use subreports before, so any insights and help is greatly appreciated.
 
I'm currently using CR 2008
 
thx...



Replies:
Posted By: DBlank
Date Posted: 05 Mar 2012 at 11:51am
check the sub report links
check the sub report select statement


Posted By: tin337
Date Posted: 05 Mar 2012 at 12:16pm
All the report links look correct to me, they are referencing all the correct data points, and there is no select statement in the subreport, it's a strait data pull from a DB table that contains only 25 lines.


Posted By: DBlank
Date Posted: 05 Mar 2012 at 12:21pm

1. where is the subreport located in the main report? If it is in a group section what is the grouped on architecture?

2. What are you linking on?
 


Posted By: tin337
Date Posted: 05 Mar 2012 at 12:39pm
It's linking on a year field and an ID field.
The subreport is located in a group #3 of the group section.
 
again, it seems to be pulling the data because when I'm in the desgin view and browse data, I see the data, it just won't display the data in preview mode.


Posted By: DBlank
Date Posted: 06 Mar 2012 at 6:15am

I would start by altering or removing the links one at a time and then the select statement parts (in the subreport) one at a time. Refresh after each change to see if any of these make data appear at all. Just becasue they look right does not mean thay are acting as intended and singluar chanegs make for a decent way to check for an issue.

Note that placing the subreport in Group 3 will pass the year field value and the ID field value for the first or last record of that group (first if in the Gheader, last if in the Gfooter). If you drag those fields in the main reports gh or gf you can verify this is the value per group that you want to pass/link on in each run of the subreport
 
Only other culprit I can think of off hand would be section expert suppression formulas.


Posted By: tin337
Date Posted: 06 Mar 2012 at 11:26am

Yep, that was the first thing I tried. Broke down the report to simple pieces to see if it was a linkage issue or an issue with the subreport, but with no luck, was unable to find anything.

But thank you for your time in trying to help, if you can think of anything else, it would be much appreciated.

Thanks…

 



Posted By: DBlank
Date Posted: 06 Mar 2012 at 11:34am
what is the select statement in the subreport?


Posted By: tin337
Date Posted: 06 Mar 2012 at 12:01pm
There is no select statement, it's data pull directly from the database table.


Posted By: DBlank
Date Posted: 07 Mar 2012 at 4:02am
usually a link will create a parameter in the sub report ({?pm-xxxxx}) and use that in the select statement.


Posted By: lockwelle
Date Posted: 07 Mar 2012 at 4:55am
and one would think that there is some select statement...based on the parameter.
 
I guess you could display the whole table, but then there wouldn't be a parameter to link to per se


Posted By: tin337
Date Posted: 07 Mar 2012 at 1:43pm

the subreport pull from a table that have only 25 rows of records, so there really is no need to have a select statement for the subreport other than when trying to link to the main report.

as for the linked parameters, they were created during the linkage between the main report and the subreport.
 
  mailto:%7b?Pm-?@CurrentYear - {?Pm-?@CurrentYear }
 
 



Print Page | Close Window