473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to set the margins for header and footer of access reports

ammoos
100 100+
Hi Friends,

I need to set the marigin of header and footer in my access reports, like Margins 10mm on all four sides of header and footer. Please help me

Thanks Ammoos
Jun 4 '10 #1

✓ answered by ADezii

@ammoos
  1. I don't think that you can isolate Margin Settings for a Report's Header and Footer, but if you could, the syntax would be something similar to:
    Expand|Select|Wrap|Line Numbers
    1. Reports(conREPORT_NAME).Section(acHeader).LeftMargin = XXX
    2. Reports(conREPORT_NAME).Section(acFooter).LeftMargin = XXX
    3. 'etc...
  2. To programmatically modify the Margin Settings for a 'Report', you set specific Properties of the Report's Printer, keeping in mind that all settings are in Twips where 1 inch = 1440 Twips. Here is an example for you to follow:
    Expand|Select|Wrap|Line Numbers
    1. Const conREPORT_NAME As String = "rptTest"
    2. Const conTWIPS_PER_INCH As Integer = 1440
    3.  
    4. DoCmd.OpenReport conREPORT_NAME, acViewPreview
    5.  
    6. With Reports(conREPORT_NAME).Printer
    7.   .LeftMargin = 0.75 * conTWIPS_PER_INCH         '3/4 inch
    8.   .RightMargin = 0.5 * conTWIPS_PER_INCH          '1/2 inch
    9.   .TopMargin = conTWIPS_PER_INCH                  '1 inch
    10.   .BottomMargin = 1.5 * conTWIPS_PER_INCH         '1.5 inch
    11. End With

2 3647
ADezii
8,834 Expert 8TB
@ammoos
  1. I don't think that you can isolate Margin Settings for a Report's Header and Footer, but if you could, the syntax would be something similar to:
    Expand|Select|Wrap|Line Numbers
    1. Reports(conREPORT_NAME).Section(acHeader).LeftMargin = XXX
    2. Reports(conREPORT_NAME).Section(acFooter).LeftMargin = XXX
    3. 'etc...
  2. To programmatically modify the Margin Settings for a 'Report', you set specific Properties of the Report's Printer, keeping in mind that all settings are in Twips where 1 inch = 1440 Twips. Here is an example for you to follow:
    Expand|Select|Wrap|Line Numbers
    1. Const conREPORT_NAME As String = "rptTest"
    2. Const conTWIPS_PER_INCH As Integer = 1440
    3.  
    4. DoCmd.OpenReport conREPORT_NAME, acViewPreview
    5.  
    6. With Reports(conREPORT_NAME).Printer
    7.   .LeftMargin = 0.75 * conTWIPS_PER_INCH         '3/4 inch
    8.   .RightMargin = 0.5 * conTWIPS_PER_INCH          '1/2 inch
    9.   .TopMargin = conTWIPS_PER_INCH                  '1 inch
    10.   .BottomMargin = 1.5 * conTWIPS_PER_INCH         '1.5 inch
    11. End With
Jun 4 '10 #2
ammoos
100 100+
@ADezii
Thanks very much ADezii
Jun 11 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jurjen de Groot | last post by:
When printing my webpage, IE inserts a header (name of the webform + pageNr ) and a footer (URL + date) Does anyone know of a way to supress this behaviour, I'd like to print a letter / invoice...
3
by: ruca | last post by:
Can I add dinamicaly (in my code) a header and a footer for each time I want to print a web page from my web application? NOTE: The print command made for my is a click in a button that I have in...
7
by: JIM.H. | last post by:
Hello, Is it possible to change a datagrid Header and Footer text in code behind dynamically? Thanks, Jim.
1
by: Gabriel Lozano-Morán | last post by:
I was wondering if it is possible to change the header/footer (See menu file -> Page setup in IE) by using meta tags. We have a module that uses the ActivePDF Webgrabber component to generate PDF...
0
by: dkurtz | last post by:
D. Lesandrini published an article some time ago about exporting Access reports as XML, and then updating those XML reports dynamically in ..NET....
4
by: jmalvika | last post by:
Hi all, I'm trying to generate an excel report from an ASP web page using .. "response.ContentType = "application/vnd.ms-excel" .... I need to add a custom header & footer to the excel...
4
by: stevesj | last post by:
I have a web form that generates 4 or 5 printed pages of html and a few images. I know how to insert CSS page breaks. Is there a way to calculate on the server where the page will break - like...
3
by: HugeBob | last post by:
Hi All, Is it possible to access the browser's print header/footer. I want to create a printable version of a page and alter the printout's header and footer. Is this possible? Thanks!
2
by: zandiT | last post by:
hello everyone when working with access reports using the grouping sections, how do you change the title of the group header section depending on which group is being displayed. i have a report...
3
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.