 | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Report Fields that Auto Shrink/Grow Hello everyone,
When creating a report of mailing labels, is it possible to make each Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10383-report-fields-that-auto-shrink-grow.html
field grow and shrink accordingly so there aren't awkward spaces
between first names and last names? I tried going into the Properties
in Design mode and setting "Can Grow" and "Can Shrink" to YES, but that
doesn't seem to do the trick. See this sample layout:
First Name Last Name
Address 1
Address 2
City State ZIP
If I size the First Name field to accomodate long names, there's an big
gap between shorter first names and the last name. If there's no first Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
name at all, there's a big space before the last name. I'd like the
field to shrink for short names, grow for long names and disappear for
no names. If there's no Address 2, I'd like the City, State, ZIP fields
to shift up accordingly. Can these be done?
Thanks a lot.
--
Viken K. http://www.vikenk.com Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Report Fields that Auto Shrink/Grow Instead of having 1 field for first name, and another for last name, Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
have 1 field for Name, and have it be an expression, that combines the
2 together. | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Report Fields that Auto Shrink/Grow Hi Viken -- To do this, open the report in design view and add an unbound
text box to the report. Set the control source to:
=[First Name] & " " & [Last Name]
Where the First Name and Last Name are the names of your fields. You could
similarly concactenate the Address1 and Address2 fields but they would appear Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
on the same line.
"vikenk@aol.com" wrote:
> Can you exand on how to do that? I'm not really knowledgeable about
> writing expressions. Thanks :>)
>
> --
> Viken K.
> http://www.vikenk.com
>
> | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Report Fields that Auto Shrink/Grow
xRoachx wrote: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
> Hi Viken -- To do this, open the report in design view and add an unbound
> text box to the report. Set the control source to:
>
> =[First Name] & " " & [Last Name]
Thanks! It worked great! I had tried plunking though it. I used the
Expression Builder to make this:
=[First Name]+[Last Name] Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
It worked, but only when there was BOTH a first name and a last name.
If one of the fields were empty, the whole expression was blank.
> You could
> similarly concactenate the Address1 and Address2 fields but they would appear
> on the same line.
This may be a dumb question, but I suppose there wouldn't be a way to
add a line break to the expression?
--
Viken K. http://www.vikenk.com | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Report Fields that Auto Shrink/Grow Ah, I assumed you would have both names...
To take care of the blanks, use the Nz function:
=Nz([First Name], " ") & " " & Nz([Last Name], " ")
Regarding the line break, this can be added by using the ASC II value but
you still have the same problem if address2 is blank.
"vikenk@aol.com" wrote: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
>
> xRoachx wrote:
> > Hi Viken -- To do this, open the report in design view and add an unbound Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
> > text box to the report. Set the control source to:
> >
> > =[First Name] & " " & [Last Name]
>
> Thanks! It worked great! I had tried plunking though it. I used the
> Expression Builder to make this:
>
> =[First Name]+[Last Name]
>
> It worked, but only when there was BOTH a first name and a last name.
> If one of the fields were empty, the whole expression was blank.
>
> > You could
> > similarly concactenate the Address1 and Address2 fields but they would appear
> > on the same line.
>
> This may be a dumb question, but I suppose there wouldn't be a way to
> add a line break to the expression?
>
> --
> Viken K.
> http://www.vikenk.com
>
> | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Report Fields that Auto Shrink/Grow
xRoachx wrote:
> Ah, I assumed you would have both names...
Thanks for the info. I think you misunderstood me, though :>) Your
original solution of using =[First Name] & " " & [Last Name] works Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
perfectly, even when one of the fields is blank.
It was *my* ealier attempt at building the expression =[First
Name]+[Last Name] that was the one that failed when one of the fields
was blank. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
I have found myself suddenly doing a buch of database "work" (it's more
like volunteer work for friends) after not having done any for a long
time. You'll be seeing me on this board a few more times :>)
--
Viken K. http://www.vikenk.com | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Report Fields that Auto Shrink/Grow No problem, I'm glad I could help. These boards are a very good resource for
answers and solutions...
"vikenk@aol.com" wrote:
>
> xRoachx wrote:
> > Ah, I assumed you would have both names...
>
> Thanks for the info. I think you misunderstood me, though :>) Your Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
> original solution of using =[First Name] & " " & [Last Name] works Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10383
> perfectly, even when one of the fields is blank.
>
> It was *my* ealier attempt at building the expression =[First
> Name]+[Last Name] that was the one that failed when one of the fields
> was blank.
>
> I have found myself suddenly doing a buch of database "work" (it's more
> like volunteer work for friends) after not having done any for a long
> time. You'll be seeing me on this board a few more times :>)
>
> --
> Viken K.
> http://www.vikenk.com
>
> | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | Panjabi Today 04:40 AM 16 Replies, 314 Views | | | | | | | | | Kirtan Yesterday 21:24 PM 0 Replies, 42 Views | | | | | | | » Books You Should Read... | | | |