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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditionally hiding a subreport 1

Status
Not open for further replies.

Catadmin

Programmer
Oct 26, 2001
3,097
US
Hey, Guys.

Trying to figure out how to what is considered supression in Crystal. I have a subreport that sometimes returns null values and sometimes returns regular values. WHen it returns null or ' ', it creates a lot of white space. Anyone know how to suppress it so that there isn't any white space?

I tried adjusting the size & the subreport properties, but it didn't work. Can you return a value from the subreport to the main report or not?

Thanks,



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Well subreports do have a visibility property, where you can set it to True, False, or an Expression. Also there is a toggle. Perhaps you can set something to look into the subreport to see if it is populated, and if not then toggle it to visibility = false? I am not sure about "returning" a value from sub to main, but I know in Access you can "delve" inside of a subreport from the main.

That's my best guess.
 
Best bet might be to just set the "No Rows" property of the subreport. You then just get a one liner (your choice of text) in place of the subreport. This needs to be set within the main report ON the subreport object.

Rgds, Geoff

"Errors have been made....Others will be blamed"

Please read FAQ222-2244 before you ask a question
 
Geoff,

No Rows property? Where do I find that and how do I set it to get the line of text in the main report?

Ookete, already have the hidden property set up, but it doesn't kill the white space left in the report. And if I set the toggle property to kill the white space, then I can't see the subreports that DO have data on them until I toggle. And if I toggle, I get back the blank subreports ... You can see why it's frustrating me, I'm sure. @=)



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
The "No Rows" property is within the standard properties of the subreport. Note - the SUBreport ie you set it on the subreport object in the main report

If this is set, instead of the subreport being shown, you see whatever text you have set in the "No Rows" property. It is in the "Data" section of properties - just above "Parameters"

Rgds, Geoff

"Errors have been made....Others will be blamed"

Please read FAQ222-2244 before you ask a question
 
Catadmin

Are you using Crystal Reports or Microsoft's Reporting Services (which this forum is for)?

The answers you are getting relate to a Reporting Services report not a Crystal report.
 
Huggyd,

Thanks, but as a former Crystal Reports guru, I do know the difference between Crystal and RS. I am indeed looking for RS answers as I've only been working with the SQL RS software for only 2 weeks.

Xlbo, thank you for the info. I just found it to the right of my screen. For some reason, it doesn't show up in the popup properties window when I right-click the subreport, which is where I was looking for it.

Appreciate the assist.



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Huggyd,

What I meant in my first post was that Crystal has a suppresion ability that doesn't leave white space in a report while SQL Reporting Services makes you jump through hoops to get rid of the white space. I apologize for confusing you.



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Catadmin - thought that might be the case but didn't want to say "the properties box in the bottom right of the screen" in case you had it docked elsewhere !!

Been using RS now for about 4 weeks myself - mainly in a report writing role rather than anything to do with the backend. Guy I'm working with has been using it for 6+ months now tho - he's quite a useful man ;-)

Rgds, Geoff

"Errors have been made....Others will be blamed"

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top