Home » Developer & Programmer » Reports & Discoverer » Oracle Report 10g (2 Merged) (Oracle Report 10g)
Oracle Report 10g (2 Merged) [message #484467] Tue, 30 November 2010 18:59 Go to next message
averion
Messages: 42
Registered: January 2009
Location: US
Member
Hello Experts,

Is there a way to short a Matrix report?
The query shorts correctly in PLSQL but not in the geretated report file.

There are columns like Date,Device,OperatorID etc and the report should be able to short depending on the requirement. For example,
it should be able to short by device, or by Date or both.

I tried sorting in the 'Break order' but doesn't come out as required.

Thanks a lot.
Re: Oracle Report 10g [message #484469 is a reply to message #484467] Tue, 30 November 2010 19:10 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you provided DDL (CREATE TABLE ...) for tables involved.
It would be helpful if you provided DML (INSERT INTO ...) for test data.
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
It would be helpful if you provided expected/desired results & a detailed explanation how & why the test data gets transformed or organized.

>Is there a way to short a Matrix report?
Provide EXPLICIT example of what is meant by "short a Matrix report"

Re: Oracle Report 10g [message #484475 is a reply to message #484469] Tue, 30 November 2010 21:11 Go to previous messageGo to next message
averion
Messages: 42
Registered: January 2009
Location: US
Member
Hello Experts,

I am trying to short(order by) the output of Matrix report.
The query produces correct output in PL/Sql but does not short corretly in reports.

Thanks

[Updated on: Tue, 30 November 2010 21:12]

Report message to a moderator

Re: Oracle Report 10g [message #484484 is a reply to message #484475] Wed, 01 December 2010 00:38 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you use ORDER BY in query?
Did you set all "Break orders" correctly?

Could you post a query, as well as screenshot of Data model editor's layout?

P.S. It is "sort", not "short".

[Updated on: Wed, 01 December 2010 00:38]

Report message to a moderator

Re: Oracle Report 10g [message #484597 is a reply to message #484484] Wed, 01 December 2010 19:56 Go to previous messageGo to next message
averion
Messages: 42
Registered: January 2009
Location: US
Member
Thanks for the response.

I have a 'Matrix' report that has to be sorted by verious columns depending on the requirements.
Some sample columns are Date,Product,Person.

A user can pass 'order by' Date, or Prodiuct or both and the report should sort the result accordingly.
I tried this in the 'Break Order' too but the report is not sorting it correctly.

There has to be a way to sort a Matrix report too. It should be doable.

I apologize for the mistakes in earlier postings.

Thanks,
Re: Oracle Report 10g [message #484693 is a reply to message #484597] Thu, 02 December 2010 05:37 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If that's so, take a look at lexical parameters (in Report's Online Help System). They will make it possible to create a query based on user's input. Here's a short example: create a user parameter (let's call it PAR_SORT) and a lexical parameter (LEX_SORT). In After Parameter Form (APF) trigger, you'd
if :par_sort = 1 then
   :lex_sort := 'order by date';
elsif :par_sort = 2 then
   :lex_sort := 'order by product';
else 
   :lex_sort := 'order by person';
end if;

Report query would look like this:
select date, product, person
from some_table
where <some conditions>
&lex_sort

Report would then substitute &LEX_SORT with lexical parameter's actual value (which is calculated in APF trigger).
Re: Oracle Report 10g [message #484714 is a reply to message #484693] Thu, 02 December 2010 06:39 Go to previous message
averion
Messages: 42
Registered: January 2009
Location: US
Member
Thanks for the reply.

There is a JAVA mask for the users to provide input.
So when a user runs a report for specific device or product it will be combined in the where condition as you mentioned.
Something like &P_Input.

User can also input order by as per the requirement.
This will also be included in the query as &P_OrderBY.

So, depending on the input a report will be generated.
These parameters work fine (for selection and ordering) in case of normal report but not for Matrix report.

I tried using NULL in the 'breakorder' for individual row but it doesn't seem to work that way.

I strongly believe there has to be a way to sort Matrix Report.

Thanks,



[Updated on: Thu, 02 December 2010 06:40]

Report message to a moderator

Previous Topic: Calling Report from Form asking enter Password
Next Topic: Add new field to an rtf
Goto Forum:
  


Current Time: Fri Apr 26 20:04:53 CDT 2024