TABLE FILE CAR
PRINT
SEATS
BY CAR
ACROSS COUNTRY AS ''
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
LEFTMARGIN=0.5000000,
RIGHTMARGIN=0.5000000,
TOPMARGIN=0.2500000,
BOTTOMMARGIN=0.2500000,
PAGESIZE='LEGAL',
$
TYPE=REPORT, FONT=ARIAL, SIZE=9, $
END
-EXIT
If we run this piece, the Report comes like CAR then SEATS across COUNTRY. But, I have a requirement like the BY field TITLE 'CAR' and the ACROSSVALUES like ENGLAND, FRANCE etc. should come on the same line, not in two seperate lines.
How to get this done?This message has been edited. Last edited by: Kerry,
Thanks,
Ramkumar. WebFOCUS/Tableau Webfocus 8 / 7.7.02 Unix, Windows HTML/PDF/EXCEL/AHTML/XML/HTML5
November 08, 2011, 04:07 AM
atturhari
No straight solution to that.
See if this helps, SET ACROSSTITLE = SIDE TABLE FILE CAR PRINT SEATS BY CAR AS '' ACROSS COUNTRY AS 'CAR' ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * LEFTMARGIN=0.5000000, RIGHTMARGIN=0.5000000, TOPMARGIN=0.2500000, BOTTOMMARGIN=0.2500000, PAGESIZE='LEGAL', $ TYPE=REPORT, FONT=ARIAL, SIZE=9, $ END -EXIT
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML
November 08, 2011, 04:17 AM
Ramkumar - Webfous
Hi Hari,
Thanks for your reply... But in my case I have 5 BY Fields and 2 ACROSS fields. Then This is not possible, in that case.
Thanks,
Ramkumar. WebFOCUS/Tableau Webfocus 8 / 7.7.02 Unix, Windows HTML/PDF/EXCEL/AHTML/XML/HTML5
November 08, 2011, 09:21 AM
Edwin
use multi verb, for pdf change size to 6 to fit on one page otherwise select format EXL2K or HTML
TABLE FILE CAR SUM SEATS ACROSS COUNTRY AS '' ACROSS CAR AS '' ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * LEFTMARGIN=0.1000000, RIGHTMARGIN=0.1000000, TOPMARGIN=0.2500000, BOTTOMMARGIN=0.2500000, PAGESIZE='LEGAL', SQUEEZE=ON, $ TYPE=REPORT, FONT=ARIAL, SIZE=6, $ END
November 08, 2011, 09:39 AM
<FreSte>
Not sure what the exact request will be, but maybe you can use a technique like this:
-Fred-
TABLE FILE CAR
SUM
COMPUTE TMP/A100 =
'COMPUTE ''' | COUNTRY || '''/D12S = IF COUNTRY EQ ''' || COUNTRY || ''' THEN SEATS ELSE 0;';
BY COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLDCTRY FORMAT ALPHA
END
-RUN
TABLE FILE CAR
PRINT
-INCLUDE HLDCTRY
BY CAR
END
November 08, 2011, 03:37 PM
Waz
FreSte, interesting technique.
Has it been posted before.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
November 08, 2011, 04:02 PM
<FreSte>
No, I think it was not posted before. It was something I've used before at a customer's site.
-Fred-
November 08, 2011, 04:10 PM
Waz
I've done similar before, but never thought of generating the computes.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
November 09, 2011, 07:57 AM
Ramkumar - Webfous
Hi Waz/Freste,
Thank you for your replies. But in my case, I have more than one BY field as well as Across field. My Actual code...
TABLE FILE RPT_CAT_HOLD_PAID
SUM
PAID_AMT AS ''
BY NETWORKTYPE AS '' NOPRINT
BY ORDER_NO NOPRINT
BY LEVELFSEC AS '' NOPRINT
BY SBR_NM AS 'Subscriber Name'
BY MBR_NM AS 'Member Name'
BY MBR_UMI AS 'Member UMI'
BY SVCDAT AS 'Date of ,Service'
BY VEN_NM AS 'Provider Name'
ACROSS ORDER_SEQ AS ' ' NOPRINT
ACROSS COLUMN_TYPE1 AS ' '
END
When I try the way as Freste's code...
TABLE FILE RPT_CAT_HOLD_PAID
SUM
COMPUTE TMP/A100 =
'COMPUTE ''' | COLUMN_TYPE1 || '''/D15.2MB = IF COLUMN_TYPE1 EQ ''' || COLUMN_TYPE1 || ''' THEN PAID_AMT ELSE 0;';
BY COLUMN_TYPE1 NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLDCTRY FORMAT ALPHA
END
-RUN
TABLE FILE RPT_CAT_HOLD_PAID
SUM
-INCLUDE HLDCTRY
BY NETWORKTYPE AS '' NOPRINT
BY ORDER_NO NOPRINT
BY LEVELFSEC AS '' NOPRINT
BY SBR_NM AS 'Subscriber Name'
BY MBR_NM AS 'Member Name'
BY MBR_UMI AS 'Member UMI'
BY SVCDAT AS 'Date of ,Service'
BY VEN_NM AS 'Provider Name'
ACROSS ORDER_SEQ AS ' ' NOPRINT
END
It is not working properly... Could you please tell, where I went wrong ?
Thanks,
Ramkumar. WebFOCUS/Tableau Webfocus 8 / 7.7.02 Unix, Windows HTML/PDF/EXCEL/AHTML/XML/HTML5
November 09, 2011, 03:51 PM
Waz
Here is another suggestion.
Add a HOLD to your TABLE FILE, and see what is written.
TABLE FILE RPT_CAT_HOLD_PAID
SUM
PAID_AMT
BY NETWORKTYPE NOPRINT
BY ORDER_NO NOPRINT
BY LEVELFSEC NOPRINT
BY SBR_NM
BY MBR_NM
BY MBR_UMI
BY SVCDAT
BY VEN_NM
ACROSS ORDER_SEQ NOPRINT
ACROSS COLUMN_TYPE1
ON TABLE HOLD AS ACR_OUT
END
-RUN
? HOLD ACR_OUT
You can use the BY fields and then the ALIAS to create the next TABLE FILE, contolling the display, output format, etc. The across values have been written to the hold file.