Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Shrink fields Post Reply Post New Topic
Author Message
aspfun
Newbie
Newbie


Joined: 17 Jun 2010
Online Status: Offline
Posts: 27
Quote aspfun Replybullet Topic: Shrink fields
    Posted: 10 Oct 2011 at 8:54am
In detail section, I added 5 [Member Address], like [Addresss01], [Address02]...[Address05] from MemberHistory table.

In real data, member has various record. For example, some members have only one address but some members have more than 3 addresses.

I added 5 controls as below:

Address01

Address02

Address03

Address04

Address05

How to shrink detail section based on member's address records so that next section data will close detail section?

For example, if one member only has one address, detail section should only display address01 and the another 4 addresses should be supress and shrink.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 Oct 2011 at 8:09am
create a formula and have that use hard crlf (chrw(13)+chrw(10)) at the end of each viable address line, then display the formula with 'Can Grow' checked.
 
for example
local stringvar adress:="";
if not isnull({table.address1}) then adress:=adress + chrw(13) + chrw(10) +{table.address1};
//repeat for other address lines changing the field name
//display result
mid(adress, 3)  //strip off the initial crlf
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.