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     Two table on one report.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Two table on one report.
 Login/Join
 
Gold member
posted
Good Morning/Evening,

I am stuck on this project and cannot get the clear idea of how can I do it. Ok here is what i am getting form SQL 2005.



And the user wants to see report something like this



Where M = Male and F= Female. A couple (M & F) will have one case id.

User wants to track couples attendance by class and if class was makeup or not. With number of total people attending a class.

Can someone please help me with this?

Thank you on advance.


WebFOCUS 7.7. Windows Server 2008. All Outputs.

WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
 
Posts: 60 | Registered: July 10, 2012Report This Post
Virtuoso
posted Hide Post
To little information to give a good answer
The input data from the first table is for me not found back in the output file

Is there any relation between the two.?

If so can you explain it a bit with database description.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Seems to me that this is a simple TABLE FILE

Sorting on ismakeup, class and CaseID

Define Class/Makeup Attendance

Define or Compute Married/Unmarried

You will need to workout the counts as well, this would probably be a define.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
I can't see how you are stuck. It's not really that complicated.
Your data is straightforward. You just need to define fields to add the missing pieces.
1. Group the data based on if it is a regular class or a makeup class.
2. Determine the count of people for each Session.

  
EX -LINES 14 EDAPUT MASTER,class_data,CV,FILE
FILENAME=CLASS_DATA, SUFFIX=DFIX,$
SEGNAME=CLASS_DATA,$
  FIELD=CASE_ID,   ALIAS=CLASS_ID,  A4, A4,$ 
  FIELD=ISMAKEUP,  ALIAS=ISMAKEUP,  A6, A6,$
  FIELD=CLASS,     ALIAS=CLASS,     A7, A7,$
  FIELD=ISMARRIED, ALIAS=CLASS,     A6, A6,$
  FIELD=SESSION_1, ALIAS=SESSION_1, A2, A2,$
  FIELD=SESSION_2, ALIAS=SESSION_2, A2, A2,$
  FIELD=SESSION_3, ALIAS=SESSION_3, A2, A2,$
  FIELD=SESSION_4, ALIAS=SESSION_4, A2, A2,$
  FIELD=SESSION_5, ALIAS=SESSION_5, A2, A2,$
  FIELD=SESSION_6, ALIAS=SESSION_6, A2, A2,$
  FIELD=DELIMITER, ALIAS=',',       A1, A1,$
 
 
FILEDEF CLASS_DATA DISK class_data.txt
-RUN
 
-WRITE CLASS_DATA 1111,TRUE,Class 1,FALSE,M,MF,M,M,F,MF
-WRITE CLASS_DATA 2222,TRUE,Class 2,FALSE,MF,M,MF,M,M,F
-WRITE CLASS_DATA 3333,TRUE,Class 3,FALSE,MF,F,F,M,M,MF
-WRITE CLASS_DATA 4444,FALSE,Class 4,FALSE,F,MF,F,M,F,MF
-WRITE CLASS_DATA 5555,FALSE,Class 5,FALSE,MF,MF,F,M,MF,F
-RUN
 
DEFINE FILE CLASS_DATA
MARRIED/A20 = IF (ISMARRIED EQ 'FALSE') THEN 'Unmarried' ELSE IF (ISMARRIED EQ 'TRUE') THEN 'Married' ELSE 'Unknown';
CLASS_DESC/A50 = IF (ISMAKEUP EQ 'FALSE') THEN 'Class Attendance' ELSE IF (ISMAKEUP EQ 'TRUE') THEN 'Makeup Attendance' ELSE 'Unknown';
CLASS_TITLE/A10 = IF (ISMAKEUP EQ 'FALSE') THEN 'Class' ELSE IF (ISMAKEUP EQ 'TRUE') THEN 'Makeup' ELSE 'Unknown';
SESSION_TITLE/A10 = IF (CLASS_DESC EQ 'Class Attendance') THEN 'Session' ELSE ' ';
SESSION_1_CNT/I8 = DECODE SESSION_1 ( 'MF' 2 'M' 1 'F' 1 ELSE 0);
SESSION_2_CNT/I8 = DECODE SESSION_2 ( 'MF' 2 'M' 1 'F' 1 ELSE 0);
SESSION_3_CNT/I8 = DECODE SESSION_3 ( 'MF' 2 'M' 1 'F' 1 ELSE 0);
SESSION_4_CNT/I8 = DECODE SESSION_4 ( 'MF' 2 'M' 1 'F' 1 ELSE 0);
SESSION_5_CNT/I8 = DECODE SESSION_5 ( 'MF' 2 'M' 1 'F' 1 ELSE 0);
SESSION_6_CNT/I8 = DECODE SESSION_6 ( 'MF' 2 'M' 1 'F' 1 ELSE 0);
DUMMY/A1 = '';
END
 
TABLE FILE CLASS_DATA
PRINT
   CLASS     AS ''
   CASE_ID   AS ''
   MARRIED   AS ''
   SESSION_1 AS ''
   SESSION_2 AS ''
   SESSION_3 AS ''
   SESSION_4 AS ''
   SESSION_5 AS ''
   SESSION_6 AS ''

BY CLASS_DESC NOPRINT
BY DUMMY NOPRINT 

ON CLASS_DESC SUBHEAD
"<DUMMY<+0><DUMMY<+0><DUMMY<+0><SESSION_TITLE"

