Jump to content

Web Viewer Reporting


bruceR

This topic is 6133 days old. Please don't post here. Open a new topic instead.

Recommended Posts

The web viewer example provides a hint at what is possible with web viewer but this really seems like it ought to be ground for techniques and examples almost as prolific as custom functions.

For instance I have modified the Web Viewer Example to make it easier to configure, have multiple columns, etc and I will post it soon.

Besides styles there are various javascript features such as table sorting and (seems to me) we should be building libraries of these functions.

Link to comment
Share on other sites

OK, here it is. Features include saved configurations, turning columns on/off, naming column different from field name, choosing table occurrence and field name, etc.

More changes coming. The file is 2.4MB - too large for the limits here so you can download it at the following link.

Edited by Guest
Link to comment
Share on other sites

Lol, by soon i meant weeks. I'm in the middle of experimenting with CWP based PHP pages embedded in the web viewer to allow artificial mixed content fields and horizontal portals with some awesome results i'll be posting soon.

Link to comment
Share on other sites

  • 3 weeks later...

I've looked at your excellent file in search of a solution for my related problem and hope you'll be able to help.

I'm working on a database that stores emails that include html and I'd like users to be able to see the html version of the email stored within Filemaker. I can't find a way to do it and would appreciate any advice you could give.

Thanks

John

Link to comment
Share on other sites

  • 3 weeks later...

Lol, by soon i meant weeks. I'm in the middle of experimenting with CWP based PHP pages embedded in the web viewer to allow artificial mixed content fields and horizontal portals with some awesome results i'll be posting soon.

Well, it's over a month now; any results yet?

Link to comment
Share on other sites

I lost a lot hardware so i'm in the middle of damage control... but a promise is a promise i guess, i'll see if i can put something interesting together and post it this week.

Link to comment
Share on other sites

Wow, this really was awesome, Bruce.

This technique enabled me to produce a complex multi TO report on the same page with just a few scripts and few Web Viewers.

The alternative was several single pages with subsummary reports.

Sweet!

Thanks a lot for sharing.

Cheers,

Andreas

Link to comment
Share on other sites

This technique enabled me to produce a complex multi TO report on the same page with just a few scripts and few Web Viewers.

The alternative was several single pages with subsummary reports.

Andreas, are you just viewing the report or printing it as well. And if printing, how well does the printing work out of the web viewer?

Thanks!

James

Link to comment
Share on other sites

the reports prints beautifully

That's encouraging. From your description, this sounds like a one-page report. Have you printed multi-page reports as well? I'm just wondering about page numbers, headers and footers which I use in my conventional reports and how they would be handled in the web viewer.

I appreciate your taking the time to answer.

James

www.james-mc.com

Link to comment
Share on other sites

James, I made a single Web Viewer long enough to fit all my report data into one HTML file which enables all my individual reports room to grow. With careful page formatting I should get the page to split ok when I am done.

I had thought to put headers and footers beside the Web Viewer as it runs downward, and it should work when I get this done.

It would probably be best to incorporate the headers and footers in the HTML data, but I am not there yet, I will have to see how far I get.

Also, I wil have to find a way to stop printing when the data runs out, as the Web Viewer will span up to 12 pages (That's the max length of a FM layout as far as I can tell).

A possibility is to open the resulting HTML file in a browser and print from there, and I guess that would be the way to do it if I could get headers and footers into the file.

Suggestions would be welcome. :

Cheers,

Andreas

Link to comment
Share on other sites

Note that you can make a report table for this purpose. Well, you might have a report and report items tables. Each item record is an HTML page or pages. So basically you select all the related records and print all records. Your report can have as many pages as you want.

Link to comment
Share on other sites

Yes, that would work, but I needed the report to grow and shrink with several subsummaries and body parts in succession.

Thus, I put it all in one HTML file.

Branching out the part of the script that draws the actual report grid makes this fairly easy to do now that you have done the groundwork.

Cheers,

Andreas

Link to comment
Share on other sites

Okay... not the best example file i've ever done but i really couldn't think of anything useful to show. Its not dynamic (look at the FM list() method if you want dynamic) but shows a general way to simulate subsummary parts within an html "report".

**note that i mix and match in this file

1) sets country variable, goes to next record compares country variable

[equal to GetNthRecord( country ; get(recordnumber) - 1 ) ]

2) uses GetNthRecord(country ; get(recordnumber) + 1) to compare the value of the current record with the next record.

If you find the code hard to follow, just look at the Code tab to see the actual html (note that the < tags have been replaced with [ tags so that the code will render as text).

Also none of the pilcrows are necessary and you can just do code "blobs" as i like to call them.

EDIT NOTE: please correct webviewer source paths per Bruce's post on the next page for mac compatibility.

wv_reporting.zip

Edited by Guest
Link to comment
Share on other sites

Found that it would not display properly unless the web viewer code was modified like this.

Substitute("file:/" & Get(DesktopPath) & "code.html"; " " ; "%20")

Link to comment
Share on other sites

  • 2 months later...

Just a follow-up on my findings using this technique for HTML reporting.

Generally, the technique works well on the Mac. My reports could be long and printing and PDF worked as well as one could expect if you accept table grids to span between pages and some other minor issues. This was what caused my initial optimism about this technique.

So for the kick in the teeth:

On Windows, the whole thing breaks down if you try to print or make a PDF of a web viewer that spans more than a little over one page length. Nothing gets printed after that, not even shown in preview...

Besides, Windows printing of Web viewers produces very bad quality, the whole thing looks like badly compressed jpegs. I have reported both these issues as bugs. FM 9 behaves the same way.

As my client for this project is a Windows only operation, I was forced to come up with another solution.

I still use the technique described in this topic to produce the HTML, but now I do the PDF conversion on my website after uploading the HTML file.

The client fills in a form with the file and gets the PDF right back after submitting the form.

Using PHP/HTMLDOC enables me to do perfect page splits, headers and footers, etc just by inserting special HTML comments in Filemaker while generating the reports.

It means a few more clicks for the client to upload the file, but the result far surpasses anything Filemaker or a web browser can produce with any printing/PDF engine, as far as I can tell.

Filemaker still has a way to go before Web Viewers can stand on its own for printable reporting, imho.

Cheers,

Andreas

Link to comment
Share on other sites

This topic is 6133 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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