Telerik Report - Why setting a text box formula will make the text box very long

1 Answer 24 Views
Rendering Report Designer (standalone)
Trey
Top achievements
Rank 1
Trey asked on 13 Mar 2024, 08:12 AM

Compare between non-delete and delete two textbox, just have value difference.

------------original report code

<TextBox Width="1in" Height="0.7cm" Left="0cm" Top="0cm" Value="=AVG(Fields.Actual_downtime_50_last)/AVG(Fields.Actual_runtime_50_last)" Format="{0:P0}" Name="textBox36" StyleName="">

<TextBox Width="1in" Height="0.609cm" Left="0cm" Top="0cm" Value="=(Fields.Actual_downtime_50_last)/&#xD;&#xA;(Fields.Actual_runtime_50_last)" Format="{0:P0}" Name="textBox37" StyleName="">

-----------after deleting value

<TextBox Width="1in" Height="0.7cm" Left="0cm" Top="0cm" Format="{0:P0}" Name="textBox36" StyleName="">

<TextBox Width="1in" Height="0.7cm" Left="0cm" Top="0cm" Format="{0:P0}" Name="textBox36" StyleName="">

-----------------------------------

I want to know how to fix this, because the final value isn't long

 

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 15 Mar 2024, 01:03 PM

Hello Trey,

Indeed, from the screenshots it looks like the text box is growing horizontally but this is not expected. Even if the value of the text box was too long, it should grow only vertically, as it does in the first column for some rows.

Perhaps there are bindings applied to the textbox/table or there is a column grouping that breaks for some reason. However, based on the existing information, I cannot pinpoint the source of the issue.

Can you share your report along with some sample data so that I can reproduce this behavior locally?

Thank you in advance.

Kind Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Trey
Top achievements
Rank 1
commented on 10 Apr 2024, 04:55 AM

Hi Momchil,

I am so sorry, I forgot to reply.

Maybe I know the problem. 

For example, expression - AVG(Fields.Actual_downtime_50_last)/AVG(Fields.Actual_runtime_50_last), if the result value is 0.1343953953546545365677647. This string value will expand the lenght of textbox. Even if I set the format to '{0:P0}', and the final value is 13% that I want to display. 

My solution is that I caculated the value in stored procedure,and outputed the string '13%' .

I don't know whether this is a problem that need to optimize. Maybe need to adjust the length of textbox after formatting.

Just FYI

Tags
Rendering Report Designer (standalone)
Asked by
Trey
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or