Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Coordinated Report with SQL Pass-through
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Coordinated Report with SQL Pass-through
 Login/Join
 
Platinum Member
posted
Does WF 8.2 not support Coordinated Reports with SQL Pass-through code?
My syntax matches the example in the "Creating Reports with WebFOCUS Language" document for the compound layout component. While the example from the text works in AppStudio for me, my report doesn't and I'm wondering if it is because my data source is SQL and not a master file.

Their example (okay, not exact - I changed theirs to make sure the relative positioning worked):
 COMPOUND LAYOUT PCHOLD FORMAT PDF
SECTION=S1, LAYOUT=ON, MERGE=ON, ORIENTATION=LANDSCAPE, $
PAGELAYOUT=1, $
COMPONENT=Sales, TYPE=REPORT, POSITION=(1 1), DIMENSION=(* *), $
COMPONENT=Units, TYPE=REPORT, POSITION=(+4.1500 +0.00), DIMENSION=(* *), RELATIVE-TO=Sales, RELATIVE-POINT=TOP-RIGHT, POSITION-POINT=TOP-LEFT,  $
END
SET COMPONENT=Sales
TABLE FILE GGSALES 

...

Mine:
 COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, MERGE=ON, ORIENTATION=LANDSCAPE, PAGESIZE=LEGAL,$
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', BOTTOMMARGIN=0.5, TOPMARGIN=0.5, $
COMPONENT='report1', TEXT='report1', POSITION=(0.500 0.625), DIMENSION=(* *), $
COMPONENT='report2', TEXT='report2', POSITION=(+0.500 +0.25), DIMENSION=(* *), RELATIVE-TO='report1', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT,  $
COMPONENT='report3', TEXT='report3', POSITION=(+0.500 +0.25), DIMENSION=(* *), RELATIVE-TO='report2', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT,  $
END

SET COMPONENT='report1'
ENGINE SQLMSS SET DEFAULT_CONNECTION SQL_Reporting
SQL SQLMSS PREPARE SQLOUT FOR 

...

I made sure each of my component reports has the exact same BY to be coordinated. But when I run mine, I get each report on a separate page, not coordinated at all. Frowner

Ideas?

Thanks!

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


WebFOCUS 8.2.03
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 129 | Location: Indiana | Registered: December 05, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
if it is because my data source is SQL and not a master file.
If that was the case, then you can hold your SQL Passthru results in a hold file with a master and use that held master to do what's needed.

Or reference the SQL Passthru / hold file fex and reference that in the coordinated report instead of using the inline fex.

I, we, would need more definitions as to what it is that you're required to display as the final result.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
It's not clear from your snipped code sample but are you using the SQLOUT in a TABLE FILE?

ie

 
ENGINE SQLMSS SET DEFAULT_CONNECTION SQL_Reporting
SQL SQLMSS PREPARE SQLOUT FOR 
{some sql code}
END
TABLE FILE SQLOUT
PRINT *
BY MY_SORT
ON TABLE PCHOLD FORMAT PDF
END

Also for the coordination report to work you need a common sort field in each component

Hope that helps

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 241 | Location: Melbourne, Australia | Registered: February 07, 2007Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Yes, I'm using the SQLOUT in a TABLE FILE. I am using the same field in the first BY statement of each report, which I thought would make the coordinated report thing work, but it isn't.

Basically, I have this:
  
 COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, MERGE=ON, ORIENTATION=LANDSCAPE, PAGESIZE=LEGAL,$
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', BOTTOMMARGIN=0.5, TOPMARGIN=0.5, $
COMPONENT='report1', TEXT='report1', POSITION=(0.500 0.625), DIMENSION=(* *), $
COMPONENT='report2', TEXT='report2', POSITION=(+0.500 +0.25), DIMENSION=(* *), RELATIVE-TO='report1', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT,  $
COMPONENT='report3', TEXT='report3', POSITION=(+0.500 +0.25), DIMENSION=(* *), RELATIVE-TO='report2', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT,  $
END
SET COMPONENT='report1'
ENGINE SQLMSS SET DEFAULT_CONNECTION SQL_Reporting
SQL SQLMSS PREPARE SQLOUT FOR
<some SQL code>
END
TABLE FILE SQLOUT
PRINT FIELDS
BY KEYFIELD
END
SET COMPONENT='report2'
ENGINE SQLMSS SET DEFAULT_CONNECTION SQL_Reporting
SQL SQLMSS PREPARE SQLOUT FOR
<some different SQL code>
END
TABLE FILE SQLOUT
PRINT OTHERFIELDS
BY KEYFIELD
WHERE CONDITION EQ 1
END
SET COMPONENT='report3'
TABLE FILE SQLOUT
PRINT OTHERFIELDS
BY KEYFIELD
WHERE CONDITION EQ 2
END

