Focal Point
[SOLVED] passing column names

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4137015716

March 06, 2012, 03:19 PM
guru
[SOLVED] passing column names
Hi,

here is my requirement,

This is my employee table

empname age salary
------------------
A 25 1000
B 26 2000
C 24 3000

I want to list the employees based on the column names user try to select in a combo box.

for example the combo box has the column names displayed as AGE/SALARY

If the user select AGE. the report should list

empname age
------------
A 25
B 26
C 24

and, if the user select SALARY. the report should list

empname salary
--------------
A 1000
B 2000
C 3000

can some one help me achieve this. Is there any way we can achieve this?

I am planning to create two different reports and using hidden/visible property i am planning to display the required report.

Is it possible to create only one report and achieve the result.

Thanks,
Guru

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


WebFOCUS 7.6
Windows, All Outputs
March 06, 2012, 03:50 PM
Waz
This should be very simple.

If your combo box name is PARM1 and the values match the column names, then your code would be:
TABLE FILE EMPLOYEE
PRINT &PARM1
BY EMPNAME
END



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!

March 07, 2012, 09:11 AM
guru
Thanks WAZ.. It worked.


WebFOCUS 7.6
Windows, All Outputs
March 07, 2012, 08:53 PM
guru
Waz,

I tried the same approach in a bar chart but it is not working.

Am i missing something.

Thanks,
Guru


WebFOCUS 7.6
Windows, All Outputs
March 07, 2012, 09:21 PM
Waz
When you say its not working, it realy helps to say what is actually happening, error messages, and post your code, so we can check it out.


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!

March 13, 2012, 05:47 PM
guru
Sorry Waz, I made an typo error in the report and it was causing issue.

Now it is resolved. Thanks for responding.


WebFOCUS 7.6
Windows, All Outputs