Do not repeat Header every Page

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Do not repeat Header every Page

DynamicPDF CoreSuite for .NET (v5) Forum

 Feb 01 2009 6:32 PM
Hi,

I will generate an invoice based on an DPLX-File and my DataTable.

That works fine but I don't want that the Header-Secion repeats every Page, just show the next Record (Body) on top of the new Page and the Footer-Secion at the end of the last Page.

How can I do that?

Thanks for your help!
Marcel
 Feb 02 2009 4:59 AM
Posted by a ceTe Software moderator
Hello Marcel,

Currently the header and footers added in the dplx file will be displayed in all the pages of the PDF report. If you want to add the Header or Footer elements to some specific pages (first and last) of the report then you can do this by accessing the page using its index after generating the PDF report. You can add any page element to the page without any problem. Below is a sample code for this.

    DocumentLayout report = new DocumentLayout( @"C:\Temp\report.dplx" );
    Document document =  report.Run();
    //To access the first page
    Page page1 = document.Pages[0];
    //You can add the page elements to the first page.
    page1.Elements.Add( headerElement );
    //Save the PDF to disk
    document.Draw( @"C:\Temp\report.pdf" );

We are going to add this feature of adding conditional headers and footers in our next version of ReportWriter. You can add different header and footers for the first and last pages of the report.

Thanks,
ceTe Software Support Team.
 Feb 02 2009 7:19 AM
Hi

Thanks.

In your Example. What is "headerElement"?
Do I have to extract the "headerElement" from the DPLX-File? Something like "headerElement = myReport.Header;"

And if I add the full Header to my Page 1, I will get it twice on that page. that is not exactly what I want... :-)

Or do I have to work with 3 DPLX-Files? One for Header, Body and Footer. Building 3 Report-Documents and merge them after building to one Document? Not beautiful but can work. What do you mean?

Regards
Marcel
 Feb 02 2009 8:04 AM
Posted by a ceTe Software moderator
Hello Marcel,

The "headerElement" is a sample name used which represents any page element you wanted to add as a header to the page. You can add Label, Image etc page elements. You can also add a group of elements as header to the page.

What exactly you mean by getting the header twice? Are you adding the header elements two times to the PDF? You might be adding two times, once in dplx and once in code. You may have to add the header only once.

You do not have to work with 3 dplx files for this. You can have the dplx which generates the report and you can add the header, footer in the code using the Generator product.

Thanks,
ceTe Software Support Team.
 Feb 02 2009 8:31 AM
Hi

If I add the Header an Footer by Code, it needs a programmer to change the Header- or Footer-Layout.

My current invoice is completely code-driven (placing single labels on X/Y-Pos). If I can't use the Designer for the whole Document, it has no effect for me...

The goal is that a person without the source-code and the knowing of programming can modify the whole report (including Header + Footer).

Is there realy no property to config where the Header should by included (like ShowHeaderOnPages = first || every || last)?

Regards
Marcel
 Feb 02 2009 8:47 AM
Posted by a ceTe Software moderator
Hello Marcel,

Currently it is not possible to add the header to the first page alone using the designer. The header added in the designer will come on all the pages of the document. In order to add header to a particular page you will have to add the header in code only for now.

We are adding the feature of adding conditional header to first and last pages in the next release of our product. Currently we do not have an exact time line for its release.

Thanks,
ceTe Software Support Team.
 Feb 02 2009 9:01 AM
Hmmmm... That is hard to read....

I am waiting for that feature since the beginning of 2008.

There was a question about that in this forum (http://www.DynamicPDF.com/Forums/DisplayThread.csp?FD=14&ThreadID=1315). ceTe's Answer was "This is however a feature that can be achieved using the v5.0 of ReportWriter and Designer.  In version 5.0 you will be able to set up templates to be applied to different parts of the report.  Expect Version 5.0 to be released in the next 6 to 8 weeks."

My Customers are also waiting for a solution and I don't wanna use a different Product (like crystal or list&labels -> "blähhhh"), because I am very happy with ceTe.

Regards
Marcel
 Feb 02 2009 10:30 AM
Posted by a ceTe Software moderator
Hello Marcel,

We are going to release the Beta of v5.1 which has this feature in around 2 to 3 weeks of time. Please send an email to our Support Team if you would like to participate in Beta testing. Please let us know if you want to test the pre beta of v5.1, we can send you the pre beta without documentation in one or two days.

Thanks,
ceTe Software Support Team.
 Feb 02 2009 10:42 AM
Thanks. I wrote an Email to the support.

Regards
Marcel
 Feb 22 2011 3:13 PM
Hi,

Is it possible now, to disable the using of the Header-Part on second and following pages?

If yes, do you have a Sample or Instruction?

Thanks a lot!

Regards
Marcel
 Feb 22 2011 4:33 PM
Posted by a ceTe Software moderator
Hello Marcel,

The conditional headers and footers are supported starting from v5.1. Once you download and install the v5.1 or v6.0, navigate to the install folder and you will find a DpdfDesigner.chm help file. The documentation and instructions for “Conditional Headers and Footers” is located in “Report Properties” in the “Contents” tab of this help file.

Thanks,
ceTe Software Support Team.
 Feb 23 2011 4:39 AM
Thanks!
I will try the doc...

regards
Marcel
 Feb 23 2011 4:56 AM
Hi again,

that was pretty easy!

Now I have a conditional Header on the first Page with some Order-Header-Data. On all the other Pages I have an "empty Header".

But... can I change the size of the Header on the other Pages?
So I don't have that empty, white Block on each Page (based on the empty Header Template).

The List with the ordered Products has to start on top of each page, after the first one.

Thanks for your help!

Regards
Marcel
 Feb 23 2011 5:49 AM
Posted by a ceTe Software moderator
Hello Marcel,

Please make sure that you are setting height of the Default header to zero and this will avoid the blank space in the page of report. You can set this by using the Height property in the property window for the Default Header.

Thanks,
ceTe Software Support Team.
 Feb 23 2011 9:22 AM
Hmmm.... when I do this, the Height of the Conditional Header is also 0 and the Subreport in the Detail will be writen over the Header...

What do I wrong? Do you have an Idea?

Regards,
Marcel
 Feb 23 2011 10:58 AM
Posted by a ceTe Software moderator
Hello Marcel,

Can you please send over the DPLX file, output PDF document to our support team at support@cete.com? Also tell us exactly which blank space you are trying to avoid in the PDF document so that we can look into it further.

Thanks,
ceTe Software Support Team.
 Jun 21 2011 10:51 AM
Posted by a ceTe Software moderator
Hello,

It is not possible to set the default header height to zero as the height set to the default header will be applied to the conditional header as well. 

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 7:08 AM.