Focal Point
[SOLVED] App Studio - Passing group variable column titles in HTML

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

June 13, 2017, 04:21 PM
Lisa Lindquist
[SOLVED] App Studio - Passing group variable column titles in HTML
Good Afternoon,

I am fairly new to app studio and I haven't had any luck in my search through the documentation for a resolution to my reporting issue.
A procedure was created using the group sort for a double pick list for use in a guided report. The procedure runs the report as expected with the column titles as defined.
The variable is passes as:
&RP_FN01B_Sort1 = 'HOLD1.PART_NO AS 'Part Number'' BY 'HOLD1.CATALOG_PART_DESC AS 'Part Desc''....

Then, when I create the double list box in HTML, the correct titles appear in the list box and it all appears to be working correctly, until I run the report. The column titles revert back to the master hold file Field Name and not the Title name.
This is the variable passes for the group sort in the HTML file:
&RP_FN01B_Sort1 = 'HOLD1.PART_NO' BY 'HOLD1.CATALOG_PART_DESC' BY '......
I'm hoping I've provided enough information for someone to assist me in resolving this matter.
Thanks.

This message has been edited. Last edited by: Lisa Lindquist,


WebFOCUS 8.2.01M3
Windows, All Outputs
June 14, 2017, 07:43 AM
MartinY
quote:

&RP_FN01B_Sort1 = 'HOLD1.PART_NO AS 'Part Number'' BY 'HOLD1.CATALOG_PART_DESC AS 'Part Desc''

From where does the titles (AS 'title') are coming from ?

quote:

&RP_FN01B_Sort1 = 'HOLD1.PART_NO' BY 'HOLD1.CATALOG_PART_DESC' BY '......

The above is what it's returned by the double list box ?
You may need to change your list box to return the values as of the first list with the AS and not only the columns name.
If you do pass only the column's name, the master file title will be displayed per default.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 14, 2017, 02:53 PM
Lisa Lindquist
I manually typed in the AS column names in text editor because they populated as the field name from the master hold file and not the Title name as expected.

TABLE FILE HOLD1
SUM
HOLD1.GROUP_BY NOPRINT
HOLD1.VALUE_NO
BY LOWEST &RP_FN01B_Sort1.(BY(,

&RP_FN01B_Sort1 = 'HOLD1.PART_NO' BY 'HOLD1.CATALOG_PART_DESC' BY '......
This is what is returned from the double list box when the HTML has been run. The report shows the column titles as PART_NO, CATALOG_PART_DESC and so on.

When I change the input control values on the HTML to include the AS I receive an error message that the HOLD1.PART_NO AS is not recognized.

Any other suggestions would be greatly appreciated.


WebFOCUS 8.2.01M3
Windows, All Outputs
June 15, 2017, 07:45 AM
MartinY
Since it seems that you are displaying your report from an HOLD file
quote:
TABLE FILE HOLD1

and assuming that TITLE attribute exist in the original master file used to create the HOLD1 file, you may need to use SET
HOLDATTR to have the titles available


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 15, 2017, 02:25 PM
Lisa Lindquist
The HOLDATTR was already SET.


WebFOCUS 8.2.01M3
Windows, All Outputs
June 15, 2017, 05:35 PM
FP Mod Chuck
Hi Lisa

You might want to try SET ASNAMES=ON at the beginning. This will cause the field names in the hold file to use the names used in the AS.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 16, 2017, 07:58 AM
Lisa Lindquist
The SET ASNAMES=ON was already set as well.


WebFOCUS 8.2.01M3
Windows, All Outputs
June 16, 2017, 08:27 AM
MartinY
You might have something else not properly done somewhere.

Please share your code (don't forget to use the code tag)

Using the following it does work as expected. In both sample, the field's TITLE (from the original master file BROKERS) is used:
-* Using SET HOLDATTR = ON
-SET &PRTFLD = 'BROKER_ID BY DEPARTMENT BY BROKER_NAME';
SET HOLDATTR = ON

TABLE FILE BROKERS
PRINT *
ON TABLE HOLD AS HLD_BROKERS
END
-RUN

TABLE FILE HLD_BROKERS
BY LOWEST &PRTFLD
END
-RUN

-* Using FORMAT FOCUS
-SET &PRTFLD = 'BROKER_ID BY DEPARTMENT BY BROKER_NAME';

TABLE FILE BROKERS
PRINT *
ON TABLE HOLD AS HLD_BROKERS FORMAT FOCUS
END
-RUN

TABLE FILE HLD_BROKERS
BY LOWEST &PRTFLD
END
-RUN



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 16, 2017, 01:25 PM
Lisa Lindquist
Thank you to all who replied to my post. I learned that there was an internal issue with the Master file that I was working with. That issue has been resolved and my report is working correctly.
I do have one last request, as this is my first post, how do I close out the post?


WebFOCUS 8.2.01M3
Windows, All Outputs
June 16, 2017, 01:48 PM
MartinY
Edit your first post then in the subject at the beginning add [SOLVED]


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007