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

Expand/Contract "Details" area as needed?

Status
Not open for further replies.

modfather

MIS
Feb 15, 2000
75
US
Hi. I'm sure this question's been asked before, but have no idea how to look for it. I'm using Crystal v8 and am a bit of a newbie. I have a fairly simple report that works great, however in the detail area, I want to show certain fields when a certain condition is true. I figured out how to do the conditional display with a formula, but I don't know how to "squeeze-out" the empty space if my condition is false. For example - my report might be:

HEADER
Detail1
Detail2
Detail3

But if a certain condition is true for Detail2, I want to show:

HEADER
Detail1
Detail2
more fields
Detail3

But if expand the space to add the fields I want, I end up with:

HEADER
Detail1

Detail2
more field

Detail3

Notice the extra spacing between my detail records. Is there a way I can add data without increasing the space for my detail area?

*On a side note, does anyone know how I can prompt for my Select Expert criteria? I run this report individually for specific account numbers, but hate having to go to the Select Expert each time I run it....

Thanks!
Steve
 
Right click the details section and select insert section below.

Now place the conditional fields in details section B

Right click the section and select format section->X 2 next to the suppress and place the criteria in there when you do NOT want that data displayed.

-k
 
If you don't already 2 detail sectiona (a and b), you will want to create the second one.
In Design mode, Right click the area directly to the left of the your detail section wher the letter D is.
Choose, Insert Section below.
This creates Details B and renames the first section Details A.
Now move the extra fields (the ones you want to suppress) from Details A to Details B.
Shrink the extra space in Details A by dragging the border between A and B up.

The next step is to conditionally suppress Details B using the same condition that you are currently using to suppress those fields.
Choose Format, Section.
Highlight Details B.
Click the X+2 button next to Suppress on the Right side.
In the Editor, enter the condition that you have that needs to cause the fields to suppress.
{table.field} = True
Save and Close.
Now the whole Details B section should be suppressed when that condtion is met when you test.

For your side note, you will want to create a parameter that will prompt you for the account number and then run the report using what you entered.
Create a parameter in the Field Explorer. It should be of the same data type as your account number.
Open Report, Edit Selection Criteria, Record.
In the editor, modify the criteria that should already be in there.
Where you have had the actual account number, add your parameter field.
Your parameter should be entered like this : {?parameter_name}. Swap "parameter_name" with the name you gave your parameter.
Save and CLose.
Test it out.

~Brian
 
Thanks so much! I almost am there. The only problem is: There's two "Suppress" boxes. I assume I click one. One is labeled "Suppress (No Drill-Down)" and one is "Suppress Blank Section". I assume it's the first, but when I click the "x+2" button for my formula, I'm not sure what to put in. I entered my criteria: "if {Competition.Open} = true" but I need a "Then..." clause. Any ideas?

Also, any help on my second question would guarantee you a Christmas card in 2004! :)

Thanks!
Steve
 
You are correct, you do waht the first one, Suppress No Drill Down.
just put in the condition without the "if" like this:

{Competition.Open} = true

Take a look at the bottom of my first post. See if that helps with your second question.

~Brian
 
To have the report prompt, select Insert->Field Object->Right click parameters and select new->Name it->SDelect the appropriate field type (you didn't share this)->and check Allow multiple selections

Select Report->Edit Selection Formula->Record and place something like:

{table.field} = {?myParameter}

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top