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

Fields that can grow. 3

Status
Not open for further replies.

McCabeTC

Programmer
Aug 6, 2003
28
0
0
US
Hi,

I have a Crystal Report where I have a "comment" field. I set it so that in design view it takes up one line, but with the option of "can grow" checked, so that if it takes more than the one line I originally gave, it will grow and display all the data. My problem is that I have other fields underneath the "comment" field, and if the comment field grows and takes more than one line, its contents appears on top of of the other fields. Is there a way of automatically shifting all the other fields down if the "comment" field grows?

I would appreciate any help you can give me on that,

Thank you,

TM
 
Hi TM,

I've found that I need to have any "can grow" fields at the end of the section. In my case, my "can grow" comments field was in group header 1. I added a second group header so I ended up with group header 1a and group header 1b. The "can grow" comments field went at the bottom of group header 1a and subsequent fields went into group header 1b.

Hope that made sense - please let me know if you need more explicit explanation/instructions!
Anne
 
Hi Anne,

Good thinking! That seems to be a great solution to the problem. I will try tomorrow morning when I come back to work. Thank you so much for your help.

TM
 
Anne:

That was worth a star. I'll add my own two cents too.

Creating additional sections is a great solution for other problems such as "rows" of data that need to be conditionally displayed when "rows" above and below do not have any such conditions.

Also, I've found that there seem to be no limit to the number of sections that can be created.
 
Crystal Reports 10, cross-tab report:

I tried to set the can grow property on the cross-tab row, but it wouldn't let me. It was grayed out. Any way to get the equivalent behavior?
 
All cells in crosstab rows are of the same height. I think your only option is to manually resize the cell to fit your longest field by dragging the borders of the field.

-LB
 
You could also set "Show Cell Margins" to off. To do this Right Click on your cross-tab, select "Cross-Tab Expert", and click on the "Customized Style Tab." Down toward the bottom you'll see "Show Cell Margins" which probably has a check next to it. Turn that off and click OK. You can then 'manually' adjust the contents of the cells with "Click and Drag."

You could also turn off the grid-lines though I don't recommend this. To do this Right Click on your cross-tab, select "Cross-Tab Expert", and click on the "Customized Style Tab." Down toward the bottom you'll see a "Format Grid Lines" button. Click that and look for a "Show Grid Lines" check box. Turn that off. Again, you can 'manually' adjust the contents of the cells with "Click and Drag."

Hope this helps.



 
Thanks, but the show cell margins and the format grid lines don't do what I'm looking for.

Let's say I have 50 rows of data, with city name being the "row name". 49 cities will fit in the default sized area, 1 won't. If I use the above methods, they let me make the default size big enough to fit all 50 names.
However, that means that the data won't fit on one page anymore. I'm really looking for a way to make the one row with the long city name grow in height, but not the other 49.
 
As far as I know (and I haven't checked versions higher than 8.0), you can't conditionally resize a row based on whether a label needs to wrap. You could consider changing the font size depending upon length of the field, however, so that you could potentially prevent wrapping. Select the row label->right click->font->size->x+2 and enter:

if len(currentfieldvalue) > 9 then 8 else 10

Change the "9" to the maximum field length that fits in the label cell, and then substitute your font sizes for 8 and 10. This would work best if you used a nonproportional font like Courier.

-LB
 
I would insert a section below footer a, footer b, etc. That way you can have a cleaner area to "grow".

 
But wouldn't that leave a blank line or would you check 'Suppress if blank'?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top