Focal Point
Help with Save Selections on my custom report?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1461084022/m/742108781

July 22, 2009, 11:49 AM
Moogle
Help with Save Selections on my custom report?
Hi Team,

This is sort of a WebFOCUS question, except that the issue I'm having is how to integrate the WF 'Save Selection' function within PMF. Hope someone can help.

To explain the issue, first I've got to describe what I've done to get here, so bear with me:

1. I have a PMF Content Page that calls a fex
2. That fex runs an HTMLFORM
3. The HTML file has some filter controls that drive two iframes with one command button
4. Each iframe runs a customized PMF template (pmf_rpt_tmplt_meas_acrdim.fex on the left and pmf_rpt_tmplt_meas_vert.fex on the right)

The end result of this is that I am able to offer more than one report on the same screen, much like a dashboard with gadgets. The difference is that I get to add a middle "control layer" that I can edit with the HTML Composer. This is more sustainable than some of my earlier approaches, such as editing the ribbon.html file (I don't like that it needs to live in \mainstreet\ since it will always get overwritten during upgrades). I lose the awesome gadget auto-resizing feature, but I built my own javascript solution to handle that. Every file lives in my \PMF_CUSTOM\ folder.

Okay, so back to the problem. Correct me if I'm wrong, but the Save Settings button is only available when your HTML file is built within the MRE, not on the APP server. If I copy my existing HTML form into the PMF MRE domain, it runs properly. However, as soon as I edit it to add the Save Settings button, I get all sorts of errors and it no longer works. I'm also worried about how the only way to retrieve the saved report is to access the My Reports tab, which PMF doesn't even have. So... how do I save the user selections on my HTML page and how do I let the user retrieve these settings?

Any ideas would be appreciated.

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
July 23, 2009, 04:52 AM
Tony A
Joey,

The thing to understand here is what degree of benefit you will get from adding the IB save button and what it achieves for you.

The basic answer (if I remember correctly) is that it puts a fex into the users custom reports folder which consists of a list of -SET commands followed by an -INCLUDE [fexname]. This means that the user doesn't actually "retrieve" their settings but just reruns the report with the variables already set - I'm not sure whether they get autoprompted (system settings taken into account of course) but that wouldn't be what you wanted owing to your custom screen?

Reading into your JS skills I would guess that the "save report" could be easily replicated by you?

If you wanted to really enable your users to retrieve their choices onto your HTML page then I would suggest using JS to read through the DOM and get all the form elements values and place them somewhere from where you could retrieve them when required.

I wrote just such a process about 4 years ago for a previous client. I collected all the settings from combobox.selectedIndex to checkbox and radio controls checked plus input values etc. etc. etc. Concatenating them into a single string as they were collected I also added report id, userid and prompted for a "filename". I then used AJAX to write all these settings to a table - I used FOCUS and SQL as sources in the two versions I had. Recalling them was a similar process but in reverse. First I prompted the user for a "filename" from within the report HTML page. Using this I could get the data from FOCUS / SQL using AJAX again because being launched from the actual report HTML page I already had the report id and also the user id (hidden). It was then a simple case of getting each control from the saved list and setting the values back to those stored.

I know it sounds a bit long winded but it worked incredibly well and I even modularised it so that it could be placed on any report HTML page with little effort.

I can't give you the code because of ownership rights (written for my client so they own the code) but I can give you the idea as that is in my ownership. If you wanted a similar process written for you, then I would be prepared to do that but I would have to charge you (it's a fair amount of work).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
July 23, 2009, 06:15 AM
Bob Jude Ferrante
Perhaps there's a feature in here for PMF? Which is more important to you?

Is it your desire to be able to have multiple gadgets/grids refresh together when parameters are selected?

Or is it more important to you that you can lay PMF gadget/grid content out in the HTML layout tool?

Or have we got it wrong?


Bob Jude Ferrante
Director of Business and Development
WebFOCUS Performance Management
Bob_Ferrante@ibi.com
917-339-5105

I'll take any questions about PMF - business or technical - anytime!

July 28, 2009, 03:27 PM
Moogle
Hi Bob,

If I could pick a feature for my very own, I'd like to be able to have one set of parameters control multiple gadgets. That feature is the only reason I went with a WF application instead of a gadget-based dashboard. In fact, since I'm wishing, I'd like to be able to add a parameter GADGET, which would control all the other gadgets. That would be amazing!


-WebFOCUS 8.2.01 on Windows
July 28, 2009, 03:45 PM
Bob Jude Ferrante
Great news. We're planning EXACTLY that capability... we call it "broadcast."

You'll shortly (in PMF 5.2.n - after 5.2.0) be able to have an entire group of gadgets respond to parm changes at once.

So you could for example have a group of the same gadget showing different metrics for last 5 quarters. If you then clicked preferences and said "show last 25 months" all the gadgets could continue showing those same metrics, but would switch to show the new time range.

The same could happen if you had a group of gadgets showing different dimension values for the same metric. Suppose you were comparing Profit or Defects or whatever for three different branches. You switch to a different metric; you're now looking at the new metric for the same three branches.

Broadcast will let you control which parameters are locked and which are changeable by the user.

We support Flex now, and let you blend Flex with non-Flex gadgets, but this will really integrate well with Flex. What's more, changes in Flex will be seamless as is the nature of Flex - the gadgets will flow from change to change and not totally re-draw. Unfortunately WebFOCUS server side graphs will still have to be redrawn and re-sent to the browser; but overall the look and feel will be that everything behaves more like a 21st century RIA.

You know that's our goal anyway.

I'd love to review the design with you as things move onward toward the 5.2. release.


Bob Jude Ferrante
Director of Business and Development
WebFOCUS Performance Management
Bob_Ferrante@ibi.com
917-339-5105

I'll take any questions about PMF - business or technical - anytime!