Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Units for Crystal Width and Height adjustment Formulae ?

Hello,

Is it possible to restrict the length of a text box in crystal reports 2008 based on a value from the database (say, datafield length : 20 characters) ?

Using the 'Size and position' dialog, it is possible to set the width of the text box; however, i am unsure what units CR uses in this dialog. Is it characters, pixels , twips, etc?

If table.fieldlength = 'short or 20 characters'

then width = X units

else width = Y units

Thanks for your help !

Former Member
replied

I think you need to try something like this

if you have any field from database then in the size and position use X+2 option and write the formula like this

1440*len() it may be a bigger in size but you need to figure out how much width it is taking for each character. May be you can get that by inserting a texbox and enter one character and adjust the size to fit perfectly without any space and see how much width it is taking. It may take for example 0.08 inch for each character. By using the formula like this 1440(0.08)len()

gives you the output.

I think there might be another solution but I hope this will help you to some extent.

I still don't understand why you want to do it for the text object as it is a databse field, you can directly drag that object on to the report then the option "Tight Horizontal" will be enabled and you can use it. If it is a static text then you can adujst the width of the textbox accordingly.

Regards,

Raghavendra

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question