Solved

Automatically adjust text size in report field

Posted on 2006-11-07
5
221 Views
Last Modified: 2006-11-18
Not sure if this is the correct area for this question.  If it isn't, please let me know where it should be posted.

We have an SQL 2005 database, and we use MS Visual Studio 2005 Pro for (RDL) report design.  I am relatively new to Visual Studio, and was hoping I could get some assistance with a small problem.  I have a textbox field on a particular report that has a fixed size, and cannot shrink or grow.  The size and position of the textbox must remain constant.  However, frequently the data in the field at report time is larger than the field constraints, and so it appears cut off.  I was hoping there was a way I could get the the text in the field to automatically resize if it's too big for the textbox.  Any ideas?
0
Comment
Question by:internetcreations
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:regbes
ID: 17890834
Hi internetcreations,

just a thought add a text box to the report with a len function of the field displayed then put conditional formatting ( i dont know if RS supports that ) on the text box you want resize dependant on the value of the len function

0
 
LVL 1

Author Comment

by:internetcreations
ID: 17891109
regbes,

Yeah,  I was figuring on using a conditional of the sort:

If Len(Fields!shname.Value) > 24 Then
    Text3.FontSize = "10pt"
Else
    Text3.FontSize = "14pt"
End If

But I'm not sure how/where to implement the conditional in my report design....
0
 
LVL 11

Expert Comment

by:regbes
ID: 17891581
cant check right now as im at home will check tomorrow and get back to you
0
 
LVL 1

Accepted Solution

by:
internetcreations earned 0 total points
ID: 17893626
Never mind, I figured it out myself.  The conditional function is 'Iif(booleanexpression, trueresult, falseresult)'.  So in my case, I set the FontSize of the Text3 object equal to 'Iif(Len(Fields!shname.Value) > 24, "10pt", "14pt")'.  That did it.

Thanks for trying to help though!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now