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] Fun with Compound Reports part Deux

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Fun with Compound Reports part Deux
 Login/Join
 
Platinum Member
posted
Got another special request from a customer....

I need to be able to print several compound reports in one.

Reason. The data that they want is listed on the DB2 tables horizontally, I need it to print vertically.

I was able to fix that with the OVER command and it looks great, however all the reports are stacked on top of each other, I need them next to each other in an excel sheet.

An example of report is current month totals, previous month totals, gain/loss, Change Last Number, and 12 Month percent. The only data I have is the current month, I have to calculate the reset. I was able to do that is separate reports and now I need them all in one side by side in excel....

Any help would be greatly appreciated.
Thanks

JV

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 156 | Registered: August 23, 2010Report This Post
Master
posted Hide Post
The OVER part works, but then you're stuck. OVER is just for displaying. You can not continue to work with it.

You'll probably have to find another way to make it.

...I don't really understand what you want. Can you explain a bit futher?

Perhaps a sample output?

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Expert
posted Hide Post
Ditto to:
quote:
...I don't really understand what you want. Can you explain a bit futher?
Perhaps a sample output?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
Sounds like a McGyver request to me.

If you are unfamiliar with the McGyver technique, you may want to see if you can find the Systems Journal, Vol 11 #6 from Nov/Dec 1998 on IBI web site.

I still use this to teach new programmers about McGyver.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
Not sure how to upload screen shots here so I will try to explain.

Column 1 PolType
Column 2 CurMonth
Column 3 PreMonth
Column 4 Gain/Loss

Each column is a separate report so it would be 4 compound reports printed as one side by side.


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 156 | Registered: August 23, 2010Report This Post
Gold member
posted Hide Post
Compound report in excel format can be used if these are the four seperate report to be printed in one excel sheet.The syntax could be as below:
TABLE FILE A
PRINT
COLUMN1
...
...
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END
TABLE FILE A
PRINT
COLUMN2
...
...
ON TABLE PCHOLD FORMAT EXL2K NOBREAK
END
TABLE FILE A
PRINT
COLUMN3
...
...
ON TABLE PCHOLD FORMAT EXL2K NOBREAK
END
TABLE FILE A
PRINT
COLUMN3
...
...
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
 
Posts: 82 | Registered: January 06, 2014Report This Post
Guru
posted Hide Post
Hi Jveselka,

http://forums.informationbuild...1057331/m/8961058672

To display a image, i.e. screenshot, on the forum,
1) Upload the image file to an external FTP site (e.g. www.tinypic.com, no registration needed),
2) Post the URL to the image by either: (1) clicking on the Image URL icon and insert the URL to the image, then choose alignments (left, right, etc.); or (2) wrap the URL with tags [ IMG ]URL-goes-here[ /IMG ] .
If the image file is saved on users’ local or network drive, others will not have access to that file.

Your report looks something like this?

 SET PAGE = NOLEAD

DEFINE FILE CAR
DUMMY/A1='';
END

TABLE FILE CAR
SUM RCOST BY COUNTRY
ON TABLE HOLD AS REPORT1 FORMAT HTML
END

TABLE FILE CAR
SUM DCOST 
BY DUMMY AS ''
BY MODEL
ON TABLE HOLD AS REPORT2 FORMAT HTML
END

TABLE FILE CAR
SUM DCOST 
BY CAR
HEADING
""
""
ON TABLE HOLD AS REPORT3 FORMAT HTML
END

TABLE FILE CAR
SUM RCOST 
BY DUMMY AS ''
BY MODEL
HEADING
""
""
ON TABLE HOLD AS REPORT4 FORMAT HTML
END

-RUN
SET HTMLFORMTYPE=XLS
-HTMLFORM BEGIN
<HTML>
<BODY>
<TABLE WIDTH=600>
<TR><TD>
!IBI.FIL.REPORT1;
</TD>
<TD>
!IBI.FIL.REPORT2;
</TD></TR>
<TR><TD>
!IBI.FIL.REPORT3;
</TD>
<TD>
!IBI.FIL.REPORT4;
</TD></TR>
</TABLE>
</BODY>
</HTML>
-HTLMFORM END
 

