Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automatically adjust text size in report field

Posted on 2006-11-07
5
Medium Priority
?
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

610 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