Focal Point
Need to split the report one below one based on column condition
March 21, 2007, 10:48 AM
ravindra4sNeed to split the report one below one based on column condition
All,
We have a report in which we need to show the report output one below one, based on the column data.
Initially we did it through the across.But the user wants on below one.If
then the report should be displayed as 1 set.Else if
then below the 1st output the new output should be displayed.final else should be sum of above 2 outputs.Initially we achived it in ACROSS.But now we need it in this format.
Let me know if you know the solution.
Regards
R.Prasanna
WebFOCUS 7.6.2
March 21, 2007, 03:04 PM
FrankDutchYou can do this by the same value as you now use for the accross.
Do suppose that value is FIELDX is either 1 or 2
DEFINE FILE CAR
EXTRABREAK/I1=DECODE COUNTRY('ITALY' 1 ELSE 2);
MODBREAK/A1=IF EDIT(MODEL) EQ 'B' THEN 'B' ELSE 'A' ;
END
TABLE FILE CAR
SUM SALES COSTS
BY MODBREAK
BY EXTRABREAK
ON MODEL SUBTOTAL
END
The defines are just for the demo...
Frank
|
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 |
March 22, 2007, 02:48 AM
ravindra4sFrank,
Thanks for the reply.
But while defining the cols, for MODBREAK i am getting the following error.
(FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED.
Also without using the col. for report how can we make the MODEL as subtotal.
One more suggestion needed.If i have 5 models of car and 5 countries, then 1st all the data should be grouped on country then model.And i need a last grouping called TOTAL, in which i have to see total for all the models, grouped on countries.
Let me know if you have a suggestion.
Regards
R.Prasanna
WebFOCUS 7.6.2
March 22, 2007, 03:33 AM
Danny-SRLRavindra,
Is this what you would want?
PAGE 1
SORT SALES
---- -----
ENGLAND 12000
FRANCE 0
ITALY 30200
JAPAN 78030
W GERMANY 88190
------------------------
CONVERTIBLE 0
COUPE 12400
HARDTOP 0
ROADSTER 13000
SEDAN 183020
------------------------
Total 208420
------------------------
If so, you need the McGuyver technique.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 22, 2007, 03:35 AM
FrankDutchRavindra
Pleace show us the master you are using (or at least the part that is needed for thit report) and a small example of the table request you have build with the across field.
I think it won;t be to complex.
Frank
|
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 |
March 22, 2007, 04:15 AM
ravindra4sDanny,
Following is the model of the report.I am expecting the concept of Across Total.So,3rd row of model wont be there at DB column, we need to add all the model cost/sales and give it as total for each country.Hope the requirement is clear now.
Model Country Cost Sales
Model1 Country1 $10000 $50
Country2 $15000 $40
Country3 $20000 $20
Model2 Country1 $20000 $30
Country2 $25000 $20
Country3 $10000 $10
Total Country1 $30000 $80
Country2 $40000 $60
Country3 $30000 $30
Frank,
I tried your solution using SYSTEM MAS (CAR).
Let me know if you have a solution.
WebFOCUS 7.6.2
March 22, 2007, 05:11 AM
Danny-SRLRavindra,
This what you asked for:
quote:
Model Country Cost Sales
Model1 Country1 $10000 $50
Country2 $15000 $40
Country3 $20000 $20
Model2 Country1 $20000 $30
Country2 $25000 $20
Country3 $10000 $10
Total Country1 $30000 $80
Country2 $40000 $60
Country3 $30000 $30
This is what can be done in FOCUS with the McGuyver technique.
PAGE 1
BODYTYPE COUNTRY RETAIL_COST SALES
-------- ------- ----------- -----
CONVERTIBLE ENGLAND 8,878 0
COUPE ITALY 38,320 12400
HARDTOP ENGLAND 5,100 0
ROADSTER ITALY 6,820 13000
SEDAN ENGLAND 31,341 12000
FRANCE 5,610 0
ITALY 5,925 4800
JAPAN 6,478 78030
W GERMANY 64,732 88190
-------------------------------------------------
Total ENGLAND 45,319 12000
FRANCE 5,610 0
ITALY 51,065 30200
JAPAN 6,478 78030
W GERMANY 64,732 88190
-------------------------------------------------
Is this ok?
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 22, 2007, 05:23 AM
ravindra4sDaniel,
Exactly this is what i want.What is that McGuyver technique?Can i have more information on this and how to achive this.I am using report painter of webfocus 7.1 developer studio.
WebFOCUS 7.6.2
March 22, 2007, 08:16 AM
Danny-SRLRavindra,
Here is my program:
JOIN BLANK WITH BODYTYPE IN CAR TO BLANK IN FSEQ AS M
DEFINE FILE CAR
BLANK/A1 WITH BODYTYPE=' ';
XBODY/A16=IF COUNTER EQ 2 THEN 'Total' ELSE BODYTYPE;
END
-*
TABLE FILE CAR
SUM RCOST SALES
BY COUNTER NOPRINT UNDER-LINE
BY XBODY AS BODYTYPE
BY COUNTRY
WHERE COUNTER LE 2
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END
This is the McGuyver file, called FSEQ, and its master.
FILENAME=FSEQ,SUFFIX=FIX,
DATASET=C:\IBI\APPS\SRLSAMP\FSEQ.DAT
$ change the dataset path to where you put the data
SEGNAME=CHAR1,SEGTYPE=S0
FIELDNAME=BLANK,BLANK,A1,A1,$
SEGNAME=CHARS,SEGTYPE=S0,PARENT=CHAR1,OCCURS=VARIABLE
FIELDNAME=CHAR,CHARS,A1,A1,$
FIELDNAME=COUNTER,ORDER,I2,I4,$
FSEQ.DAT
FILEFORMCGUYVERFILEFORMCGUYVER
*** notice that the first character is a space; the rest is characters the number of which should be large enough for whatever you may need
If you give me your e-mail address, I can send you a ppt put out by IBI some years ago.
Good luck!
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 28, 2007, 01:13 AM
PrasannaAll,
Here is one more solution for the above issue
It worked with HTMTABLE.So, created 3 repors and 3 dialouge managers(for -RUN), and one HTMLFORM to display the 3 reports one below.
Using -IBI-GIL.(report name) in the HMTL form.Hope it will be helpful
Regards
R.Prasanna
Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP
March 28, 2007, 03:23 AM
Tony APrasanna,
I know you meant to type
!IBI.FIL.(report name)
; with the 'plink' -
! - (refered to as something else in the US) and followed by a semi-colon.
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 | |