Hi:
A tangent: In the very old days, when HTML was first introduced, the web was supposed to lead us to the paperless office. Remember the paperless office? It was a lovely vision. And yet, what's the first thing that most folks do when they see something on a web page that they want to keep/remember?? Do they make a favorite for it?? Do they jot a little note with the relevant number of a piece of recycled paper?? Noooooo -- they go to FILE --> PRINT. Now, back to your question. Here's what I tell my students when they ask about printing control over HTML files:
There are no page breaks in the paperless office. Printing control over HTML pages is "iffy".
Initially, back in the days when HTML was being "invented", the HTML folks over at the W3C did not put ANY kind of printing controls or page breaking controls into the HTML spec. This has to do with the HTML folks at the W3C hoping that HTML was leading to the paperless office and saving paper.
When the HTML folks at the W3C came to the sinking realization that folks were printing HTML pages and clamoring for more control over printing, the place where any kind of controls were introduced (again, nothing to do with SAS) were in the CSS specification (I think it was actually CSS 2.0 standard). If you have a BROWSER that is CSS compliant and honors the page-break style property, then, when your BROWSER prints the HTML page that contains the CSS style property, you may get the CSS page-break control honored. This has nothing to do with SAS. When SAS creates HTML files, we (SAS) can't invent a page-break control. We can only use what's defined in either the CSS spec or the HTML specification. And, even if we -USE- what's defined in either specification -- SAS has no control over what browser you use to open and print the HTML file and has no control HOW the browser might or might not use the CSS style property.
Usually, if printing is important, I recommend the creation of PDF files, where
1) the file is generally uneditable unless someone has an Adobe produce
2) printing happens as the file was originally designed.
A lot of times, web designers will have a button on an HTML page for the "printable" version of the same page -- this generally turns out to be a PDF version of the page information.
If you reread my original posting to your question, I had a warning there:
Just remember that if you want to print the HTML file, that the print interface (for saving paper) is between the browser and the printer. SAS has little to no control over how the output prints -- all the printing is controlled by the browser.
Now, more about the CSS property that ODS does insert into a regular ODS HTML file. In a regular style template for ODS HTML, ODS uses a <HR> (horizontal rule) between tables to indicate a "page break" Attached to this <HR> is a <P> tag which contains the ONLY page-break control that there is,
page-break-after: always; which is the CSS style property that is described here (in the specification) on the W3C site:
http://www.w3.org/TR/CSS21/page.html#page-break-props
The relevant section from the style template STYLES.DEFAULT is shown below.
[pre]
class html
"Common HTML text used in the default style" /
'expandAll' = "<span onclick=""expandCollapse()"">"
'posthtml flyover line' = "</span><hr size=""3"">"
'prehtml flyover line' = "<span><hr size=""3"">"
'prehtml flyover bullet' = %nrstr("<span><b>·</b>")
'posthtml flyover' = "</span>"
'prehtml flyover' = "<span>"
'break' = "<br>"
'Line' = "<hr size=""3"">"
'PageBreakLine' =
"<p style=""page-break-after: always;""><br></p><hr size=""3"">"
'fake bullet' = %nrstr("<b>·</b>");[/pre]
I have never tried to change or insert a page break into an HTML file because
1) you have to know, for sure, that your users' browsers support this type of CSS
2) since each user can change print settings using the browser File --> Print controls, there's no guarantee that they'll print the HTML page in the orientation that you wanted/planned.
3) If the report user cuts and pastes from the HTML page into a Word doc (for example) and then tries to print, Word (or any other app) may or may not respect the CSS style property.
When I said that SAS had "little to no control" over printing, what I meant was that SAS and ODS put the CSS page-break-after: always; style property into the HTML file. Once the file is opened in the browser, SAS is out of the picture.
I don't know how or where or even if the HTMLPANEL tagset is inserting the page-break-after:always CSS property or how to control the insertion of the CSS information when using the HTMLPANEL tagset template. Once HTMLPANEL is in the picture, you are using panel start/finish options to arrange the tables in panels. I suspect, but do not know for sure, that the HTMLPANEL tagset might not be using the "PageBreakLine" style element, as defined in STYLES.DEFAULT. This is probably a question for Tech Support.
To open a track with Tech Support, go to
http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem". Alternately, you can go directly to the Tech Support Problem Form here:
http://support.sas.com/ctx/supportform/createForm
cynthia