Home » Developer & Programmer » Reports & Discoverer » Matrix report csv fialed for the wrng input (Oracle reports6i oracle 10g)
Matrix report csv fialed for the wrng input [message #459104] Thu, 03 June 2010 06:59 Go to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Hi,All
is it possible to write a custum data into a csv file when the Matrix failed to generate a csv report?

Ex:
I have created a matrix report with a parameter deptno.
When the user input the deptno then it should check in emp table
And generate the csv.
if the input not found in Emp table then file shold be generated with a custum message like 'This not a Valid Dept'

I have 3 depts in emp(10,20,30).
If user entered any of these three then report working fine .
If it like 150 then simple report builder closing with an error.

And I have tried with after/before report too. But no use.
Any hints?

Let me know when you people want more info on this.

Sriram Smile

Re: Matrix report csv fialed for the wrng input [message #459105 is a reply to message #459104] Thu, 03 June 2010 07:02 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
My basic Idea is to validate the deptno from the table...
If it is found then create the csv file with the content..Else create the file with the custum message

sriram Smile
Re: Matrix report csv fialed for the wrng input [message #459141 is a reply to message #459105] Thu, 03 June 2010 09:40 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I have tried with after/before report too. But no use.

I'd rather try with the After Parameter Form trigger.

Custom messages can be displayed with the SRW built-in package (check SRW.MESSAGE). It is also possible to stop report execution, etc. - study Reports Online Help's documentation about SRW; perhaps you'll find something useful.
Re: Matrix report csv fialed for the wrng input [message #459163 is a reply to message #459141] Thu, 03 June 2010 11:42 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
No,Thats a typo there in my message at what you quoted...
Actually it was like After/Before parameter and after report trigger.Nothing helpful.

Quote:
Custom messages can be displayed with the SRW built-in package (check SRW.MESSAGE)


This not for display purpose.
Report should write the message to a file.
Quote:
It is also possible to stop report execution, etc. -

Report should n`t be stopped.

I will get back here soon.
Anyway Thanks for your reply.

sriram Smile

Re: Matrix report csv fialed for the wrng input [message #459173 is a reply to message #459163] Thu, 03 June 2010 12:17 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
From your first message: what doesQuote:
If it like 150 then simple report builder closing with an error.
mean? "Error" is not a REP-XXXX error, is it? If query returns nothing because of an "invalid" parameter value (which, actually, causes nothing to be displayed), then you might create a text field and put "This not a Valid Dept" in there. Create a format trigger on that item which will check one of fields normally returned by report's query. Something like:
return (:some_field is null);
In other words: if query returns nothing, "some_field's" value will be NULL and format trigger will return TRUE, causing text item (and the message) to display. Otherwise, FALSE would prevent it to appear.

Once you have that text, you'd CSV it just as if it was a "normal" report result.
Re: Matrix report csv fialed for the wrng input [message #459181 is a reply to message #459173] Thu, 03 June 2010 12:54 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
/forum/fa/7878/0/

This is what I am saying like "Error"

sriram Smile
  • Attachment: error.JPG
    (Size: 23.71KB, Downloaded 1530 times)
Re: Matrix report csv fialed for the wrng input [message #459183 is a reply to message #459181] Thu, 03 June 2010 13:28 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That?!? I can't believe it! Running a report for an invalid department number causes a report to crash? How weird ...

Do you use that value in one of PL/SQL report units? Do they handle "invalid" values properly? Such as exception handlers (NO_DATA_FOUND) and similar?

Also - as a rule of thumb - did you try to recompile all (Ctrl + Shift + K)?
Re: Matrix report csv fialed for the wrng input [message #459221 is a reply to message #459183] Fri, 04 June 2010 01:04 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Yes thats why I posted it here....

It is not for a simple report.
It is for Matrix report while generating csv output.
Even you can try by a sample matrix report on scott scheama for the invalid deptno for a csv.

I tried and tried and tried and "tired " with this... Sad
All you saying is just the basic fundamentals ofcours it(the error) looks look that.Don`t know what to do for this.

sriram
Re: Matrix report csv fialed for the wrng input [message #459222 is a reply to message #459221] Fri, 04 June 2010 01:05 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Or shall i put the rdf here?

sriram Smile
Re: Matrix report csv fialed for the wrng input [message #459255 is a reply to message #459222] Fri, 04 June 2010 03:23 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you consider contacting Oracle Support?
Re: Matrix report csv fialed for the wrong input [message #459274 is a reply to message #459255] Fri, 04 June 2010 04:45 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Looking for a solution(working on it) ...
If not possible then I should do that....

Anyway thanks for your input.
sriram Smile
Re: Matrix report csv fialed for the wrong input [message #459395 is a reply to message #459274] Fri, 04 June 2010 11:05 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
We did it using Java not report builder.we thought this is fair enough

Thanks
sriram Smile
Re: Matrix report csv fialed for the wrng input [message #459589 is a reply to message #459104] Mon, 07 June 2010 06:14 Go to previous messageGo to next message
lakshmi83
Messages: 12
Registered: August 2008
Location: Hyderabad
Junior Member
Hello,

you can try in this way.

Write a cursor in a formula column and check if the dept is existing in the database or not by writing a query and check the below condition

var deptexists;
if exists then
deptexists=1
else deptexists=0;

in the layout for all the fields and frames in the format triggers place a condition
if deptexists=0 then hide object;


take a user parameter depttest(initial value='No Dept Exists,Please try to execute report again!!!"

Place this paramter as source for one of the field in the layout and for this also write a format trigger as below:

if deptexists=1 then
hide object;

Hopefully this will satisfy your requirement.

I mentioned only the logic here., please check the syntax's

Thanks,
Lakshmi.


Re: Matrix report csv fialed for the wrng input [message #459597 is a reply to message #459589] Mon, 07 June 2010 06:38 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
lakshmi thanks for your input ,
But i tried all the possible ways to implement that...
Mine is the error above attached(report builder crashed).
Anyway..we already got the desired message through java.

sriram Smile
Re: Matrix report csv fialed for the wrng input [message #459600 is a reply to message #459597] Mon, 07 June 2010 06:40 Go to previous messageGo to next message
lakshmi83
Messages: 12
Registered: August 2008
Location: Hyderabad
Junior Member
Hello Sai,

May i know how u implemented using Java?

Thanks,
Lakshmi
Re: Matrix report csv fialed for the wrng input [message #459603 is a reply to message #459600] Mon, 07 June 2010 06:52 Go to previous message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
sai?
I am sriram.

And I am not a Java developer.I am a DBA some times work as a report developer Wink
I will let you the code part of java once I got the code from the Java developer.
the same logic which was not able through report builder..
get the count if it is >0 then display else display the custom message

sriram Smile
Previous Topic: Help with formatting html report output?
Next Topic: how to use the System parameter
Goto Forum:
  


Current Time: Thu Apr 25 11:26:50 CDT 2024