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] Displaying Data from 2 Data Sources in a single Excel Document

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Displaying Data from 2 Data Sources in a single Excel Document
 Login/Join
 
Member
posted
I've got a possible requirement to consolidate data from multiple sources (Postgres and MYSQL as an example) and display below below one another in the same Excel report. Now, when I did initial tests in HTML and WP format, they worked fine. However, when I changed them to EXL2K, it only showed the first data set (sort of skipped the second one)

Is there a possible way to achieve this? Anyone had to do something similiar? I've prepared some sample code any pointers would be appreciated. Thanks


SET EMPTYREPORT=ON

-* From Postgres
ENGINE SQLPSTGR SET DEFAULT_CONNECTION reports
ENGINE SQLPSTGR SET VARCHAR OFF
SQL SQLPSTGR PREPARE SQLOUT FOR

SELECT * from industry limit 10;
END
-RUN

TABLE FILE SQLOUT
PRINT *
HEADING
"Data From Postgres DB"
ON TABLE PCHOLD FORMAT EXL2K FORMULA
END

-* From T2
ENGINE SQLMYSQL SET DEFAULT_CONNECTION t2
ENGINE SQLMYSQL SET VARCHAR OFF
SQL SQLMYSQL PREPARE SQLOUT FOR

SELECT * from supplier limit 10;
END
-RUN

TABLE FILE SQLOUT
PRINT *
HEADING
"Data From MySQL DB"
ON TABLE PCHOLD FORMAT EXL2K FORMULA
END

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report This Post
Gold member
posted Hide Post
If there is requirement to display multiple reports in one excel sheet then it needs to be implemented using compound reports.Following code may help to achieve the requirement.Here the compound report has been implemented using
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
and
ON TABLE PCHOLD FORMAT EXL2K CLOSE
hope this helps
SET EMPTYREPORT=ON

-* From Postgres
ENGINE SQLPSTGR SET DEFAULT_CONNECTION reports
ENGINE SQLPSTGR SET VARCHAR OFF
SQL SQLPSTGR PREPARE SQLOUT FOR

SELECT * from industry limit 10;
END
-RUN

TABLE FILE SQLOUT
PRINT *
HEADING
"Data From Postgres DB"
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END

-* From T2
ENGINE SQLMYSQL SET DEFAULT_CONNECTION t2
ENGINE SQLMYSQL SET VARCHAR OFF
SQL SQLMYSQL PREPARE SQLOUT FOR

SELECT * from supplier limit 10;
END
-RUN

TABLE FILE SQLOUT
PRINT *
HEADING
"Data From MySQL DB"
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END


WF 8.1.04,Infoassist,Oracle, Excel, PDF,HTML.
 
Posts: 82 | Registered: January 06, 2014Report This Post
Member
posted Hide Post
Thanks jvb

It helps now. Just to add-on if I wanted them on 2 separate sheets (tabs) with Postgre on one tab and MySQl on another how would we break that? (I'm anticipating this could crop up later)


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report This Post
Guru
posted Hide Post
Remove NOBREAK and try


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Member
posted Hide Post
whoa worked like a charm.

Thanks guys. Just love these forums. (and taking notes of each issue that i encounter for future reference)


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 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     [SOLVED] Displaying Data from 2 Data Sources in a single Excel Document

Copyright © 1996-2020 Information Builders