Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Need to get a unique row from a hold file.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Need to get a unique row from a hold file.
 Login/Join
 
Master
posted
All,

I have a Guided Ad-Hoc application where the user choose what columns they want to sort the report by and what column they want to print on the report. The data structure is such that we go and get all the data and then only show the actual columns they have selected. If the user were to select all the columns every row would be unique. However if they do not then it looks like there are duplicate records. What I need is to be able to print a distinct row based on the columns they have selected. In a perfect world all I would have to do is
TABLE FILE ????
PRINT DISTINCT &USER_SELECTED_COLUMNS
END

Does anyone know how I could accomplish this?

WebFOCUS 8x
on a report

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




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Use SUM not PRINT and a BY

TABLE FILE ????
SUM &USER_SELECTED_COLUMNS
BY &USER_SELECTED_COLUMNS NOPRINT
END


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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Close but that would only make the vary last column of the print by hidden all the others in the &USER_SELECTED_COLUMNS still be visible. So here is what works.

The print variable has all he columns surrounded by a single quote and have the AND in between each column.

The actual variable that contains all the columns to be printed is &RP_FN01S_Detail1
The actual variable that contains all the columns to be sorted is &RP_FN01B_Sort1

Here is the solution,

 
-SET &OUTLEN = &RP_FN01S_Detail1.LENGTH;
-SET &NEWBYS = STRREP(&RP_FN01S_Detail1.LENGTH, &RP_FN01S_Detail1.QUOTEDSTRING, 7, ''' AND ''', 6, ''' BY ''', &OUTLEN, 'A&OUTLEN.EVAL');
-RUN
TABLE FILE ????
BY  &RP_FN01B_Sort1
BY &NEWBYS 
....


Thanks for your help it pointed me in the right direction.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Good.

Do not forget to edit your first post to add [SOLVED] at the subject.


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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Need to get a unique row from a hold file.

Copyright © 1996-2020 Information Builders