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

Trying to collapse a record when it is not filled.

Status
Not open for further replies.

mudflap

MIS
Feb 14, 2002
194
CA
I have some formulas that tell me the jobs that are currently in our printing plant. They are broken down to
jobs per sales people. How would I collapse that formula box when not populated?
 
Go to "Format Section" and click in "Suppress Blank Section". If this isn't what you are after, can you clarify a bit.
 
Hmm, ok I have about 8 sales people here on my report with
a header for each one. I have a formula below each name that does various things. Since I am low on room in the report (trying to keep it to one page) I want to be able to collapse the box below them if there is nothing in it.
And expand it when there is .'
Ie.

Currently out on proof

Peter Harrison
02-333 Tri-Graphic

Big John


Big Sally

So because there is nothing in the other boxes below each name I would like to bring it up automatically so it would look like this

Peter Harrison
02-333 Tri-Graphic

Big John
Big Sally

That way I have enough room to put our ever expanding sales staff on one page.

Thanks
Peter
 
Conditionally suppress those sections based on a forumla:

IsNull({AnyMandatoryField})

Put any valid field name in there as long as it would normally be populated with something if the record exists.

Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
I can do that, but will it collapse the field once it has been populated say with 4 records. I>E will go
close it out so it is back down to a single record ..

 
mudflap, try it and if it doesn't work, let us know what it does do and what you are trying to do. If you are just trying to get rid of blank space created from blank records, then either of the 2 given methods should work. If this is not the case, can you let us know where in the report each line is comnig from? i.e. is Big John in the details section or the Group Header? If this is in the Details section, along with more data that isn't always there, you will need to split this into 2 details sections and suppress the second one.
 
Assuming that the formula and name are in the same section:

Right click the section with the name and select insert section below.

Move the formula box into that new section.

Now use the aforementioned suppress blank section and it should resolve.

When the formula is not blank, you'll get data and whatever spacing you have within that newly created section, the name section should NOT have any space below the name.

-k kai@informeddatadecisions.com
 
What might be missing here is that the formula has to be in its own section (all by itself). You can split the section into 2 pieces (A and B) so that this formula is all by itself. Then you can suppress just the formula section using either "suppress blank section" or a suppress formula. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Ok I have over 54 different formulas in this one worksheet.
I have all the formulas in a a couple of details sections and have call formulas in the report footer area.
I tried that null formula..Doesn't seem to do anything at all.

I guess this is too big an undertaking. More then likely it is me making a mistake..I wish they had an area where you could load your file and have people look at it. Would be much easier.


You guys seem to get what I am trying to do...
Any ideas? Need more info.

Thanks
PEter
 
Which section of the report are the lines:

Peter Harrison
Big John
Big Sally

coming from? Also which section are the lines:

02-333 Tri-Graphic

and presumably the blank space coming from?

These need to be from seperate sections, whether it be that the names are from a Group section and the jobs are from the details section (or a different group) or in seperate sections within details or the same Group.

Then, all you need to do is suppress the section that produces the "02-333 Tri-Graphics" line when it is blank. This can be either done by checking the "Suppress blank section" box or clicking the "X-2" button to the right of Suppress(no drill down) and entering any formula that will be true when the line is blank and false if there is something there (as suggested by dgillz).

This is basically the same advice that has been given at least 3 times so far. If this isn't working, let us know what you are now getting.

If some of your 54 formulae are in the same section and some are causing blank lines when others are printing etc., you will need to put any that can be blank on there own in seperate sections, and suppress accordingly.
 
OK,

The 02-333 Comes from a field called Docket Number it is in the Details (a) section
The Tri-Graphics comes from field call {Client} it is in The
Details section (a) also.

There is a formula that checks another field and tells me wether the job is due today and spits out the docket number and the client name and puts it below the corresponding sales person. Some sales people have more jobs out then others. So if I leave a blank space for 5 jobs but tomorrow has nothing I am wasting space.
So if I can get area where the formula is printed to expand and collapse on its own it would same me alot time.
There are a pile more formulas that do similar things.

I have tried the Null idea on the formula box, doesn't do anything.


I have all the formulas in hidden details sections.
And the call formulas are in the report section..
Clearer???

Thanks Alot
Peter
 
A field call {To} That field tells us which sales person is responsible for the job.
My formula Picks up on the and puts it in the appropriate spot.
 
OK, but what section of the report are their names being printed from? This needs to be a seperate section to the jobs, i.e. not in details(a). If yuo are grouping on these, they will be in the Group header and there is no reason you can't suppress the details section when it is blank.
 
Details section. No grouping on anything..All my fields are in the details section.

All the fields are in Details (a).
The formulas are in Details (b) and on.
How can I move those fields out of the details section and where do I put them?
 
You need details a,b,c,d,e,f,g,h.... so that each field or formula goes in its own private section. That way an entire section can be supressed when one field is empty. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Wow that means I would need 54 or so different sections for each one of my formulas??
Will it allow that many
 
Yes it will, but you would only need that many if every one of your formulas might be blank and then should be suppressed independently of the others. If you are only concerned about a few of them you could put only those few into their own private sections. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top