abc's output file templete

1

111

I created a macro which will take a report and output it in HTML format. This
works ok but i would like to put a logo and a few other things on the HTML file
before i put it on the server and make it available to our customers.

I understand you have to us a templete for this and i have created one (with
the logo and a few adjustments etc) and directed the macro to the templete file
location. - for some reason it isn't linking up with my data. the Html file
that is created is just the 'raw data'.

i even went to 'tools/options/form-reports' and under 'report templete' i put
in the name of my templete file. Still the macro produces an html with only the
Raw data.

I think i must be missing something basic as this appears to be an easy thing
to do.

ANy direction would be greatly appreciated.
 
S

Steve Schapel

111,

Did you put the full path to the template file in the Template File
argument of the OutputTo action in your macro?

Did you use the special Access tags in the html of the template file?
 
1

111

Thank's Steve,
in Access it says you can use reports as templetes. that is what i tried to do.
I created a report with a logo and some special formating and tried to save it
as a templete. It seems either i'm saving it incorrectly or this isnt' possible
to begin with???

Can you walk me though the steps required to save a report as a templete?
Thanks
Steve
 
S

Steve Schapel

Steve

No, you can't save a report as a template. A template is an HTML file.
To quote from a couple of the relevant Help topics:

About HTML template files
You can use one or more HTML template files to enhance the appearance,
consistency, and navigation of your static HTML and server-generated
HTML files. For example, you might want to include a company logo in the
header section, a company-approved background image in the body section,
and your own navigation buttons in the footer section of a static HTML
report.

An HTML template is a text file that includes HTML tags and tokens that
are unique to Microsoft Access. These tokens indicate where to insert
output and other information in the static HTML or server-generated HTML
files. See an example of an HTML template file.

When you output a table, query, form, or report, and you specify an HTML
template file in the associated Output Options dialog box, Microsoft
Access merges the HTML template file with the .html, .asp, and .htx
output files by replacing the tokens with the following.

HTML template token Replacement

<!--AccessTemplate_Title--> The name of the table, query, form, or
report placed in the title bar of the Web browser
<!--AcessTemplate_Body--> The output of the table, query, form, or report
<!--AccessTemplate_FirstPage--> An HTML anchor tag that links to the
first page of a report
<!--AccessTemplate_PreviousPage--> An HTML anchor tag that links to the
page previous to the current report page
<!--AccessTemplate_NextPage--> An HTML anchor tag that links to the next
page after the current report page
<!--AccessTemplate_LastPage--> An HTML anchor tag that links to the last
page of a report
<!--AccessTemplate_PageNumber--> The current page number

HTML template file example
<HTML>

<!--The following token places the object name in the title bar of the
Web browser.-->

<TITLE><!--AccessTemplate_Title--></TITLE>

<!--The following HTML tag creates a different background color than the
Web browser default.-->

<BODY BACKGROUND = "gray.jpg">

<!--The following token places all object output inside the <BODY> tag.-->

<!--AccessTemplate_Body-->

</BODY>

<BR><BR>

<!--The following four tokens create four navigation text buttons that
jump to the first, previous, next, and last pages of a report.-->

<A HREF = "<!--AccessTemplate_FirstPage-->">First</A>

<A HREF = "<!--AccessTemplate_PreviousPage-->">Previous</A>

<A HREF = "<!--AccessTemplate_NextPage-->">Next</A>

<A HREF = "<!--AccessTemplate_LastPage-->">Last</A>

<!--The following token inserts the text "Page n" , where n is the
current report page number.-->

<P ALIGN = CENTER>Page <!--AccessTemplate_PageNumber-->.</P>

<!--The following HTML tag adds a company logo to the bottom of the Web
page.-->

<IMG SRC = "company_logo.jpg">

</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top