Focal Point
[CLOSED] App Studio Report (fex) with Chained Parameters

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6747093886

November 21, 2017, 12:53 PM
Jeff-TTC
[CLOSED] App Studio Report (fex) with Chained Parameters
I am new to WebFocus, so please bear with me.

In short, using App Studio I have created an "SQL report". This report has two parameters to prompt the user. The first is to gather the "client" they wish to report on, and the second is a sub-client called a "sponsor". Ideally I want the sub-client parameter to refresh when the client is chosen, thus I am attempting to chain these parameters.

I initially started by creating non-chained versions of these parameters using the App Studio GUI, which generated the following code:

WHERE ( ClientID EQ &ClientID.(FIND INVOICES.INVOICES.CLIENTID,INVOICES.INVOICES.CLIENTNAME IN invoices|FORMAT=I11).ClientID:. );
WHERE ( SponsorID EQ &SponsorID.(FIND INVOICES.INVOICES.SPONSORID,INVOICES.INVOICES.SPONSORNAME IN invoices|FORMAT=A8V).SponsorID:.QUOTEDSTRING );

This code works beautifully. However, while I could not find anywhere in the GUI to chain these parameters, I did find from research that they can be changed by adding the "WITHIN" element to the second parameter to reference the "parent" parameter as seen below:

WHERE ( ClientID EQ &ClientID.(FIND INVOICES.INVOICES.CLIENTID,INVOICES.INVOICES.CLIENTNAME IN invoices|FORMAT=I11).ClientID:. );
WHERE ( SponsorID EQ &SponsorID.(FIND INVOICES.INVOICES.SPONSORID,INVOICES.INVOICES.SPONSORNAME IN invoices|FORMAT=A8V,WITHIN=ClientID).SponsorID:.QUOTEDSTRING );

Unfortunately when running the report I receive the generic error message of "Internal exception processing IBFSService.runItem". Looking at the server logs this error is produced due to a Java null value exception.

In playing around with this I modified the code to remove the reference to the "display" values as follows:

WHERE ( ClientID EQ &ClientID.(FIND INVOICES.INVOICES.CLIENTID IN invoices|FORMAT=I11).ClientID:. );
WHERE ( SponsorID EQ &SponsorID.(FIND INVOICES.INVOICES.SPONSORID IN invoices|FORMAT=A8V,WITHIN=ClientID).SponsorID:.QUOTEDSTRING );

With this code the chaining works, albeit it only shows the "return" values rather than the "display" values, which renders this mostly useless. In short, how do I make this code work properly so that it displays the "display" values?

Clearly I am doing something wrong, and after days of reading through forums and other documentation I am unable to figure it out. Any insight would be very much appreciated.

Thank you in advance.

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus Server 8.2.01M
WebFocus App Studio 8.2.01M
Windows Server 2012 R2 Standard
All Outputs
November 21, 2017, 01:00 PM
BabakNYC
You can Chain parameters if you create an HTML launch page in App Studio's composer which will obviate the need for any of the changes you described in your WHERE test.


WebFOCUS 8206, Unix, Windows
November 21, 2017, 01:30 PM
Jeff-TTC
Thanks for the information. I am aware that this can be done using HTML composer, but are you saying this cannot be done in a standard SQL report? As my post indicated, it does "partially" work. If I can just get the prompts to list the display values instead of the return values then this would provide everything I need for now.

Thanks.


WebFocus Server 8.2.01M
WebFocus App Studio 8.2.01M
Windows Server 2012 R2 Standard
All Outputs
November 22, 2017, 03:24 AM
Tony A
Hi Jeff,

Welcome to the Forum.

The syntax that you show needs to have two columns returned within the FIND statement to satisfy your need to have display and return values. e.g. -

WHERE ( ClientID EQ &ClientID.(FIND INVOICES.INVOICES.CLIENTID, INVOICES.INVOICES.CLIENTNAME IN invoices|FORMAT=I11).ClientID:. );


You'll have the check whether the two columns are in the correct order because I cannot remember Frowner

