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, March 06, 2012, 03:50 PM
WazThis 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
March 07, 2012, 08:53 PM
guruWaz,
I tried the same approach in a bar chart but it is not working.
Am i missing something.
Thanks,
Guru
March 07, 2012, 09:21 PM
WazWhen 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.
March 13, 2012, 05:47 PM
guruSorry Waz, I made an typo error in the report and it was causing issue.
Now it is resolved. Thanks for responding.