• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Replacing a Reporting Menu System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replacing a Reporting Menu System

    We have a fairly extensive menu system (which I hate) for running custom RPG reports... Nearly ALL of these reports produce XLSX output on the IFS. All reports require some sort of input to run (Company Number and Date Ranges are very common).

    I would like to replace this entire menu system with a Nitro App that lists/runs the RPG reports, but I'm not sure where to begin. I would also like to return the XLSX output to the user's downloads folder (if that's possible).

    I considered having a table/grid that describes the report (name, category, parameters, etc?). So the user could look for the report and click on it to prompt for necessary parameters. Again, not all reports require the same parameters.

    Any suggestions from more experienced users would be greatly appreciated.

    TIA
    Greg

  • #2
    Hi Greg -

    Hope this is helpful....

    As you mentioned, have your main grid list out the available reports. The data behind this grid would also have some sort of unique key to identify the report.

    Create a form widget that contains all of the available parameters for any given report. For example, let's say you only have 2 reports (for simplicity). Report 1 requires a customer number, from date, and a to date. Report 2 requires a product number, a customer number, from date, and a to date. Your form widget would contain customer number, product number, from date, and to date.

    Next create app variables that you can use to condition the hiding/showing of your form widget fields: hideCustomer, hideProduct, hideFromDate, hideToDate, etc....

    Via the "Link To App Variables" button, link your form fields "hide" property to the appropriate app variable.

    Next, add a row click action to your list. The action will be "Call RPG Program". This RPG program will pull the unique key for the report and then set the appropriate app variables.

    Code:
    if myReport = 'REPORT1';
      SetResponse('appVar':'hideCustomer':'false');
      SetResponse('appVar':'hideProduct':'true');
      SetResponse('appVar':'hideToDate':'false');
      SetResponse('appVar':'hideFromDate':'false');
     elseif myReport = 'REPORT2';
      etc....
    endif;
    SetResponse('success':'true');
    On the "success=true" action of the RPG Call, show your Form widget. Attach a "Submit" button to your form widget which will "Call RPG Program" to create your Excel download.
    I assume this will create the file on the IFS and then you can use vvOut_file to send it back to the browser. Specify "Download" for "If Document Returned" in the Call RPG Program prompt.



    Comment

    Working...
    X