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

restrict size field 'can grow' based on subreport size?

Status
Not open for further replies.

ksnpc

Technical User
Joined
Jan 23, 2004
Messages
91
Location
US
Hi, I was wondering if it is possible to dynamically restrict the length of the Can Grow option. Instead of just putting a maximum of 10 lines or so, I would like to allow it to expand to the number of lines in a subreport. I created a shared numbervar in the subreport that will give a report of the number of lines, but I'm not sure what to do from there. This is an example of what I would like to see, right now it is in group header 1:

name1 subline1 Field growing
subline2 growing...
subline3 stops

name2 subline1 Field growing
subline2 growing...
subline3 growing...
subline4 stops

Does anyone know if this is possible and how to implement?

Thanks,
Shauna
 
If you right click the subreport and select format subreport->can grow

-k
 
Thanks for the reply! The subreport is already set to can grow. What I'm trying to do is restrict a field in the main report to grow only as many lines as the subreport. I was thinking that if I passed a variable back to the main report showing the number of lines in the subreport I could somehow use that value to write a formula that would be able to restrict the lines. Here's an example:

SiteName Subreport_quad Description
PineMt Q49SW Among the Three Forks of the
Q49SE Ky River, the South Fork
R49NW drainage, including the Red
R49NE Bird River, is the least
R49SE impacted from human activy.
S49NE This area has the best water

The description field (memo) is exceptionally long and it is not necessary for the user to see the whole field. So, I don't want to include a huge description when I only return a few Quads, but when there are a lot of Quads I would like to use the amount of space available for the description. If I just restrict the Can Grow to a certain number of lines then I get a lot of white space that could be put to better use.

Hope that made sense. I'll try to clarify if necessary.
 
I'm using Crystal 8.5. How can I set as default field sizes to grow and adjust to number of chars.
 
Unfortunately, although you can dynamically set the "can grow" option, you can't dynamically set the number of lines it can grow.

Lisa
 
Bummer [sad] Thanks for the info.
 
The can grow might not be what you need, and your example is of what, what you want or what you don't?

Try posting example data and expected output.

One cheat might be to create multiple sections where you're doing this display, and based on the value returned, suppress the sections that don't have the right amount of space.

So the field would be already sized in each section, and the can grow turned off.

-k
 
The example was what I want. As it is, my description field is set to only grow to 10 lines so in cases where I have 20 Quads, I have 10 lines of wasted space. And in other cases, I may only have 3 quads but still 10 lines for the description so I would prefer it not to show the 7 lines beyond where the quads are. It is the Quad info that is important and the description is just intended to be supplemental info. I would like to give as much supplemental info as possible but not exceed the length of the subreport.

This is not a huge issue, just one of those annoying little things I wish I could change. Thanks to all for the responses.
 
If you have a variable with the number of lines, maybe you can create a formula like this with the number of characters in one line of the description field,( depending of the width of the field)

left({description},@numberOfLines * numberOfCharsInOneLine)

put it besides the subreport, set it to can grow

--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top