Home » Developer & Programmer » Reports & Discoverer » How Report Based on 2 Columns
How Report Based on 2 Columns [message #251866] Tue, 17 July 2007 00:43 Go to next message
aslme
Messages: 26
Registered: May 2006
Location: Pakistan
Junior Member

Dears
I have a Report in which i have 1 Parameters in this report i want data as on my requirement like

select * from emp;
EMPNO ENAME MGR SAL COMM DEPTNO
--------- ---------- --------- --------- --------- ---------
7369 SMITH 7902 800 20
7499 ALLEN 7698 1600 300 30
7521 WARD 7698 1250 500 30
7566 JONES 7839 2975 20
7654 MARTIN 7698 1250 1400 30
7698 BLAKE 7839 2850 30
7782 CLARK 7839 2450 10
7788 SCOTT 7566 3000 20
7839 KING 5000 10
7844 TURNER 7698 1500 0 30
7876 ADAMS 7788 1100 20
7900 JAMES 7698 950 30
7902 FORD 7566 3000 20
7934 MILLER 7782 1300 10

14 rows selected.

in a report i have 1 parameter which is based on 2 Columns (1) is SAL (2) is COMM if i select SAL report should be based on SAL or if i select COMM report should be based on COMM please help me in this query il be great full to you all.

Thanks

Cheers
Re: How Report Based on 2 Columns [message #251965 is a reply to message #251866] Tue, 17 July 2007 10:17 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Hi,
What do you mean by based on?

By
Vamsi
Re: How Report Based on 2 Columns [message #252010 is a reply to message #251866] Tue, 17 July 2007 11:54 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It would be nice if you used
  • punctuation (so that we could see where a sentence begins and where it ends in order to follow your thoughts. The way you write a message is difficult to read and I'm not Sherlock Holmes)
  • [code] tags (so that we could see what your example represents)
  • actual query (so that we wouldn't need to IMAGINE what you did, but SEE it). Do you see a WHERE clause in the query? I don't. Do you see a parameter somewhere? I don't. Do you see SAL and COMM columns? I don't. Do you expect an answer? You won't get it.
Re: How Report Based on 2 Columns [message #252136 is a reply to message #252010] Tue, 17 July 2007 23:05 Go to previous messageGo to next message
aslme
Messages: 26
Registered: May 2006
Location: Pakistan
Junior Member

Thanks For replying. I want to say that i have report in which i want to use this report through 2 ways in this report their is a GPA and CGPA 2 columns i want when i select report parameter of GPA report runs on GPA another is when i select CGPA report give results based on CGPA.
Please feel free to ask any thing or i will give you a report.

Thaks

Cheers
Re: How Report Based on 2 Columns [message #252572 is a reply to message #252136] Thu, 19 July 2007 03:31 Go to previous messageGo to next message
zameersait
Messages: 16
Registered: July 2007
Junior Member
You still did not clarify what u mean by based on. Are you tryng to say that it should set the criteria or the sort option.
Re: How Report Based on 2 Columns [message #252608 is a reply to message #252572] Thu, 19 July 2007 06:54 Go to previous messageGo to next message
aslme
Messages: 26
Registered: May 2006
Location: Pakistan
Junior Member

I Show in another way and thanks for take intrust thanks again

SELECT * FROM EMP;
It meand All data of Emp table
SELECT * FROM DEPT;
It meand All data of Dept table

if i Combine Both Queryes in a single Report

Select * from :Parameter (in this parameter If it is Emp or Dept)
when i select emp then all data retrive of Emp Table
and if i select dept then all data retrive of Dept Table.


I hope you should understand.

Thanks

Cheers
Re: How Report Based on 2 Columns [message #252629 is a reply to message #252608] Thu, 19 July 2007 08:29 Go to previous messageGo to next message
appsamar
Messages: 8
Registered: April 2007
Junior Member
Hi Aslme,

You can use lexical parameter instead of bind parameter, i think you can not use bind reference in from clause

Use select * from & table;

In runtime it will ask for you for the value of table
you can either give emp or dept

Hope this helps

Regards
Amar
Re: How Report Based on 2 Columns [message #252817 is a reply to message #252629] Fri, 20 July 2007 02:18 Go to previous messageGo to next message
aslme
Messages: 26
Registered: May 2006
Location: Pakistan
Junior Member

Thanks Amar I think you understand my problem just like this i want their is only 1 table and their is multiple columns and i want to run report through multiple column based
like you say select * from & table;
select * from table
where GPA < 2
or in the same parameter
where CGPA < 2
i want i a single report when i select GPA < 2 list generated of those std who have GPA Less then 2 and if in the same parameter when i select CGPA < 2 list generated of those std who have CGPA Less then 2

I hope you understand please guide me in this query


Thanks

Cheers
Re: How Report Based on 2 Columns [message #252831 is a reply to message #252817] Fri, 20 July 2007 03:41 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Amar has already told you the solution, but you didn't read it carefully enough. He said:
Amar
use lexical parameter

And that's it. As you'd use a lexical parameter for a table name, you'd use it the same way for a column name in the WHERE clause.

You don't know how to use lexical parameters? Open Reports Builder Online Help System and search for it!
Previous Topic: Using Discoverer Plus in EBusiness Suite Environment
Next Topic: Doubts
Goto Forum:
  


Current Time: Thu Dec 05 08:24:09 CST 2024