Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COLUMN TO ROW WITH TITLE

Status
Not open for further replies.

Ericordina

Technical User
Nov 28, 2006
10
NL
Hello,

I'm not working for so long with webfocus and i tried to made an report with an accros by and sum

The numbers are hard fields in the tabels.

But how can i get the columns defined as single rows instead of columsn accrossed year.

I have tried also the command OVER

I hope i made it clear what my problem is
 
Hi,

Can you give a short sample of the actual data in the table and then the required output?

Maybe from there we can help you.

Regards
 
I will try to give a sample

I will use the empdata to try te explain my problem

First i must define year out hiredate
define YEAR/YY=Hiredate
If i have done that dan i must try to create
the last 5 years and that must be automatically so every
new year wil be the max(year) and the other 4 years are
(Max(year)-1) and so further. Those fields must be my accrossed fields.

Then a FIELD i made through define is newsalary = salary*.05 and TOTAL SALARY is SALARY + NEWSALARY

Further i have a field PCT Salary wich = when max(year) -5 then )% else 2003-2002/2002*100 and so further this must be declared throuhg an if else statement i think

The output must be this


2002 2003 2004 2005 2006
SALARY 1000 1050 1150 1250 1500
PCT SALARY 0% 5% 10% 9% 20%

NEW SALARY 1050 1100 1207 1310 1575
TOTAL SALARY 2050 2150 2357 2560 3075

The Salary are hard facts who are standing in the table
this is also for the new salary
I have tried it with a by or over but and sum but then i cannot get it like above

 
I already have tried it with multiple report through an hold file
 
I Found it.

I have used

SALARIS/A25='SALARIS';
SALARISNIEUW/A25='SALARISNIEUW';
TOTALSALARIS/A25='TOTAALSALARIS';

TABLE FILE EMPDATA
SUM
TOTALSAL AS 'TOTAAL SALARIS' OVER
SALARYNEW AS 'SALARISNIEUW ' OVER
SALARY AS 'SALARIS ' OVER
ITEM AS 'PCT'
ACROSS
YEAR AS ' '
 
Thanx that is indeed the solution for this problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top