Remove header and footer

Stimulsoft Reports.NET discussion
Post Reply
hitesh
Posts: 3
Joined: Mon Sep 01, 2008 7:47 pm
Location: Long Beach, California

Remove header and footer

Post by hitesh »

Hi,

Is there a way to remove or clear the header and footer when a user print a web report page?

For example, I create a web report and I print it. I would see on the top Page 1 of 1 and bottom the url address for the page and the date in the right hand corner. How do I remove that information?

Thank you,
-Tesh
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Remove header and footer

Post by Edward »

Hello, Tesh.

You can set Conditions property for those Header Band and Footer Band. According to values of Conditions all components on Header or/and Footer would be rendered or not either.

Thank you
hitesh
Posts: 3
Joined: Mon Sep 01, 2008 7:47 pm
Location: Long Beach, California

Remove header and footer

Post by hitesh »

Hi Edward,

So to remove the default settings of the header and footer for a browser I add the footer and header bands in design view. Right?

I added the footer and header bands...but I did not see in the conditional to render it or not, I only see that I can change the text?

Thank you,
-tesh
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Remove header and footer

Post by Edward »

I did not mean the information which is inserted automatically by the settings from the Browser. In Firefox it can be found in File - Page setup - Margins&Headers And Footers. This information is under control by the Browser and we do not have an ability to change it somehow.

We can only control Header Band and Footer Band printing inside of the report template.

But if in case of using ResponseAsPdf method of rendering on the Client machine, web response is done by the Adobe Acrobat and there is no such information in the Top and Bottom of the page when printing by default.

Thank you.
alirezaf
Posts: 12
Joined: Tue Oct 11, 2011 10:58 am

Remove header and footer

Post by alirezaf »

So Is it possible to send pdf file of report directly to printer without preview pdf file in browser?
I can print pdf file of report without any problem.with

Code: Select all

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(myWebPage, rep);
but i want to send this pdf file directly to printer without view in browser.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Remove header and footer

Post by HighAley »

Hello.
alirezaf wrote:So Is it possible to send pdf file of report directly to printer without preview pdf file in browser?
I can print pdf file of report without any problem.with

Code: Select all

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(myWebPage, rep);
but i want to send this pdf file directly to printer without view in browser.
Please, read the How to print a report without the WebViewer on a web page? article.

Thank you.
alirezaf
Posts: 12
Joined: Tue Oct 11, 2011 10:58 am

Remove header and footer

Post by alirezaf »

Hi,
I knew all method for print report!
but I want to send pdf file to printer directly without save or show it in client,because if the end user use chrome or FF browser, and print with PrintToDircet() method then a header and footer of browser print to paper,and I don't want it happens and obviously I can not disable this for all browser of my users!
Then if I can create pdf file on the fly and send it directly to printer without save it to client computer then this my problem solved.
do you have any solution for this problem?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Remove header and footer

Post by HighAley »

Hello.

In one of our latest builds was added a new Export Settings property.

Code: Select all

Stimulsoft.Report.Export.StiPdfExportSettings.AutoPrintMode
Which your could use with next method overload:

Code: Select all

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(System.Web.UI.Page page, Stimulsoft.Report.StiReport report, bool openDialog, Stimulsoft.Report.Export.StiPdfExportSettings settings)
Also, please, read next QA: http://stackoverflow.com/questions/2051 ... he-browser

Thank you.
Post Reply