But each report component prints on a separate page, all report1 pages followed by all report2 pages followed by all report3 pages. If I have to create HOLD files with master files for each of the SQLOUT that would be annoying. I haven't tried that yet.


WebFOCUS 8.2.03
AppStudio, InfoAssist
Windows, All Outputs
 
Posts: 129 | Location: Indiana | Registered: December 05, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
That is strange, as it is definitely working for me, I copied you code to a new FEX and edited in my own SQL and it is working.

The only difference between your code and mine is the metadata that App Studio throws in, but if I comment it out and replace with your code it still works as expected.

might have to raise a case with Tech Support
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
*-HOLD_SOURCE
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
-*SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=ON, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
SECTION=section1, LAYOUT=ON, MERGE=ON, ORIENTATION=LANDSCAPE, PAGESIZE=LEGAL,$
-*PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', BOTTOMMARGIN=0.5, TOPMARGIN=0.5, $
-*COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.917 1.146), DIMENSION=(6.458 4.271), BYTOC=0,  ARREPORTSIZE=DIMENSION, METADATA='left: 0.917in; top: 1.146in; width: 6.458in; height: 4.271in; position: absolute; z-index: 1;', $
-*COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(0.813 6.042), DIMENSION=(6.667 2.292), BYTOC=0,  ARREPORTSIZE=DIMENSION, METADATA='left: 0.813in; top: 6.042in; width: 6.667in; height: 2.292in; position: absolute; z-index: 2;', $
COMPONENT='report1', TEXT='report1', POSITION=(0.500 0.625), DIMENSION=(* *), $
COMPONENT='report2', TEXT='report2', POSITION=(+0.500 +0.25), DIMENSION=(* *), RELATIVE-TO='report1', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT,  $
COMPONENT='report3', TEXT='report3', POSITION=(+0.500 +0.25), DIMENSION=(* *), RELATIVE-TO='report2', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT,  $
END
SET COMPONENT='report1'
-*component_type report
ENGINE SQLMSS SET DEFAULT_CONNECTION ODS
SQL SQLMSS PREPARE SQLOUT FOR
SELECT CLIENT_ID, NAME
FROM CLIENT
WHERE CLIENT_ID in (
1,
2,
3,
4
)
END
TABLE FILE SQLOUT
PRINT
     NAME
BY  LOWEST CLIENT_ID
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END
SET COMPONENT='report2'
-*component_type report
ENGINE SQLMSS SET DEFAULT_CONNECTION ODS
SQL SQLMSS PREPARE SQLOUT FOR
select c.CLIENT_ID, a.ACCOUNT_NUMBER, a.ACCOUNT_ID
from CLIENT c
join CLIENT_ACCOUNT_RELATIONSHIP car on c.CLIENT_ID = car.CLIENT_ID and car.RELATIONSHIP_TYPE_CODE = 'OWNR'
join ACCOUNT a on car.ACCOUNT_ID = a.ACCOUNT_ID
WHERE c.CLIENT_ID in (
1,
2,
3,
4
)
END
TABLE FILE SQLOUT
PRINT ACCOUNT_NUMBER
BY CLIENT_ID
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,$
ENDSTYLE
END
SET COMPONENT='report3'
TABLE FILE SQLOUT
PRINT ACCOUNT_ID
BY CLIENT_ID
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,$
ENDSTYLE
END
COMPOUND END  


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 241 | Location: Melbourne, Australia | Registered: February 07, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Coordinated Report with SQL Pass-through

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.