Spacing between DetailSection Items

8 posts, 0 answers
  1. Michael Swanson
    Michael Swanson avatar
    11 posts
    Member since:
    May 2005

    Posted 29 May 2007 Link to this post

    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.
  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 30 May 2007 Link to this post

    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
  3. DevCraft banner
  4. Feedback
    Feedback avatar
    15 posts
    Member since:
    May 2007

    Posted 30 May 2007 Link to this post

    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
  5. Michael Swanson
    Michael Swanson avatar
    11 posts
    Member since:
    May 2005

    Posted 31 May 2007 Link to this post

    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.
  6. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 31 May 2007 Link to this post

    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
  7. Feedback
    Feedback avatar
    15 posts
    Member since:
    May 2007

    Posted 31 May 2007 Link to this post

    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
  8. Feedback
    Feedback avatar
    15 posts
    Member since:
    May 2007

    Posted 02 Jun 2007 Link to this post

    Any help?  We have a demo on Monday and I'm hoping to fix the problem before then.
  9. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 04 Jun 2007 Link to this post

    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
Back to Top
DevCraft banner