Also, could you put the full version of WebFOCUS in your signature as this syntax only came in at a certain version of WebFOCUS 8 and it can help others when searching the Forum (if they ever do Frowner) for similar issues.

T

Edited to add.

Just reread the first post and realised what Jeff was saying about removing the display value. Ooops! Never a good idea to skim read Roll Eyes

This message has been edited. Last edited by: Tony A,



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 
November 22, 2017, 09:20 AM
eric.woerle
Tony,

Do you know what version of 8 this came in? I was trying to recreate this in 8.1.05 with the car file but it didn't seem to work. But it also didn't error out... So I'm thinking that it came in 8.2 possibly?


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
November 22, 2017, 10:05 AM
Tony A
Hi Eric, Unfortunatley not. I have WF 8.2.01 installed and have just tested it (I have never seen this syntax myself) and used the following code to no avail.

Hope Thanksgiving goes well!

T

TABLE FILE CAR
  SUM RCOST
      DCOST
   BY COUNTRY
   BY CAR
   BY MODEL
WHERE COUNTRY EQ &COUNTRY.(FIND COUNTRY,COUNTRY IN CAR).Country:.;
WHERE CAR     EQ &CAR.(FIND CAR,CAR IN CAR,WITHIN=COUNTRY).Car:.;
ON TABLE SET PAGE NOLEAD
END




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 
November 22, 2017, 10:11 AM
Tony A
Not sure about the syntax given in the first post, as the only thing "WITHIN=COUNTRY" provides, is an extra selection after all the individual CAR values for "WITHIN=COUNTRY".

Edited to add -

Just looked at the help files within App Studio for 8.2.01 and seaching on "Autoprompt" and then selecting the section titled "Responsive Autoprompt" (luck guess Wink), there is a fair amount there. It implies (to me anyway) that the chaining is only possible when you have a heirarchy within your synonym.

@ Chuck, if you've not already left for Thanksgiving, can you see if you can confirm my surmising above please?


T

This message has been edited. Last edited by: Tony A,



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 
November 22, 2017, 10:33 AM
eric.woerle
Thanks Tony,

Sounds like you are getting the same results as me. Maybe its new functionality coming in 8.2.02? Or maybe it just doesn't like focus tables.... I also tried finding some documentation on WITHIN in that context and came up empty. Have you seen anything? Personally I think this type of functionality is way overdue considering that IBI keeps saying that you can do MOST development in IA. This to me has always been a huge piece missing to achieve that. So I hope its coming if its not already here.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
November 22, 2017, 02:53 PM
Jeff-TTC
I read through all the responses. At this point, unless I missed something, it appears that parameter chaining is not "fully" supported within a standard SQL report. By "fully" I mean that I did get chaining to work but only when "return" values are involved. Once I try to add the "display" values it fails. That seems strange, as it clear it is trying to support chaining, but just does not make it all the way.

In any event, please let me know if this is still being investigated or if I should move on.

Thanks, as all the help is appreciated.


WebFocus Server 8.2.01M
WebFocus App Studio 8.2.01M
Windows Server 2012 R2 Standard
All Outputs
November 27, 2017, 10:41 AM
FP Mod Chuck
Tony

Chaining does not require a hierarchy defined in the metadata.

Jeff

My suggestion would be to create a hold file with the data needing to be chained or a separate external WF procedure that reads the data needing to be chained and use that


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
November 27, 2017, 12:06 PM
Tony A
quote:
Chaining does not require a hierarchy defined in the metadata.

Hi Chuck,

We are talking Chaining with Amper Autoprompting here. I know that it is not necessary when building your own launch pages via HTML composer but this is specifically Amper Autoprompting of which we speak.


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 
November 27, 2017, 12:13 PM
FP Mod Chuck
Tony

Thanks for the clarification. I will need to follow up with product management about this and will post what I find out.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
November 30, 2017, 03:46 PM
FP Mod Chuck
I have not heard anything back. It may be best to open a case and get the officai word on if this is possible.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats