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

Telerik reporting export to pdf, hide content leave the space

3 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kunal
Top achievements
Rank 1
Kunal asked on 11 Jun 2012, 06:58 AM
Hello,

I am using "telerik reporting q1 2012". I am using Telerik.Reporting.Table and dynamically try to hide them. But it leave space when export to pdf. I have also try to put it in Panel. But the same issue. Please help me on this.

Regards,
Kunal

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 12 Jun 2012, 08:48 AM
Hello Kunal,

Telerik Reporting sections/panels behavior is to keep the space they occupy no matter their child items. As a workaround our suggestion is to set the section (detail) height to a very small value in code behind just after the InitializeComponent() is called in the report's constructor. As shown in the following code snippet. This will keep your design time intact and in the same time initially will shrink the report's detail section.

public partial class Report1 : Telerik.Reporting.Report
{
    public Report1()
    {
        //
        // Required for telerik Reporting designer support
        //
        InitializeComponent();
        this.detail.Height = Unit.Pixel(1);
    }

Greetings,
Peter
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
VINEET
Top achievements
Rank 2
answered on 14 Aug 2012, 05:12 AM
Hi,
telerik i have the same problem.
I am using telerik reporting Q3 2009. Your provided code
this
.detail.Height = Unit.Pixel(1);

is not doing anything.
please help me.
thanks
0
IvanY
Telerik team
answered on 15 Aug 2012, 07:32 AM
Hello Vineet,

Perhaps something else is preventing your detail section to shrink or you have items that are in the page footer section. In order to find these items you have to select each item in the designer and set their background to some color. If the items are situated in the page footer they will remain at the bottom of the page, regardless of the height of the detail section. Also please have in mind that your report will always make at least one full page.

Kind regards,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Kunal
Top achievements
Rank 1
Answers by
Peter
Telerik team
VINEET
Top achievements
Rank 2
IvanY
Telerik team
Share this question
or