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

Spacing between DetailSection Items

7 Answers 813 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Swanson
Top achievements
Rank 1
Michael Swanson asked on 29 May 2007, 08:11 PM
Hi,

I have a simple report with a header section with Textboxes and a detailSection with more textboxes.  I've noticed that the vertical spacing between the records in the detailSection are very large, almost 1-2 inches.  Also there is the same large space between the header and the beginning detail record.

How can I adjust this space/padding?

Thanks.

7 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 30 May 2007, 04:57 PM
Hello Michael,

All report Sections are resizable - after you align and resize the items inside one section you can drag its bottom and adjust its height.

For example, the report designer defaults the detail section's height to 2in (if you computer uses metric measurement system this value is 3cm), but you can change this value by dragging the section's bottom or through typing the right value in Height property in Properties window.
 

Kind regards,
Ivan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Feedback
Top achievements
Rank 1
answered on 30 May 2007, 10:21 PM
This may be the place to ask, since we're talking about DetailSection height:

I need to make a grid with my DetailSection, and in some cases the text wraps within a textbox, making the DetailSection a different height for items with more text.

How can I draw a vertical line that is precisely the full height of the DetailSection, when I don't know how high the DetailSection will be until the text-wrapping occurs?

Thanks!

Matthew
0
Michael Swanson
Top achievements
Rank 1
answered on 31 May 2007, 01:39 PM
That helped, but I still see alot of space between the records.  I have set the Height on the headerSection and detailSection to 0.  My textboxes are 0.2 inch high. 

I would attach a screen shot, but it doesn't look like I can upload on this forum.  I have about 0.5 inches between the rows still.
0
Ivan
Telerik team
answered on 31 May 2007, 05:16 PM
Matthew, thank you for your question.

I have attached a sample project with a report which shows how to track the variable height of a report's text item (textBox2). You can use the text item's CanGrow property to true to make it grow in height. You can have a resizable Line to the right of text box simply by setting its RightBorder to 1mm. Let us know if this covers your scenario.

Michael, please open a support ticket and send us the source files of your report (probably named Report1.cs, Report1.Designer.cs and Report1.resx). We will investigate this problem for you. Thank you for understanding.

 
All the best,
Ivan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Feedback
Top achievements
Rank 1
answered on 31 May 2007, 06:31 PM
Ivan,

     Thank you so much for creating a sample project.  I appreciate the effort.

     Let me use your sample project to illustrate my point:
If you click here, you'll see that, although Textbox2 has a border that will grow dynamically with the text, in order to approximate a grid, I need Textbox1 to ALSO grow to be the same vertical height.

     To see this illustrated in my current project, click here.   You'll see what I'm trying to do, and how there are those annoying gaps between lines.
   
     What I'd like to do is, during the BeforeRender event, go in and resize all textboxes to be the height of the tallest one, (or more simply, to be the height of the now-resized DetailSection).  Then, the borders would take care of creating the grid.  However, I don't know how to get to that magical "BeforeRender" place.  I can't find an event handler for it.  If I use the ItemDataBound event (which I see can be used for coloring alternate DetailSection rows), the text boxes have not "grown" yet.  So using my code there is too early.

        private void detail_ExtendHeight(object sender, System.EventArgs e)  
        {  
            for (int k = 0; k < detail.Items.Count; k++)  
            {  
                if (detail.Items[k].StyleName.Equals("Border"))  
                {  
                    Telerik.Reporting.TextBox tb = (Telerik.Reporting.TextBox)detail.Items[k];  
                    tb.Height = detail.Height;  
                }  
            }  
 
        } 

     If you can show me how to modify your sample project to resize Textbox1 to the taller TextBox2, then that would take care of a HUGE problem for me!

     As always, THANK YOU!  Your support is amazing, and I cannot wait to show the project manager how great the telerik component is!!!

     Matthew
0
Feedback
Top achievements
Rank 1
answered on 02 Jun 2007, 09:44 AM
Any help?  We have a demo on Monday and I'm hoping to fix the problem before then.
0
Svetoslav
Telerik team
answered on 04 Jun 2007, 12:34 PM
Hi Matthew,

To our great regret with the v1 of Telerik Reporting there is no way of achieving a grid look and feel the way you've described. Our plans for the next version already contain a Table item that should serve your needs perfectly (this functionality will be available this fall). We tried several approaches in order to achieve your requirements, but without much success.

Regarding the BeforeRender event it's our fault for the misleading documentation. There is no such event in the Report API and we have removed the event from the docs.

Yesterday we released the Telerik Reporting 1.1 that contains updated documentation together with several major issues fixed and we suggest you to uninstall any previous versions and use the one instead.

 
Best wishes,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Michael Swanson
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Feedback
Top achievements
Rank 1
Michael Swanson
Top achievements
Rank 1
Svetoslav
Telerik team
Share this question
or