ON DUMMY SUBHEAD
"<CLASS_TITLE<+0>CaseID<+0>Married/Unmarried<+0>1<+0>2<+0>3<+0>4<+0>5<+0>6"

ON CLASS_DESC SUBFOOT
"<CLASS_DESC<+0><ST.SESSION_1_CNT<+0><ST.SESSION_2_CNT<+0><ST.SESSION_3_CNT<+0><ST.SESSION_4_CNT<+0><ST.SESSION_5_CNT<+0><ST.SESSION_6_CNT"
 
ON TABLE SUBFOOT
"Total Class Attendance<+0><ST.SESSION_1_CNT<+0><ST.SESSION_2_CNT<+0><ST.SESSION_3_CNT<+0><ST.SESSION_4_CNT<+0><ST.SESSION_5_CNT<+0><ST.SESSION_6_CNT"
 
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,PAGESIZE='Letter',LEFTMARGIN=0.250000,RIGHTMARGIN=0.250000,TOPMARGIN=0.25000,BOTTOMMARGIN=0.250000,SQUEEZE=ON,ORIENTATION=PORTRAIT,$
TYPE=REPORT,FONT='ARIAL',SIZE=10,COLOR='BLACK',STYLE=NORMAL,GRID=OFF,$
TYPE=SUBHEAD,BY=CLASS_DESC,HEADALIGN=BODY,STYLE=BOLD,$
TYPE=SUBHEAD,BY=CLASS_DESC,LINE=1,ITEM=4,OBJECT=FIELD,COLSPAN=6,JUSTIFY=CENTER,$
TYPE=SUBHEAD,BY=DUMMY,HEADALIGN=BODY,STYLE=BOLD,BORDER-TOP=LIGHT,BORDER-BOTTOM=LIGHT,BORDER-BOTTOM-STYLE=DOUBLE,$
TYPE=SUBFOOT,BY=CLASS_DESC,HEADALIGN=BODY,STYLE=BOLD,BORDER-TOP=LIGHT,BORDER-BOTTOM=LIGHT,BORDER-BOTTOM-STYLE=DOUBLE,$
TYPE=SUBFOOT,BY=CLASS_DESC,LINE=1,ITEM=1,OBJECT=FIELD,COLSPAN=3,$
TYPE=TABFOOTING,HEADALIGN=BODY,STYLE=BOLD,BORDER=MEDIUM,COLOR=RED,$
TYPE=TABFOOTING,LINE=1,ITEM=1,OBJECT=TEXT,COLSPAN=3,$
ENDSTYLE
END


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Gold member
posted Hide Post
Thanks Mighty_Max,

It was really great of you to give me the code.

But my only one question is I really don't know how many session will a class have, some class might have 20 session where other might have 2 sessions. Is there a way to auto generate session.


WebFOCUS 7.7. Windows Server 2008. All Outputs.

WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
 
Posts: 60 | Registered: July 10, 2012Report This Post
Guru
posted Hide Post
You should have provided sample data that is in the same format as your data source. What is your data source? Is it a SQL table?
Please provide the master file and proper sample data.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Gold member
posted Hide Post
Thanks for your respond Might_Max.

I am getting data from SQL 2005, its a view. I wrote SQL query so I do have control over it and I can change it (if needed.

My master file looks like this :-
  FILENAME= ****CLASS_TRACKING**, SUFFIX=SQLMSS  , $
  SEGMENT=***CLASS_TRACKING****, SEGTYPE=S0, $
    FIELDNAME=EVENTID, ALIAS=eventid, USAGE=I11, ACTUAL=I4, FIELDTYPE=R, $
    FIELDNAME=CASEID, ALIAS=caseid, USAGE=I11, ACTUAL=I4, $
    FIELDNAME=TITLE, ALIAS=title, USAGE=A100V, ACTUAL=A100V,
      MISSING=ON, $
    FIELDNAME=MARRIEDIND, ALIAS=marriedind, USAGE=I11, ACTUAL=I4,
      MISSING=ON, $
    FIELDNAME=ISMAKEUP, ALIAS=isMakeup, USAGE=A1V, ACTUAL=A1V, $
    FIELDNAME=1, ALIAS=1, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=2, ALIAS=2, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=3, ALIAS=3, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=4, ALIAS=4, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=5, ALIAS=5, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=6, ALIAS=6, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=7, ALIAS=7, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=8, ALIAS=8, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=9, ALIAS=9, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=10, ALIAS=10, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=11, ALIAS=11, USAGE=A2V, ACTUAL=A2V,$
    FIELDNAME=12, ALIAS=12, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=13, ALIAS=13, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=14, ALIAS=14, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=15, ALIAS=15, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=16, ALIAS=16, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=17, ALIAS=17, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=18, ALIAS=18, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=19, ALIAS=19, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=20, ALIAS=20, USAGE=A2V, ACTUAL=A2V, $
    FIELDNAME=21, ALIAS=21, USAGE=A2V, ACTUAL=A2V,$


And correct data form is :-


Where 1 = true and 0 = false.


WebFOCUS 7.7. Windows Server 2008. All Outputs.

WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
 
Posts: 60 | Registered: July 10, 2012Report 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     Two table on one report.

Copyright © 1996-2020 Information Builders