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.

View "report" with Web Viewer?

Featured Replies

I would like to be able to "publish" a set of daily summary reports once per day and have them viewable throughout the day (i.e., not try to reproduce them during the day, since starting information may have changed). I'm doing this from a runtime, so using a PDF is out (I do know about some of the third-party freeware, but I'm striving for an all-FM solution).

So, I've been considering how this might be accomplished with xml and the Web Viewer. My only experience with xml is exporting text using an xslt style sheet. As I understand it, the Web Viewer would require that the report contents be wrapped in xml. Would anyone happen to know of an example -- or a something that would outline the procedure?

Thanks for any suggestions.

You could just as well import the summary data into another table and view it in a "regular" Filemaker layout.

If you want to go through XML and web viewer, you will need to use a XSLT stylesheet during export to convert the result to HTML - there are several examples of this in the XML Examples folder that comes with the application.

  • Author

Thanks, comment.

With some trial and error(s) I was able to get the XML export method to work. For the benefit of others working on PCs, this is what I did:

In a script, I used Export Records[No dialog; "Result.htm" ; "FMPXMLRESULT" ; Unicode(UTF-8)] to generate the file.

Then I configured the Web Viewer with a custom web address of "file:/C:/My Directory /Result.htm"

The trickiest part was figuring out exactly what Web Viewer wanted as the path to the file. It wasn't the "filewin:/C:/....." that was needed to write the file. Luckily, I had encountered these idio(t)syncrasies before and just kept trying combinations.

BTW, the reason I don't want to place the results into another table and then view with a standard layout is that FileMaker's standard text presentation and scroll capability is so poor on the PC. The Web Viewer's presentation is what PC user's expect -- smooth and with a nice scroll handle. Maybe it's a different situation on the Mac.

Now if there was just a way to use Web Viewer to directly display from a table ....

Now if there was just a way to use Web Viewer to directly display from a table ....

There is - through web publishing. You don't even need the web viewer, or Filemaker at all - any browser will do. After all, the web viewer is nothing but an instance of the OS browser, with Filemaker having SOME control over it.

  • Author

I've never had occasion to look into the web publishing features, but what you suggest seems to open some interesting possibilities. I would want to stay with the FM Web Viewer to maintain what I would term "application autonomy". In other words, having a browser pop onto the scene -- with all its bells and whistles -- would confuse the user and distract from the focus of my application. But that still leaves a lot to explore.

Would you happen to know of a simple example showing how to web publish a couple of fields, which are then viewable from the same runtime? -- a sort of "starter kit"? FileMaker's section on "Publishing Databases on the Web" is a little intimidating.

Thanks again for the suggestions.

I don't think you can enable web publishing with a runtime.

However, it just occurred to me that you CAN view table data directly in a web viewer. See the attached file for a simple example. This is of course a very plain view, but it could be fancied up considerably by adding some styling code to the basic HTML. And by using a custom function instead of List(), it could be set up within the same table to view the found set.

ViewTableVW.fp7.zip

  • Author

I think I see what you're suggesting, but the example doesn't appear to work on my machine (see screen capture below). Is there another setting or component needed?

WebView.PNG

I believe this is a Windows issue with the "data:" tag. Try "about:" instead. If you can, upgrade to FileMaker 9, which I think made the "data:" tag work consistently on both platforms (though I can't find that info in my stuff here). I don't have Windows running at the moment, nor tried this; this is just info I've collected.

"

TextNumberDate" &

List ( Table::cTableRow ) &

"

  • Author

comment, I still get the identical result.

Fenton, it's ditto for a straight replacement of "data:" with "about:" in the original calc.

And it looks like I'll have to remain at 8.5 for a few more months.

Any other ideas?

I don't know the answer. AFAIK, it should work. Try downloading some other examples using the "about:" method from this section and see how your system handles them. Maybe you need a more current version of IE?

  • Author

I haven't been able to locate any relevant examples. As I mentioned previously, my only xml experience is with style sheets for exporting -- and I haven't been able to correlate anything useful from those examples. It's a bit frustrating to be so close to having a nice, new capability.

I will continue to search, but will appreciate any other suggestions of what to try or where to look for an example.

Thanks for the help so far.

My last example has nothing to do with XML. It is passing data to the browser in the URL address itself - see, for example:

http://fmforums.com/forum/showpost.php?post/214499/

and the rest of that thread.

  • Author

"

TextNumberDate" &

Substitute ( List ( Table::cTableRow ) ; ¶ ; "" ) &

"

Edited by Guest

  • Author

I gave that a try. Unfortunately, nothing changed.

I've also tried omitting the pilcrows from the field calculation, making the field a stored field and setting up a separate calculated field to hold the list -- all with no effect. Not knowing the html syntax, of course, is a big disadvantage.

Maybe someone will spot some obvious aspect of this technique and suggest a solution.

Thanks again for your help.

There is one more thing: I recall there was some mention of a length limitation. Try deleting all but a few records from the table.

  • Author

Outstanding! The good news: that was it. The bad news: that was it.

The limitation is approximately 480 characters -- which allows four sets of the sample information. I guess what we're up against is someone's guess of the maximum size of a URL -- fine for the Internet, but not good for other uses. As another test, I increased the number of characters in the very first text field and caused a failure. So the limitation is definitely Total Characters -- which puts a real damper on the whole technique.

Any ideas for a workaround? -- or is this the end of the trail?

RawView.PNG

WebView.PNG

I'm afraid I am out of ideas. In any case, you can use the export method until you upgrade.

  • Author

9.0 removes the limitation?

I believe so - but you'd better get confirmation from someone who runs it on Windows. Or check it yourself using the trial version.

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.