Home » Developer & Programmer » Reports & Discoverer » Page wise grouping (Reports 6i)
Page wise grouping [message #632124] Sun, 25 January 2015 22:36 Go to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
I have two queries in one report with one column similar in both the data queries, first query runs the detail and the other runs the summary , now i want the summary query to lookup for one column in detail as reference parameter so that for each page one employee details are printed.


--first query displays details

select emp_code , emp_name,emp_dob, emp_join_dt
from emp_mast;

--second query summation -- i know we can do this using join condition but this is just an example of requirement.

select emp_allw_code,sum(salary) from emp_pay
where emp_code = :emp_code ( from the detail query per page for each employee)






Re: Page wise grouping [message #632126 is a reply to message #632124] Mon, 26 January 2015 00:05 Go to previous messageGo to next message
Littlefoot
Messages: 21578
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Include EMP_CODE into the second SELECT's statement. Then create data link between those two queries (link EMP_CODE columns).
Re: Page wise grouping [message #632132 is a reply to message #632126] Mon, 26 January 2015 01:49 Go to previous messageGo to next message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
thanks littlefoot , i tried it but its treating it like outerjoin , and records for all employees are repeating.Anything else we can do with format triggers.
Re: Page wise grouping [message #632134 is a reply to message #632132] Mon, 26 January 2015 03:11 Go to previous messageGo to next message
Littlefoot
Messages: 21578
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Right; I misread your question, didn't understand what you are saying.

I wouldn't use 2 queries. I'd join EMP_MAST and EMP_PAY and make sure that SALARY is selected among other columns. Then it is easy to create a SUMMARY COLUMN (either by wizard, which makes sure to put it into the correct frame) or manually (but then you have to do EVERYTHING manually).

I don't see any advantage in using 2 queries.
Re: Page wise grouping [message #632136 is a reply to message #632134] Mon, 26 January 2015 06:08 Go to previous message
m.abdulhaq
Messages: 253
Registered: April 2013
Location: Ajman
Senior Member
thanks littlefoot, it worked , actually i had to use two queries in the report problem was if the summary query has subqueries data link will not work properly and hence i modified it to work properly.
Previous Topic: To Auto srno by Report
Next Topic: how to get the values asc order??
Goto Forum:
  


Current Time: Thu Aug 06 14:45:18 CDT 2020