K1200 Posted March 16, 2008 Posted March 16, 2008 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.
comment Posted March 16, 2008 Posted March 16, 2008 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.
K1200 Posted March 17, 2008 Author Posted March 17, 2008 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 ....
comment Posted March 17, 2008 Posted March 17, 2008 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.
K1200 Posted March 17, 2008 Author Posted March 17, 2008 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.
comment Posted March 17, 2008 Posted March 17, 2008 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
K1200 Posted March 17, 2008 Author Posted March 17, 2008 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?
Fenton Posted March 17, 2008 Posted March 17, 2008 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.
K1200 Posted March 17, 2008 Author Posted March 17, 2008 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?
comment Posted March 17, 2008 Posted March 17, 2008 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?
K1200 Posted March 18, 2008 Author Posted March 18, 2008 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.
comment Posted March 18, 2008 Posted March 18, 2008 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.
comment Posted March 18, 2008 Posted March 18, 2008 (edited) "TextNumberDate" & Substitute ( List ( Table::cTableRow ) ; ¶ ; "" ) & " Edited March 18, 2008 by Guest
K1200 Posted March 18, 2008 Author Posted March 18, 2008 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.
comment Posted March 18, 2008 Posted March 18, 2008 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.
K1200 Posted March 18, 2008 Author Posted March 18, 2008 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?
comment Posted March 18, 2008 Posted March 18, 2008 I'm afraid I am out of ideas. In any case, you can use the export method until you upgrade.
comment Posted March 19, 2008 Posted March 19, 2008 I believe so - but you'd better get confirmation from someone who runs it on Windows. Or check it yourself using the trial version.
Recommended Posts
This topic is 6105 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now