Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Printing from website

Featured Replies

  • Newbies

How can we print a series of records from a FMP data base on our website, and control the page breaks, so the report looks as close as possible to a Word document, and does not break mid-record?

"How can we print a series of records from a FMP data base on our website..."

One record at a time from the browser, unless you display multiple records on the results.htm.

Formatting has been discussed in other threads in the cdml forum and the web companion forum.

This is a general HTML/web issue: forget trying to make web pages appear identical to Word or other printed documents. They cannot, unless the original doc is scanned and printed as a graphic, which is NOT an efficient way of doing it. Accept that different browsers/OS combinations will vary the look of the page, make a design that can handle these variations elegantly, and get over it.

Somebody will suggest PDF... this is another issue. Some will advocate it, others not. (I am the latter.) Try it and see how it works for you.

if you are displaying many records on one page you could use CSS (cascading style sheets) to cause a page break between each record when they are printed, if you only wanted one record printed on each page.. i have never done it myself, but i have read about how it can be done, and i am currently working on how to do it for one of my databases..

[This message has been edited by bman (edited February 06, 2001).]

CSS is not for that...

css with javascript can be used for that... i have it working on my page..

on my page i display all the records in my database.. and i have it create a page break after every three records when it is printed... that way it wont print half a record on the bottom of one page and the other half on the top of the next page.

its a very simple code i could post it if you like..

ok.. now that i am back at work, here is the code.

put this between the head tags on you page

code:


<style>

P.breakit {page-break-after: always}

</style>

then anywhere you want a new page to start when you print put this code

code:


<p class="breakit"></p>

So.. if you wanted it to break after every Record when printing then you would put the break code (<p class="breakit"></p> ) after the code that displays your record, but make sure you keep it between the [FMP-record][/FMP-record] tags..

code:


[FMP-record]

[code to display record goes here.]

<p class="breakit"></p>

[/FMP-record]

I have also made a simple javascript to go with this to make it break after every 3 records (the script can be easily changed to any number of records). With the one i am using, when i print the report of all the records i get exactly 3 records per page. Without this code it would give me a page break in awkward places giving 3 and 1/2 records per page, which would just look awful.

NOTE: This will only work in IE 4.0 and above, It will NOT work in Netscape.

NOTE II: You must be using Custom Web Publishing, this can't be dont with instant web publishing.

[ February 19, 2002, 07:51 AM: Message edited by: bman ]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.