Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subreports not showing anything 1

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
CA
I have 4 subreports in my main report.
I pass in a parameter into my main report.
I link to my main report from these subreports using this parameter.
Sometimes the subreports will not pull back any records. I would still like the text fields in the Detail section to show up with blank fields beside them. But what is happening is that if no records are available, nothing shows up in the details section of that subreport.
How would I make the text fields show up weather records get pulled back or not?
Thanks
 
If you removed the link from Main Report - will you be able to see what you want previewing SUB only?
 
Howdy CRilliterate,
I am not sure what you mean by "remove link from Main Report"? Are you saying "Change Subreport Links"?
Sorry, I am kind of new at this and still learning.
 
It sounds like "Supress blank subreport" is checked in the Subreport tab of the Format editor.

1. Select the subreport in the Main report design window.
2. Right click and select Format Subreport from the popup menu.
3. Click on the Subreport tab and uncheck "Supress Blank Subreport."
4. Click OK to exit Format Editor.
5. Run report again. Your subreport headings should be visable.

If "Supress Blank Subreport" isn't checked, then the subreport may be conditionally formatted to suppress sections or headings when data is blank or null. Edit the subreport to remove any conditional formatting.

Roz Rogoff
 
Howdy roz,
The Suppress Blank Subreport wasn't checked.
I also checked all the boxes and no conditional formatting was applied to the report.
What I might try next is take the same logic and make a separate report to see if I get the same problem.
Not sure what else to try.
Thanks
 
I meant 'remove link from Main Report' ofcourse.
Then if you can see data in Print Preview - linkage problem or such. I am new too so no problem here.LOL
 
I may be misunderstanding what you mean by "text fields." Are these column headings over fields, or are these text objects in the details section, with or without embedded fields? CRilliterate's suggestion will show if the link you are using to the main report is screening out data from your subreport, but I don't know any reason why text objects wouldn't show up unless they are being suppressed in some way.

Roz
 
Howdy rosalindr,
I haven't tried removing the "Change Subreport Links" yet, but yes, my detail section has a text object that displays "Name: ",
and beside it I have another box that is populated by the query that is returned.

It is very puzzling why at least the blank fields are not shown.

I am not sure though how to go into my subreport and use the parameter that is passed into my main report?

Thanks
 
ksbigfoot,

If you double click on the subreport, Crystal opens another design tab containing the subreport. Click the refresh icon (lightening bolt or rotating arrows, depending on your version of Crystal). You will be prompted to enter the parameter you used as a link to your main report.

When you run the main report, the data for the parameter is passed to the subreport each time it appears in the Main report. If you enter the parameter data manually, when running the subreport only, you have only one instance of the parameter. But you can use this to test the subreport separately from the Main report.


Roz
 
Howdy rosalindr,
Between yours and Crilleterate, it is working.
I removed the Link between main report and subreport.
Went into subreport and selected parameter passed into main report.
It now shows the text fields with blank values beside them, which is exactly what I am looking for.

I think I will start another thread, with this question:
Instead of passing in one parameter into the main report, I have to pass in two parameters, one for the main report and one for the subreport. Is there a way to just pass in one parameter?

Thanks again, star to both of you
ksbigfoot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top