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     Another Excel report question

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Another Excel report question
 Login/Join
 
Gold member
posted
Hi,

In one of the report we have detail and summary section.

Can u get the summary in one tab and the detail in other tab?

If the number of records in Detail is greater than 65K we should move to a new tab in the same excel sheet.

From https://forums.informationbuilders.com/eve/forums/a/tpc/...831071272#5831071272 , I came to know that we can populate data’s in new tab as per our requirement (i.e. if record count is greater than 40k in a sheet move to next sheet). I also came to know that we can put data’s in a different tab as per the highest level of grouping.


Can anyone explain how to achieve do the above ….

I did searched in the forum, but I am unable to find answer for my issue. (I guess I had not overlooked any discussion topic Smiler )


Regards
Navaneeth
 
Posts: 53 | Registered: October 03, 2006Report This Post
Expert
posted Hide Post
Off the top of my head, I would have two reports, the first, detail the next summary, or visa-versa, each report going into separate tabs.


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

You've done your homework! Smiler

I haven't tried this myself but, in theory at least, I would create the detail report first using ON TABLE HOLD FORMAT EXCEL BYTOC to get the multiple sheets required for large row numbers of detail data sending the output to a pre-FILEDEFd .mht file.

You would force an empty first sheet somehow to allow the summary to be targeted to SHEETNUMBER 1 within your second report.

Let us know how you get on.

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
A quick trial and I've got this so far. It forces an additional sheet in the BYTOC template output and shows that the template is created OK, but I haven't got the Summary page forced yet.

Everyone have a play (you know you want to Wink) - a gold star to anyone that can make this function as it's potentially very useful Smiler

