This is a migrated thread and some comments may be shown as answers.

Adding text to corner of report in Silverlight Report Viewer

3 Answers 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sarah
Top achievements
Rank 1
Sarah asked on 02 Jun 2014, 10:40 PM
I'm trying to add some text to the top right corner of my report but it's causing the size of the corner to grow absurdly tall. My reports are completely dynamic but I'll narrow it down to one specific case. It has one row group and one column group that has a child. I set the corner like so

table.Corner.SetCellContent(0, 0, new TextBox
{
    //Value = "Sum",
    StyleName = "HeaderCell",
​     Height = new Unit(1),
     Width = new Unit(1),
    Style =
    {
        VerticalAlign = VerticalAlign.Top
    }

}, rIndex, cIndex);


Where rIndex and cIndex are the number of rows and columns (2 and 1 in my example). It works perfectly with the code above but if I simply uncomment the Value to try to get it to say "Sum" the Corner grows huge. Like 5 inches of blank space. I've checked in the debugger and none of my Height values have changed. Everything is set to what I specifically set it to. Please keep in mind I won't be using the designer.

3 Answers, 1 is accepted

Sort by
0
Sarah
Top achievements
Rank 1
answered on 02 Jun 2014, 10:55 PM
Sorry I should mention I'm using a Crosstab in the report.
0
Stef
Telerik team
answered on 03 Jun 2014, 03:02 PM
Hello Sarah,

The sizing issue may be a result of various reasons. The most common is lacking or improper settings for the cells' items or the Table item's rows and columns.

The size for the whole Table item, the rows, and cols should be considered with the nested items sizes.
To check the already existing logic, create the same as the desired layout using the integrated in Visual studio Report Designer, and compare the code, the sizes and the groups settings.
The best approach to verify the created report definition is to serialize it as TRDX file and open it in the Standalone Designer.

In order to provide you more accurate suggestions, please open a support ticket and send a runnable demo project, where the problem is isolated. Provide also details about the used Telerik Reporting version.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Sarah
Top achievements
Rank 1
answered on 03 Jun 2014, 05:44 PM
Thanks for your response. In putting together a sample project I found the error. I assumed if I set the width of the textbox to 1 it would grow/shrink as needed. This works for Height but for some reason setting Width = 1 was causing my problem. So I just kept track of the width it would need and used that value rather than 1. I still don't understand WHY it wigs out but at least I have a solution.
Tags
General Discussions
Asked by
Sarah
Top achievements
Rank 1
Answers by
Sarah
Top achievements
Rank 1
Stef
Telerik team
Share this question
or