| |
Data Dynamics Reports Support
Started by jason.mcnair at 08-18-2010 3:49 PM. Topic has 3 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
08-18-2010, 3:49 PM
|
jason.mcnair
Joined on 04-26-2010
Posts 47
|
|
|
Hi,
I'm wondering if there is any way to set column width to fit the largest data point to be found in the column. I'm really hoping there is something equivalent to the "CanGrow" functionality that I see on TextBoxes that will allow this to happen automatically for a column.
Failing that, is there a way this can be done programmatically?
-Jason
|
|
|
|
|
Report
|
|
|
|
08-18-2010, 8:33 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 3,015

|
Re: Dynamic Column widths
|
|
|
|
|
Hello, The table column width can't be changed at runtime. The value that is set at design time will be used. The only work around the question you posted that I can think about is the dynamic modification of the textbox's font size to fit the text.
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
08-19-2010, 6:15 PM
|
jason.mcnair
Joined on 04-26-2010
Posts 47
|
Re: Dynamic Column widths
|
|
|
|
|
Thanks Sergey. Could you please provide an example of how to perform this dynamic modification of the textbox's font size to fit the text inside the width of the column?
Thanks,
Jason
|
|
|
|
|
Report
|
|
|
|
08-19-2010, 9:34 PM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 3,015

|
Re: Dynamic Column widths
|
|
|
|
|
Hello, The algorithm of scaling the font so that the text fits in the given rectangle(textbox in our case) is well-known, you can find the detailed description over the web, for example: http://www.switchonthecode.com/tutorials/csharp-tutorial-font-scaling You can add the new function in the Code of a report. That function accepts the string to measure, the size of the textbox, the font family and returns the size of the font to set. Use the code similar to that shown in the article I pointed above. Then call that function in the expression for the Font property of a textbox. You can find more information about the report code at http://www.datadynamics.com/Help/ddReports/ddrconCustomCode.html
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
|
GrapeCity » Product Support » Data Dynamics R... » Dynamic Column widths
|
|
|
|
|