Home » Developer & Programmer » Reports & Discoverer » Repeat a record in the details
Repeat a record in the details Sun, 16 November 2014 01:01
 hahaie Messages: 194Registered: May 2014 Senior Member
hello,
please see file attachment,
i have a report with a query(Q1-master) and two query(Q2,Q3 details).
Q2,Q3 Exactly similar.
relationship between q1 and q2q3(=q4) is Many-to-many.
The problem is when a record of q2q3(q4)Have more than one master.
show this a repeat is True but The real problem is when we use 'count' function for Q2,Q2
and Duplicate records can be calculated more than once.
In your opinion, what is the solution?
• Attachment: q1.JPG
Re: Repeat a record in the details [message #627770 is a reply to message #627768] Sun, 16 November 2014 02:21
 Littlefoot Messages: 21599Registered: June 2005 Location: Croatia, Europe Senior MemberAccount Moderator
Here's what I understood while reading your question: this is a situation where one employee works in two (or more) departments simultaneously. For example, if he works 8 hours a day, he works 4 days in the Sales department and 4 hours in the Accounting department. When creating a report, that employee is listed (as a detail record) for both of those departments. Now, counting number of employees returns invalid value as that employee is counted twice.

If that's so, and if the COUNT summary column returns something you don't expect it to, one solution is to create your own COUNT function (that would be a formula column, actually) which would select number of DISTINCT employees (so that they wouldn't repeat).
Re: Repeat a record in the details [message #627780 is a reply to message #627770] Sun, 16 November 2014 08:03
 hahaie Messages: 194Registered: May 2014 Senior Member
thanks,
please see file attachment above:
Because queries are heavy,create a new query (which are similar queries q1,q2,q3),makes it difficult to reduce speed.
Can create a query with use query q2,q3 and then use Select Distinct?
I hope you understood what I said!!(I am so sorry)
 Previous Topic: REP-1401 ORA-06502: PL/SQL: numeric or value error Next Topic: rep-0110:unable to open file
Goto Forum:

Current Time: Thu Oct 01 15:11:04 CDT 2020