APP PREPENDPATH IBINCCEN
FILEDEF TEMPFIX DISK tempfix.ftm (APPEND
FILEDEF TEMPEXL DISK tempexl.mht
-RUN
-* The next line is space padded to here                                                       V
-WRITE TEMPFIX @Summary                                                                         
TABLE FILE GGSALES
SUM DOLLARS BUDDOLLARS
 BY REGION
 BY ST
 BY CITY
 BY STCD
 BY CATEGORY
 BY PRODUCT
ON TABLE HOLD AS TEMPFIX FORMAT ALPHA
END
TABLE FILE TEMPFIX
SUM DOLLARS BUDDOLLARS
 BY REGION
 BY ST
 BY CITY
 BY STCD
 BY CATEGORY
 BY PRODUCT
ON TABLE HOLD AS TEMPEXL FORMAT EXL2K BYTOC
END
-RUN
TABLE FILE GGSALES
SUM DOLLARS BUDDOLLARS
 BY REGION
 BY ST
 BY CITY
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE TEMPEXL SHEETNUMBER 1
END
-RUN

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
You could always create your template file and place your summary in sheet 1. Then when you create your temporary field for page number to mimic your bytoc, start at number 2 and then you could output each detail page to the SHEETNUMBER relating to the temporary page number.

Either way, you are likely to have to handle the data several times.

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
Virtuoso
posted Hide Post
And then, one can always count on McGuyver:

  
-* File Navaneeth2.fex
JOIN BLANK WITH SALES IN CAR TO BLANK IN FSEQ AS M_
DEFINE FILE CAR
BLANK/A1 WITH SALES = ' ';
NCAR/A16 = IF COUNTER EQ 1 THEN ' ' ELSE CAR;
PLACE/A27=COUNTRY | (' ' | NCAR);
LEVEL/A7 =IF COUNTER EQ 1 THEN 'SUMMARY' ELSE 'DETAIL';
END
TABLE FILE CAR
SUM SALES
BY HIGHEST LEVEL NOPRINT
BY PLACE
WHERE COUNTER LE 2
ON TABLE PCHOLD FORMAT EXL2K BYTOC
END


Maybe not exactly what you wanted but an elegant step in the direction.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Guru
posted Hide Post
Try this out.

DEFINE FILE CAR
RECCNT /I9 WITH COUNTRY = LAST RECCNT + 1;
END
-*
TABLE FILE CAR
PRINT 
      COUNTRY
      CAR
      MODEL
      BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST 
BY RECCNT
ON TABLE HOLD AS FDATA
END
-*
-SET &LIM     = 0;
-REDO
-SET &LIM     = &LIM + 1;
-SET &HPREP   = DECODE &LIM(1 'OPEN' ELSE ' ');
-SET &HOLDER  = 'ON TABLE PCHOLD FORMAT EXL2K &HPREP.EVAL'; 
-*
TABLE FILE FDATA
PRINT *
WHERE RECCNT EQ &LIM.EVAL
ON TABLE HOLD AS LINES
END
-TYPE &LINES
-IF &LINES = 0 GOTO DOSUM;
TABLE FILE LINES
PRINT 
      COUNTRY
      CAR
      MODEL
      BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST
&HOLDER.EVAL
END
-GOTO REDO
-DOSUM
TABLE FILE FDATA
SUM
      DEALER_COST
      RETAIL_COST 
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END
-EXIT


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Guru
posted Hide Post
My first post will break on country.

This post will break on a specified line count.

-*
DEFINE FILE CAR
RFIELD/A50 = COUNTRY||CAR||MODEL;
END

TABLE FILE CAR
PRINT 
      COUNTRY
      CAR
      MODEL
      BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST 
RANKED BY RFIELD
ON TABLE HOLD AS FDATA
END
-*
-SET &LIM     = 0;
-SET &LOOPER  = 0;
-REDO
-SET &LOOPER  = &LOOPER + 1;
-SET &HPREP   = DECODE &LOOPER(1 'OPEN' ELSE ' ');
-SET &HOLDER  = 'ON TABLE PCHOLD FORMAT EXL2K &HPREP.EVAL'; 
-*
TABLE FILE FDATA
PRINT *
WHERE RANK GT &LIM.EVAL
WHERE RECORDLIMIT EQ 5
ON TABLE HOLD AS LINES
END
-*THIS WILL SET 5 LINES PER TAB
-SET &LIM     = &LIM + 5;
-IF &LINES = 0 GOTO DOSUM;
TABLE FILE LINES
PRINT 
      COUNTRY
      CAR
      MODEL
      BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST
&HOLDER.EVAL
END
-GOTO REDO
-DOSUM
TABLE FILE FDATA
SUM
      DEALER_COST
      RETAIL_COST 
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END
-EXIT


Hope one of these examples is what you are looking for.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Gold member
posted Hide Post
Hi All,

Thanks for all your reply.

Glenda : it will be very helpful if you can explain me your last post..

I did try to figure it out, but sometimes I am completely lost

For instance I did not get the following snippet of code
RFIELD/A50 = COUNTRY||CAR||MODEL;
-REDO
-SET &HPREP = DECODE &LOOPER(1 'OPEN' ELSE ' ');
WHERE RANK GT &LIM.EVAL

Regards,
Navaneeth
 
Posts: 53 | Registered: October 03, 2006Report This Post
Guru
posted Hide Post
I'll give it a try but it is like when someone asks how I can factor polynomials. My answer is that I don't know how but I just see it.

Pat - feel free to pop in if you can explain it better!!

 
RFIELD/A50 = COUNTRY||CAR||MODEL;


"RFIELD" is simply a unique field by which I rank the data. This gives me record count. (I'm sure there are other ways of doing this.)

 
-SET &HPREP = DECODE &LOOPER(1 'OPEN' ELSE ' ');


&HPREP is so I can set the first tab to "OPEN"

First loop through begins the COMPOUND EXCEL.

&HOLDER = 'ON TABLE PCHOLD FORMAT EXL2K OPEN'

I don't use a close in the DECODE because my summary page will close the COMPOUND EXCEL.

Three pieces of code tell where to start each loop as well as how many lines to put on each EXCEL tab.


Where to start the loop:
 
WHERE RANK GT &LIM.EVAL


How many records to pull:

 
WHERE RECORDLIMIT EQ 5


Sets &LIM for the next loop:

 
-SET &LIM = &LIM +5;



NOTE: "WHERE RECORDLIMIT" AND "-SET &LIM" must be incremented by the same number.

I hope I haven't increased your confusion.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Expert
posted Hide Post
How much does a WebFOCUS 101 class run to now-a-days? 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
Guru
posted Hide Post
How about first running the summart report and put in code similar to this
'ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET STYLE *
type=report, titletext='Summary Report', $
ENDSTYLE'

and then run the detail, with whatever breaksyou want and make sure to use the
'ON TABLE PCHOLD FORMAT EXL2K CLOSE'
with or without a titletext.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Gold member
posted Hide Post
Hi,

Thanks a lot for your answers it really helps...

Navaneeth
 
Posts: 53 | Registered: October 03, 2006Report This Post
Master
posted Hide Post
quote:
Pat - feel free to pop in if you can explain it better!!


This is like being called on by the teacher when you haven't done your homework!

Glenda, that is an absolutely brilliant solution. The only thing I could add to your explanation is that the RECORDLIMIT is the maximum number of lines to print on one worksheet (tab). Navaneeth in your case that would be 65000. The increment on &LIM is the same as the recordlimit so that in the next iteration you are starting with the next ranked record.

Navaneeth,
One warning, you may end up with a workbook that can't be opened because of the file size. A 65,000 line worksheet takes a lot of memory to open.


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
Guru
posted Hide Post
Pat,

Oh but I knew you would hit the ground running.

I've always known I was not a very good mentor. I can show them how to do something, but I can't always explain how in works in such a way they will understand.

Who ya gonna call? Codebusters!

Thanks to you and all the other "Codebusters".


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 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     Another Excel report question

Copyright © 1996-2020 Information Builders