Home » Developer & Programmer » Reports & Discoverer » Report 10g output in excel problem (forms 10.1.2.0.2, Windows XP)
Report 10g output in excel problem [message #558859] Wed, 27 June 2012 00:26 Go to next message
sweetkhaliq
Messages: 200
Registered: April 2006
Senior Member

Dear Members,

I am using forms 10.1.2.0.2. I am calling the report from Forms parameter. I have passed the report_desformat=SPREADSHEET. But when i run the report it shows nothing and no out put is generated.
Please help me to find out the problem.
Parameter forms code is as under.

PROCEDURE rep_call (p_rep in char, p_param in paramlist) IS
report_id report_object;
mJob_ID varchar2(200);
mRep_Status varchar2(200);
mReportServer varchar2(100) := 'REP_SERVER';
mReportServerJob varchar2(200);
x varchar2(200);
BEGIN
report_id := find_report_object(p_rep);
set_report_object_property(report_id, report_execution_mode, runtime );
set_report_object_property(report_id, report_comm_mode, synchronous );
set_report_object_property(report_id, report_destype,cache);
set_report_object_property(report_id, report_desformat, 'SPREADSHEET' );
set_report_object_property(report_id, report_server, mReportServer);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'paramform=no');
mReportServerJob := run_report_object(report_id,p_param);
mJob_id := substr(mReportServerJob, length(mReportServer) + 2, length(mReportServerJob));
mRep_Status := report_object_status(mReportServerJob);
WHILE Mrep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
mrep_status := report_object_status(mReportServerJob);
END LOOP;
if mRep_status = 'FINISHED' then
x := '/reports/rwservlet/getjobid' || mJob_id
web.show_document (x, '_blank');
else
message('report failed with error message ' || mRep_status);
end if;
END;

Thanks & Regards
Re: Report 10g output in excel problem [message #558862 is a reply to message #558859] Wed, 27 June 2012 00:48 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, maybe report didn't produce any output because of its WHERE clause. Try to run the same report from Reports Builder and see the result.

Before posting your next message, please, have a look here - won't take more than just a few seconds, but it will teach you how to properly post your code and make it easier to read.
Re: Report 10g output in excel problem [message #558870 is a reply to message #558862] Wed, 27 June 2012 01:03 Go to previous messageGo to next message
sweetkhaliq
Messages: 200
Registered: April 2006
Senior Member

Thanks littlefoot,
Next time i will keep in mind to use the format code.
When i used report_desformat='PDF' then it show output. But when i used report_desformat='SPREADSHEET' then it did not show the output.
Now i have used this code
PROCEDURE rep_call(p_rep in char, p_param in paramlist) IS
  report_id        report_object;
  mJob_ID          varchar2(200);
  mRep_Status      varchar2(200);
  mReportServer    varchar2(100) := 'REP_SERVER';
  mReportServerJob varchar2(200);
  x                varchar2(200);
BEGIN
  report_id := find_report_object(p_rep);
  set_report_object_property(report_id, report_execution_mode, runtime);
  set_report_object_property(report_id, report_comm_mode, synchronous);
  set_report_object_property(report_id, report_destype, cache);
  set_report_object_property(report_id, report_desformat, 'PDF');
  set_report_object_property(report_id, report_server, mReportServer);
  SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_OTHER, 'paramform=no');
  mReportServerJob := run_report_object(report_id, p_param);
  mJob_id          := substr(mReportServerJob,
                             length(mReportServer) + 2,
                             length(mReportServerJob));
  mRep_Status      := report_object_status(mReportServerJob);
  WHILE Mrep_status in ('RUNNING', 'OPENING_REPORT', 'ENQUEUED') LOOP
    mrep_status := report_object_status(mReportServerJob);
  END LOOP;
  if mRep_status = 'FINISHED' then
    x := '/reports/rwservlet/getjobid' || mJob_id
         web.show_document(x, '_blank');
  else
    message('report failed with error message ' || mRep_status);
  end if;
END;


Please help me to find the problem.

Thanks & Regards.
Re: Report 10g output in excel problem [message #558904 is a reply to message #558870] Wed, 27 June 2012 03:45 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if you change DESFORMAT from SPREADSHEET to DELIMITED (or DELIMITEDDATA)?
Re: Report 10g output in excel problem [message #558909 is a reply to message #558904] Wed, 27 June 2012 04:35 Go to previous messageGo to next message
sweetkhaliq
Messages: 200
Registered: April 2006
Senior Member

dear littlefoot
thanks for reply. As i changed the DESFORMAT='DELIMITED'. The report show data in another browser which i have exported to excel but the format is not as on the actual report. Heading and images are also disappear.
i want the report should be shown in excel as original oracle report format.


Thanks & Regards
Re: Report 10g output in excel problem [message #558910 is a reply to message #558909] Wed, 27 June 2012 04:46 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, so the culprit might be the SPREADSHEET destination format. Are you sure that your Reports version supports it? For example, the first 10g release (really 9.0.4) didn't even have DESFORMAT = SPREADSHEET. Check documentation related to your version, maybe it is completely useless in your case.
Re: Report 10g output in excel problem [message #558911 is a reply to message #558910] Wed, 27 June 2012 04:53 Go to previous messageGo to next message
sweetkhaliq
Messages: 200
Registered: April 2006
Senior Member

My forms version is Forms [32 Bit] Version 10.1.2.0.2 (Production) and Report version is Report Builder 10.1.2.0.2.
According to the oracle documentation forms 10g rel 2 supports this features.
Re: Report 10g output in excel problem [message #558915 is a reply to message #558911] Wed, 27 June 2012 05:33 Go to previous message
sweetkhaliq
Messages: 200
Registered: April 2006
Senior Member

I have changed report_destype=file and run the report. Now it has generated the html file on the report path and then i have exported it to excel. Is it possible to directly run the file instead of storing it.
Previous Topic: Rename of Reports server 11g r2
Next Topic: Page control in reports 6i
Goto Forum:
  


Current Time: Thu Mar 28 16:13:46 CDT 2024