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     EXCEL TEMPLATE AND BYTOC

Read-Only Read-Only Topic
Go
Search
Notify
Tools
EXCEL TEMPLATE AND BYTOC
 Login/Join
 
Member
posted
Is it possible to create an Excel report using a Template and BYTOC command. Something like this,

ON TABLE PCHOLD FORMAT EXL2K BYTOC TEMPLATE 'marginreport' SHEETNUMBER 1 BYTOC

When I try to run the report with this code I get an error,

Agent on reporting server EDASERVE may have crashed.
Please investigate reporting server log.

Thanks


WebFOCUS 7.1.3
Running on Linux
Formats: Excel, PDF
 
Posts: 7 | Registered: November 29, 2007Report This Post
Master
posted Hide Post
It is my understanding that BYTOC does not work with templates. What are you actually trying to accomplish?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Shaun,

All BYTOC does (ish) within an Excel output, is to place each major sort field level into a different WorkSheet. All worksheets are created dynamically within the single workbook output and you don't have to pre-define them.
Using the template syntax does the same thing (effectively) but with you having control over what goes where. In this instance you do have to determine how many worksheets you will have in the workbook template but you do have the advantage of being able to have VBA code within it.

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
Member
posted Hide Post
What I am trying to do is create an Excel report using a template to control some of the formatting, freezing the header records at the top and putting borders around some of the report headings. I would also like to break the report out into multiple worksheets based on the first major sort level. There will be a set number of worksheets to this report, so I do know the total number of worksheets that will be in the report.

Is there a way to accomplish this?

Thanks


WebFOCUS 7.1.3
Running on Linux
Formats: Excel, PDF
 
Posts: 7 | Registered: November 29, 2007Report This Post
Expert
posted Hide Post
Shaun,

Yes, there is, but you have to make a decision.

BYTOC and Templates are mutually exclusive (I believe).

BYTOC will break on the major sort field and deposit the data for that sort into a new worksheet within the same workbook. You will not be able to target an existing workbook so you will not be able to have pre-existing VBA code.

Templates will allow you to have a pre-existing workbook with VBA code but will not automatically break on the major sort. You will have to achieve this yourself.

Going from your statement, the Templates are the way to go.

I would recommend a pre-processing component where you pull out all the major by fields into variables-
TABLE FILE filename
BY majorsortfield
ON TABLE SAVE AS nnnnn
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
-READ SAVE &variablename.Ann. etc.......
and then pass each variable into your code.

I do this quite a lot and the end result is satisfying as what used to take the end users a day or more to prepare the data, cut and paste into Excel, format the worksheets including the print layout now takes but about twenty minutes including the Excel VBA code.

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
Expert
posted Hide Post
oops, Confused

Alternate would be to dump the whole output into an existing workbook and then take care of distribution of the data within the VBA code itself, but then you wouldn't have the fun getting templates to work Wink

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     EXCEL TEMPLATE AND BYTOC

Copyright © 1996-2020 Information Builders