Focal Point
[SOLVED] Choose which columns to Repeat Sort Value

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

January 07, 2014, 04:57 PM
TRue
[SOLVED] Choose which columns to Repeat Sort Value
I have a report with 9 sort columns and I only want the values to repeat on the last 2 columns. By selecting the specific column I want to repeat and using the Repeat Sort Value button on the Format tab instead I get all 9 sort columns repeating their values.
Is there an easy way to specify just the last 2 columns to repeat, or can I specify which columns to repeat by editing the source code?
Perhaps something that says
ON TxType SET BYDISPLAY ON
and if so do I have to change the statement currently in the code saying
ON TABLE SET BYDISPLAY OFF
?

This message has been edited. Last edited by: TRue,


InfoAssist only - Version: 7703
Windows 7
Excel and PDF outputs
January 08, 2014, 12:31 AM
jvb
I guess there is no direct way to do so,but you can try following sample code.This works as required:
DEFINE FILE CAR
CNT/I3 WITH MODEL=CNT+1;
END
TABLE FILE CAR
PRINT
MODEL
BY COUNTRY
BY CNT NOPRINT
BY CAR
END


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
January 08, 2014, 06:43 AM
Twanette
This will also work:
  
TABLE FILE CAR
PRINT
CAR
MODEL
BY COUNTRY
BY CAR NOPRINT
END

i.e. make your sort field invisible, and then include it as a PRINT field as well.


WebFOCUS 8.2.06 mostly Windows Server
January 08, 2014, 11:45 AM
TRue
quote:
i.e. make your sort field invisible, and then include it as a PRINT field as well.

That worked, although in my limited experience with coding I didn't fully understand the example. I was able to just use InfoAssist to add the 2 fields to the Sum section (you refer to as PRINT). I left the fields in the Sort section and made them invisible. That kept the data in the same structure & order but allowed the 2 date & text fields to be printed on every line.
Side Note: However, if I was doing this with numerical fields instead of date & text fields I believe I would have had to change the aggregation on them so the Sum section didn't change the output from how they appeared as a sort...
But for this one, it works.
Thanks Twanette!


InfoAssist only - Version: 7703
Windows 7
Excel and PDF outputs
January 09, 2014, 05:02 AM
Twanette
Great.
In response to you Side Note:
Yes, you're quite right. Same process as per the Alpha field, but on the Sum field you would change the "aggregation" option to e.g. MAX.
No harm doing that with Alpha fields as well.


WebFOCUS 8.2.06 mostly Windows Server