You need to do lot of styling to fill the empty cells, if you take this.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Platinum Member
posted Hide Post
If they are four reports, but you only have four columns side-by-side, why not combine the data into a single HOLD file and then run the report off the single HOLD file?
(I guess a picture would help).
Do what you need to do to create a HOLD file for the data of each column e.g.
HOLD1 has COLUMN1, HOLD2 has COLUMN2, HOLD3 has COLUMN3 and HOLD4 has COLUMN4.
Now we will use MATCH FILE to combine them:
DEFINE FILE HOLD1
SEQ_NO/I9 = SEQ_NO + 1 ;
END
DEFINE FILE HOLD2
SEQ_NO/I9 = SEQ_NO + 1 ;
END
DEFINE FILE HOLD3
SEQ_NO/I9 = SEQ_NO + 1 ;
END
DEFINE FILE HOLD4
SEQ_NO/I9 = SEQ_NO + 1 ;
END
MATCH FILE HOLD1
SUM COLUMN1
BY SEQ_NO
RUN
FILE HOLD2
SUM COLUMN2
BY SEQ_NO
RUN
FILE HOLD3
SUM COLUMN3
BY SEQ_NO
RUN
FILE HOLD4
SUM COLUMN4
BY SEQ_NO
AFTER MATCH HOLD AS HOLD9999 OLD-OR-NEW
END
-RUN
TABLE FILE HOLD9999
PRINT 
   COLUMN1
   COLUMN2
   COLUMN3
   COLUMN4
END


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Platinum Member
posted Hide Post
[IMG:left] [/IMG]

Ok, I hope this works.


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 156 | Registered: August 23, 2010Report This Post
Platinum Member
posted Hide Post
Ok it did, now I will explain...

As you can see this is how I need the report to look.

4 different reports each report using same DB2 table with different logic. The only try data I have is the data on Report 1.

I run report 2 the same way but pull last month’s date and so on, I am sure you guys see what I am doing.

Below is the code I am using to get the first two reports. I failed to mention the SQL before but I wasn’t sure it was an issue.

I can run this report as is and I get the data I need but it is all vertical.

ENGINE DB2 SET DEFAULT_CONNECTION &SYSQLDBD
SQL DB2 PREPARE SQLOUT FOR

SELECT COALESCE(SUM(A.CAS_VEH_CNT ),0) AS "CAS_VEH"
, COALESCE(SUM(A.MUT_VEH_CNT ),0) AS "MUT_VEH"
, COALESCE(SUM(A.UW_CMS_VEH_CNT),0) AS "CMS_VEH"
, COALESCE(SUM(A.CMB_VEH_CNT ),0) AS "CMB_VEH"
, COALESCE(SUM(A.CAS_UW_POL_CNT),0) AS "CAS_POL"
, COALESCE(SUM(A.MUT_POL_CNT ),0) AS "MUT_POL"
, COALESCE(SUM(A.UW_CMS_POL_CNT),0) AS "CMS_POL"
, COALESCE(SUM(A.CMB_POL_CNT ),0) AS "CMB_POL"
, A.AGT_CTY_CD AS "AGT_CTY"
, A.ACTG_DT
, A.CO_LN_TXT
, A.POL_TYPE_TXT
FROM TXMDSD.IN_PIF_AGT_RPT A
WHERE A.ACTG_DT = '2013-12-31'
AND A.CO_LN_TXT = '1A'
AND (A.POL_TYPE_TXT = '6PAP'
OR A.POL_TYPE_TXT = 'PA6P')

GROUP BY A.AGT_CTY_CD, ACTG_DT, CO_LN_TXT, POL_TYPE_TXT
WITH UR;
END
DEFINE FILE SQLOUT
TOTVEH/P13= CAS_VEH + MUT_VEH + CMS_VEH + CMB_VEH;
TOTMUT/P13= CAS_POL + MUT_POL + CMS_POL + CMB_POL;
END
TABLE FILE SQLOUT
SUM
CAS_VEH OVER
CAS_POL OVER
MUT_VEH OVER
MUT_POL OVER
CMS_VEH OVER
CMS_POL OVER
CMB_VEH OVER
CMB_POL OVER
TOTVEH OVER
TOTMUT
WHERE AGT_CTY EQ '033';
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END



ENGINE DB2 SET DEFAULT_CONNECTION &SYSQLDBD
SQL DB2 PREPARE SQLOUT FOR

SELECT COALESCE(SUM(A.CAS_VEH_CNT ),0) AS "CAS_VEH"
, COALESCE(SUM(A.MUT_VEH_CNT ),0) AS "MUT_VEH"
, COALESCE(SUM(A.UW_CMS_VEH_CNT),0) AS "CMS_VEH"
, COALESCE(SUM(A.CMB_VEH_CNT ),0) AS "CMB_VEH"
, COALESCE(SUM(A.CAS_UW_POL_CNT),0) AS "CAS_POL"
, COALESCE(SUM(A.MUT_POL_CNT ),0) AS "MUT_POL"
, COALESCE(SUM(A.UW_CMS_POL_CNT),0) AS "CMS_POL"
, COALESCE(SUM(A.CMB_POL_CNT ),0) AS "CMB_POL"
, AGT_CTY_CD AS "AGT_CTY"
, CO_LN_TXT
FROM TXMDSD.IN_PIF_AGT_RPT A
WHERE A.ACTG_DT = '2013-11-22'
AND A.CO_LN_TXT = '1A'
AND (A.POL_TYPE_TXT = '6PAP'
OR A.POL_TYPE_TXT = 'PA6P')

