Link to home
Create AccountLog in
Avatar of PorterConsultingLLC
PorterConsultingLLCFlag for United States of America

asked on

Crystal Reports 10 - How do I close up a blank line in a report when a field is conditionally suppressed?

I am using Crystal Reports 10 and need to suppress fields and field titles(labels) conditionally.  This I can do through the Format Text, Common menus, but blank lines are left in the report where these suppressed fields and labels are.  How do I "tighten up" the report so that no blank spaces awkwardly appear?
Avatar of zwseemm
zwseemm

Can you describe this a little better? Are you suppressing the labels in a group or the detail?
Avatar of PorterConsultingLLC

ASKER

Mostly in the detail.  I did not create this report.  It has dozens of subreports, each set to suppress if the subreport is blank.  Some suppress some do not.  If there is any data in any field of the subreport, of course, the whole subreport shows.  I am to go through and program every field and its correlating label to suppress if the field is blank.  I have found the way to do that, but when a field and label are suppressed the space for those fields and labels remains in the report and is left blank.  I need to find a way to scroll the next label and field up into the blank space.  If there were an ASCII character for "scroll up one line" I could use chr(), but I do not find anything listed that looks feasible (probably a leftover from the old dot-matrix printer days).  I have already used the Report Options to change all Null fields to default (I assume this is "" -- empty string).
Does anyone know how to close up these spaces?  Does anyone know why some of the sections will suppress correctly when they are "blank" and some do not?  I think it has to do with having check boxes in the sections that do not suppress.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
If I uncheck the change null to default I will need to go through and program every field to 'Suppress if isnull or "" 'or I will have to program each field with the ISNULL (fieldname, "") to change each ISNULL field to an empty string before I program Suppress (fieldname = "").  

The subreports seem to be as tight as they can get and still be readable.
All sections have Suppress if blank set, but the "blank" check boxes, of course, are binary with a default of 0, so are not considered blank and cannot be suppressed using the Section Expert.

Unfortunately, the culprits seem to be subreports with multiple records for each report.  Only some fields get used in each subreport.  

Thanks.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks.  This deals with a real irritation.  I do wish I could find a way to close up those spaces, though.  These are long reports with lots of spaces.  Very frustrating.  For the subreports with less than a dozen or so empty fields this will work well.  Bless You!
I'm glad I could help, although it sounds like you're still seeing some things that aren't suppressed and I can't help wondering why.  FWIW, one thing I've found is that when a page footer section is conditionally suppressed, CR still reserves some space for it, even though that section doesn't actually show on the report.  If some of the things that you're trying to suppress are in a page footer, that might explain part of your problem.  I haven't noticed that behaviour with any other sections.

 James