JVarco
asked on
Crystal RDC Resize Text Field
Using VB6 and Crystal 11.5 RDC, is it possible to determine what the width for a text field would need to be to fully display whatever text is in it? The text may vary in content, font, & size from execution to execution of the report. This is desired so that a visible border encompassing just the actual text, can be displayed.
ASKER
Thanks for the suggestion.
Some additional info I should have shared, I will know what the text is, the font, and the font size before the report is created via RDC. I really just need to know how to programmatically determine the height and length of a text line so that I can adjust the text field size.
Some additional info I should have shared, I will know what the text is, the font, and the font size before the report is created via RDC. I really just need to know how to programmatically determine the height and length of a text line so that I can adjust the text field size.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
However if you can write a DLL that can take the text and determine the size then it may be possible as there is a formula button to the right of width on the SIZE and POSITION popup.
You could call the function you wrote and have it return a size in inches as the result for you formula. Note it will not move other fields on the report so there needs to be sufficient room for the largest string or a max on the width that you control in the formula
Here is a link on how to create a Crystal User Function Library (UFL)
http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/0024f60d-751e-2b10-dea0-b1b8f4a297cf?QuickLink=index&overridelayout=true
mlmcc