This discussion is archived
2 Replies Latest reply: Nov 21, 2012 1:15 AM by AnnPricks E RSS

Report to excel sheet conversion

user584056 Newbie
Currently Being Moderated
Dear All,

Have a look this issue.

Issue : From report, I am displaying excel output by pressing button in report.
In excel sheet,each page of lastrow repeating for two times.

In repeating frame format trigger, I am having coding like this.

function R_1FormatTrigger return boolean is
begin
     RPT2XLS.NEW_LINE;
RPT2XLS.put_cell(1,:Q1_BRANCH_CODE);
RPT2XLS.put_cell(2,:Q1_CLASS_CODE);
RPT2XLS.put_cell(3,:Q1_SC_CODE);
RPT2XLS.put_cell(4,:Q1_CUST_GRP_CODE);
RPT2XLS.put_cell(5,:Q1_INSURED_GRP_CODE);
RPT2XLS.put_cell(6,:Q1_INSURED_CODE);
RPT2XLS.put_cell(7,:Q1_INSURED_NAME);
RPT2XLS.put_cell(8,:CP_REN_LOST);
RPT2XLS.put_cell(9,:CF_TOT_REN_LOST_YDT);
RPT2XLS.put_cell(10,:CP_PRM_LOST);
RPT2XLS.put_cell(11,:CF_TOT_PRM_LOST_YDT);
return (TRUE);
end;
  • 1. Re: Report to excel sheet conversion
    Denis Segard-Oracle Expert
    Currently Being Moderated
    Hello,

    I don't think the format trigger is a good "place" to implement this code :


    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/whatare/prgmobj/a_format_triggers.htm

    A format trigger can fire multiple times for a given object, whenever Reports Builder attempts to format the object. Consider the case where Reports Builder starts to format the object at the bottom of a page. If the object does not fit on the page, Reports Builder stops formatting and reformats on the following page. In this case, the format trigger will fire twice. It is therefore not advisable to do any kind of "persistence" operation, such as logging, in this trigger.

    ...

    Regards
  • 2. Re: Report to excel sheet conversion
    AnnPricks E Guru
    Currently Being Moderated
    Hi,

    First you create one formula column then go to plsql editor and paste your code in plsql editor. it will work...


    Thanks,
    Ann

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points