GROUP BY A.AGT_CTY_CD, CO_LN_TXT
WITH UR;
END
DEFINE FILE SQLOUT
TOTVEH/P13= CAS_VEH + MUT_VEH + CMS_VEH + CMB_VEH;
TOTMUT/P13= CAS_POL + MUT_POL + CMS_POL + CMB_POL;
END
TABLE FILE SQLOUT
SUM
CAS_VEH AS ‘’ OVER
CAS_POL AS ‘’ OVER
MUT_VEH AS ‘’ OVER
MUT_POL AS ‘’ OVER
CMS_VEH AS ‘’ OVER
CMS_POL AS ‘’ OVER
CMB_VEH AS ‘’ OVER
CMB_POL AS ‘’ OVER
TOTVEH AS ‘’ OVER
TOTMUT AS ‘’
WHERE AGT_CTY EQ '033';
ON TABLE PCHOLD FORMAT EXL2K CLOSE
-*ON TABLE HOLD AS CAS_PIF_DATA_2 FORMAT FOCUS INDEX CO_LN_TXT
END


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 156 | Registered: August 23, 2010Report This Post
Platinum Member
posted Hide Post
[IMG:left] [/IMG]

Here is the report I am trying to produce.


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 156 | Registered: August 23, 2010Report This Post
Platinum Member
posted Hide Post
Thanks for all the suggestions, we are currently working thru this with a modify and it seems to be working so far.

I also got some information for the MacGyver technique from Twanette, so I will check that out as well.

Thanks again


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 156 | Registered: August 23, 2010Report This Post
Expert
posted Hide Post
I would have thought that pulling the data together within your SQL would be the better solution?
SELECT COALESCE(SUM(A.CAS_VEH_CNT ),0) AS "CAS_VEH"
     , COALESCE(SUM(A.MUT_VEH_CNT ),0) AS "MUT_VEH"
     , COALESCE(SUM(A.UW_CMS_VEH_CNT),0) AS "CMS_VEH"
     , COALESCE(SUM(A.CMB_VEH_CNT ),0) AS "CMB_VEH"
     , COALESCE(SUM(A.CAS_UW_POL_CNT),0) AS "CAS_POL"
     , COALESCE(SUM(A.MUT_POL_CNT ),0) AS "MUT_POL"
     , COALESCE(SUM(A.UW_CMS_POL_CNT),0) AS "CMS_POL"
     , COALESCE(SUM(A.CMB_POL_CNT ),0) AS "CMB_POL"
     , A.AGT_CTY_CD AS "AGT_CTY"
     , A.ACTG_DT
     , A.CO_LN_TXT
     , A.POL_TYPE_TXT
     , 'This Month' AS "MONTH_VAL"
  FROM TXMDSD.IN_PIF_AGT_RPT A
 WHERE A.ACTG_DT = '2013-12-31'
   AND A.CO_LN_TXT = '1A'
   AND (A.POL_TYPE_TXT = '6PAP'
     OR A.POL_TYPE_TXT = 'PA6P')
UNION ALL
SELECT COALESCE(SUM(A.CAS_VEH_CNT ),0) AS "CAS_VEH"
     , COALESCE(SUM(A.MUT_VEH_CNT ),0) AS "MUT_VEH"
     , COALESCE(SUM(A.UW_CMS_VEH_CNT),0) AS "CMS_VEH"
     , COALESCE(SUM(A.CMB_VEH_CNT ),0) AS "CMB_VEH"
     , COALESCE(SUM(A.CAS_UW_POL_CNT),0) AS "CAS_POL"
     , COALESCE(SUM(A.MUT_POL_CNT ),0) AS "MUT_POL"
     , COALESCE(SUM(A.UW_CMS_POL_CNT),0) AS "CMS_POL"
     , COALESCE(SUM(A.CMB_POL_CNT ),0) AS "CMB_POL"
     , AGT_CTY_CD AS "AGT_CTY"
     , A.ACTG_DT
     , A.CO_LN_TXT
     , A.POL_TYPE_TXT
     , 'Last Month' AS "MONTH_VAL"
  FROM TXMDSD.IN_PIF_AGT_RPT A
 WHERE A.ACTG_DT = '2013-11-22'
   AND A.CO_LN_TXT = '1A'
   AND (A.POL_TYPE_TXT = '6PAP'
     OR A.POL_TYPE_TXT = 'PA6P')
;

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] Fun with Compound Reports part Deux

Copyright © 1996-2020 Information Builders