Creating a PDF report from a Form

Hi all,
Is it possible to create a PDF REPORT from a table based Form?
Thanks,
Maurice Niezen

You can NOT use FOP and the BI Publisher RTF editor to make templates for PDF output.. You need an XML style sheet editor to format the report layouts..: http://www.java4less.com/fopdesigner/fodesigner.php
Thank you,
Tony Miller
Webster, TX
Never Surrender Dreams!
JMS
If this question is answered, please mark the thread as closed and assign points where earned..

Similar Messages

  • How to add entire new row at the top of table in pdf report from c# windows forms using iTextSharp

    Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
    First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Text;
    using System.Data;
    using System.IO;
    using System.Data.SqlClient;
    using System.Windows.Forms;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    namespace DRRS_CSharp
    public partial class frmPDFTechnician : Form
    public frmPDFTechnician()
    InitializeComponent();
    private void btnExport_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    PdfPTable inner = new PdfPTable(1);
    inner.WidthPercentage = 115;
    PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
    inner.AddCell(celt);
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(inner);
    doc.Add(table);
    doc.Close();
    The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
    But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
    Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
    given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    So my question is how to make my column headers in bold?
    So these are my questions.
    1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?
    I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
    Any help or guidance in solving this problem would be greatly appreciated.
    vishal

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creating an XML Report from OAF page

    Hi All,
    I have a requirement to create a PDF report from an OAF page. From the below code , I was able to print the XML with the values.
    I know i should map this XML to RTF by creating the Data defiition through XML publisher responsibility.
    My understanding :
    1. Generate the XML from Conttroller
    2. Load the XML to RTF and map the fields
    3. Register as Data Definition and RTF
    4. Output seen
    MY QUESTION IS : If i load the values from the below XML to the RTF and register in the data definition , i will get the same values every time it is right . From my understanding, if the data has to change in the report, ,there should be a way which will directly send the generated xml from the controller to the RTF (Without step2)
    I DEFINITELY BELIEVE, THAT I AM MISSING SOME THING HERE . PLEASE HELP ME
    public void processRequest(OAPageContext pageContext,
    OAWebBean webBean) {
    super.processRequest(pageContext, webBean);
    OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("colorVO1");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    //(XMLNode)vo.writeXML(4,"")
    try {
    ((XMLNode)vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS)).print(outputStream);
    } catch (IOException e) {
    // TODO
    throw new OAException("The value of VO is " + vo,
    OAException.CONFIRMATION);
    System.out.println(outputStream.toString());
    Generated XML :
    <colorVOEx3Row>
    <UserName>abc</UserName>
    <UserId>33102</UserId>
    <CreatedBy>27241</CreatedBy>
    <Clr1>0</Clr1>
    </colorVOEx3Row>
    <colorVOEx3Row>
    <UserName>deg</UserName>
    <UserId>33604</UserId>
    <CreatedBy>1135</CreatedBy>
    <Clr1>0</Clr1>
    </colorVOEx3Row>
    <colorVOEx3Row>
    <UserName>****mno</UserName>
    <UserId>33643</UserId>
    <CreatedBy>24587</CreatedBy>
    <Clr1>2</Clr1>
    </colorVOEx3Row>
    </colorVOEx3
    Please let me know what should me my next steps to generate the report. if i load the XML above to the RTF , irresepscive of my data from teh page, i will always get the 3 rows.i..e..(abc,def,*** mno).
    Hope i am clear.

    Hi Anand,
    Thanks for your reply. I have gone through the link you provided . It gave me excellent information. But just one clarification , when we create the data definition, dont we have to add any of the files like 'XML Schema','Data Template','Preview Data','Bursting Control File'.
    The reason, i am asking this question is, when i proviously worked with XML reports in 11.10.2, we used to attach a .xml file to the Data Template of the data definition ,which would populate the RTF.
    Now here, if i dont attach that file in the data definition, will the XML data direclty mapped from contrlloer ?. I assume ,The only thing i need to do is to MAP the XML tags to RTF before registering ..
    Please let me know if i am missing some thing
    Thanks
    Sunny

  • Calling a Report from a Form

    I have uploaded my form to the app server and compiled to Linux. I have copied my RDF file to the reports_path/demo directory. I can run the report via a link from our portal using the URL as follows:
    /reports/rwservlet?report=IndRpt.rdf&desformat=pdf&destype=cache&userid=' target="_blank"
    That opens the report in a separate window, which is what we want. So far, so good.
    I can run the form via a link from our portal as well using the URL as follows:
    /forms/frmservlet?config=bsc_ind
    The config section hides all the form parameters very nicely.
    In the portal, I created a Report Server Access portlet, REP_OMHAST2_MIDTIER, and use the following set_report_object calls in my form:
    repid := find_report_object('IndRep');
    SET_REPORT_OBJECT_PROPERTYrepid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTYrepid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTYrepid,REPORT_SERVER,'rep_omhast2_midtier');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,ls_param);
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://omhast2.omh.state.ny.us:7777/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_omhast2_midtier ','_blank');
    All that comes right out of the white paper.
    Now here's the weird part, I have never seen this before. When I click my "Show Report" button in my form, the report seems to be running, but then I get a very strange dark grey, square icon superimposed over my mouse pointer. The icon has a small yellow "starburst" pattern with a tiny red exclamation point inside. The report does not appear on screen.
    Incidentally, all of this works correctly when I run the same scenario on my workstation using the call to rwserver as: rwserver server=rep_omhast2_midtier. But when we port it to the app server, it does not run. I think it has to be in the way the form calls the report because the report will run as a stand-alone object.
    Anything apparent to anyone out there?

    Well, it looks like I stumped the band. And with good reason. Sorry for the error. The problem was that the user running the form and the report had a pop-up blocker that was blocking the report. The form and the report ran from another machine. I allowed pop-ups from the report's URL and that enabled the report to appear.
    So, here we have another example of how to call a report from a form. Again, I am sorry for any angst this may have caused.

  • How can you create a pdf report to attach to an email?

    I have a need to create a PDF report with graphics and signature and somehow attached the PDF document to and email to send out. This is all hopefully done in my APEX application. Has anyone done anything similar?

    I have several projects that use PL/PDF - with the pdf form filling API's - to populate pdf form and then attach the output to a BLOB variable in PL/SQL - which can then be attached to e-mail, displayed to user's browser, and saved into a BLOB column in a table. If you are comfotable with coding PL/SQL packages, this is not difficult to do at all.
    The goodness of PL/PDF is that it is composed of PL/SQL packages with some wrapped Java programs - the output is generated directly from the database. You don't need to deal with the complexity and security concerns of calling an external Java middle tier to return the document. However, if you are not comfortable with PL/SQL coding, this may be a lot of work because the software does not have a report designer like Oracle BI Publisher, which costs more than $90K to run on a 2-CPU Server.
    Thanks.
    Andy

  • Problem with printing oracle 9i report from my form

    i got some problem in printing my report in PDF format. i am printing the report from
    my form as mentioned below. the report is printing but its giving a message
    File does not begin with '%PDF-'
    my idea is to show the report and print the report simultaneously. if i remove the
    web.show_document part then i didn't get that error.
    what is reason for this and how can i rectify it?
    pl_id:=create_parameter_list('GinMastList');
                   add_parameter(pl_id,'P_GINO',text_parameter,Trim(:Block3.text_item7));
                   --add_parameter(pl_id,'P_ToDt',text_parameter,Trim(:Block3.text_item9));
                   --add_parameter(pl_id,'P_todt',text_parameter,Trim(:Block3.text_item10));
              repid := find_report_object('PREPGIN');
                   --Set_Report_Object_Property(repid,Report_FileName,VarSetFName||'reports\NewParamGin.rdf');           
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'\\NV\HPLaserJ');
              --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rserver90');
              --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=yes');
              v_rep := RUN_REPORT_OBJECT(repid,pl_id);
              rep_status := REPORT_OBJECT_STATUS(v_rep);
              WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
              LOOP
              rep_status := report_object_status(v_rep);
              END LOOP;
         message(rep_status);
         message(rep_status);
              IF rep_status = 'FINISHED' THEN
              WEB.SHOW_DOCUMENT('http://sylnvb2:8888/reports/rwservlet/getjobid'||
              substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rserver90','_blank');
              ELSE
              MEssage(Message_Code||' '||Message_Type||' '||Message_TExt);
                        MEssage(Message_Code||' '||Message_Type||' '||Message_TExt);
              END IF;
              -- the paramter list is to be destroyed only the end of the report execution or else it will generate
              -- empty report
                   if not id_null(pl_id) then
                        destroy_parameter_list(pl_id);
                   end if;

    hello,
    there are two ways to do this :
    1) submit two jobs, one that prints and one that creates the PDF
    2) use reports advanced distribution to print and create a PDF file on the server as part of the same job, and then use web.show_document to bring up the PDF in the browser.
    however, this brings up the question, why exactly you want to print and display at the same time. why not display it and let the user print form Acrobat Reader.
    thanks,
    ph.

  • Generatation of 4 PDF Reports from One Oracle reports 10 G

    Hi All,
    i am generating 4 PDF reports from one Oracle reports in 10 G.
    i used RUN_REPORT_OBJECT built in 4 times with some different parameter list at a single time.
    some time it generates but some time it generate 2 or 3 out of 4.
    Can you anyone help me on this issue.
    Regards,
    Abhishek
    Code that i used for generation of report:
    on key-F0:
    DECLARE
         PL_ID PARAMLIST;
         PL_NAME VARCHAR2(10) := 'REP';
         USRNM VARCHAR2(50);
         pl_id2 paramlist;
         pl_name2 varchar2(10):= 'REP';
         usrnm2 varchar2(50);
         pl_id3 paramlist;
         pl_name3 varchar2(10):= 'REP';
         usrnm3 varchar2(50);
         pl_id4 paramlist;
         pl_name4 varchar2(10):= 'REP';
         usrnm4 varchar2(50);
    BEGIN
                        USRNM := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID := GET_PARAMETER_LIST(PL_NAME);
                        IF NOT ID_NULL(PL_ID) THEN
                             DESTROY_PARAMETER_LIST(PL_ID);
                        END IF;
                        PL_ID := CREATE_PARAMETER_LIST(PL_NAME);
                        IF ID_NULL(PL_ID) THEN
                                  MESSAGE('Error Creating Parameter List ');
                        END IF;
                        ADD_PARAMETER(PL_ID, 'P_PRNT_C_FAM_ID', TEXT_PARAMETER, :PRNT_C_FAM_ID);
                        ADD_PARAMETER(PL_ID, 'P_NOTICE_DATE', TEXT_PARAMETER, TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID, 'P_REDET_DATE', TEXT_PARAMETER, TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID, 'USR_NM', TEXT_PARAMETER, USRNM);
                             ADD_PARAMETER(PL_ID, 'SCHEDULE', TEXT_PARAMETER, :RUN_TIME);
                   ADD_PARAMETER(PL_ID,'P_PRNT_PROV',TEXT_PARAMETER,'PRNT');
                   ADD_PARAMETER(PL_ID, 'P_ENG_SP', TEXT_PARAMETER,'N');
                   REDET_REPORT('506',PL_ID,'CT506_Parent_FamId_Eng'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
                   USRNM2 := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID2 := GET_PARAMETER_LIST(PL_NAME2);
                        IF NOT ID_NULL(PL_ID2) THEN
                             DESTROY_PARAMETER_LIST(PL_ID2);
                        END IF;
                        PL_ID2 := CREATE_PARAMETER_LIST(PL_NAME2);
                        IF ID_NULL(PL_ID2) THEN
                                  MESSAGE('Error Creating Parameter List');
                        END IF;
                        ADD_PARAMETER(PL_ID2,'P_PRNT_C_FAM_ID',TEXT_PARAMETER,:PRNT_C_FAM_ID);
                        ADD_PARAMETER(PL_ID2,'P_NOTICE_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID2,'P_REDET_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID2,'USR_NM',TEXT_PARAMETER,USRNM2);
                        ADD_PARAMETER(PL_ID2,'SCHEDULE',TEXT_PARAMETER,:RUN_TIME);
                   ADD_PARAMETER(PL_ID2,'P_PRNT_PROV',TEXT_PARAMETER,'PRNT');
                        ADD_PARAMETER(PL_ID2,'P_ENG_SP',TEXT_PARAMETER,'Y');
                        REDET_REPORT('506',PL_ID2,'CT506_Parent_FamId_Sp'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
                   USRNM3 := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID3 := GET_PARAMETER_LIST(PL_NAME3);
                        IF NOT ID_NULL(PL_ID3) THEN
                             DESTROY_PARAMETER_LIST(PL_ID3);
                        END IF;
                        PL_ID3 := CREATE_PARAMETER_LIST(PL_NAME3);
                        IF ID_NULL(PL_ID3) THEN
                                  MESSAGE('Error Creating Parameter List');
                        END IF;
                        ADD_PARAMETER(PL_ID3,'P_PRNT_C_FAM_ID',TEXT_PARAMETER,:PRNT_C_FAM_ID);
                        ADD_PARAMETER(PL_ID3,'P_NOTICE_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID3,'P_REDET_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID3,'USR_NM',TEXT_PARAMETER,USRNM3);
                        ADD_PARAMETER(PL_ID3,'SCHEDULE',TEXT_PARAMETER,:RUN_TIME);
                        ADD_PARAMETER(PL_ID3,'P_PRNT_PROV',TEXT_PARAMETER,'PROV');
                        ADD_PARAMETER(PL_ID3,'P_ENG_SP',TEXT_PARAMETER,'N');
                        REDET_REPORT('506',PL_ID3,'CT506_Prov_ProvId_Eng'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
                        USRNM4 := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID4 := GET_PARAMETER_LIST(PL_NAME4);
                        IF NOT ID_NULL(PL_ID4) THEN
                             DESTROY_PARAMETER_LIST(PL_ID4);
                        END IF;
                        PL_ID4 := CREATE_PARAMETER_LIST(PL_NAME4);
                        IF ID_NULL(PL_ID4) THEN
                                  MESSAGE('Error Creating Parameter List');
                        END IF;
                        ADD_PARAMETER(PL_ID4,'P_PRNT_C_FAM_ID',TEXT_PARAMETER,:PRNT_C_FAM_ID);
                        ADD_PARAMETER(PL_ID4,'P_NOTICE_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID4,'P_REDET_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
                        ADD_PARAMETER(PL_ID4,'USR_NM',TEXT_PARAMETER,USRNM4);
                        ADD_PARAMETER(PL_ID4,'SCHEDULE',TEXT_PARAMETER,:RUN_TIME);
                        ADD_PARAMETER(PL_ID4,'P_PRNT_PROV',TEXT_PARAMETER,'PROV');
                        ADD_PARAMETER(PL_ID4,'P_ENG_SP',TEXT_PARAMETER,'Y');
                        REDET_REPORT('506',PL_ID4,'CT506_Prov_ProvId_Sp'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
                        Message('Notice Submitted For Printing');
                   EXIT_FORM;
    END;
    Program unit:
    PROCEDURE REDET_REPORT(rep_name in Varchar2,plist in ParamList,rep_pdf_name in Varchar2)IS
              filecode varchar(2);
              Repnm varchar(30);
              report_id REPORT_OBJECT;
              report_id_hear REPORT_OBJECT;
              report_prop VARCHAR2(20);
              v_rep VARCHAR2(100);
              rep_status VARCHAR2(200);
              bat_loc varchar2(200);
              time_slot varchar2(100);
              rep_folder_name varchar2(100):='Redet Notice for Packets Sent\';
    BEGIN
                   Filecode := init.GetFileNmCode;
    if filecode <> 'FL' then
    if upper(substr(rep_name,1,2)) ='CC' then
    RepNm := filecode||substr(rep_name,3);
    else
         if rep_name != 'viewerr' then
    RepNm := filecode||rep_name;
         else
              RepNm := rep_name;
         end if;
    end if;
    end if;
              Begin
                        begin
                        report_id := find_report_object(RepNm);
                        if error_code = '41219' then
                        Message('Unable to execute : '|| RepNm);
                             Raise FORM_TRIGGER_FAILURE;
                        end if;
                   end;
                        set_report_object_property(report_id, REPORT_FILENAME, RepNm);
                        set_report_object_property(report_id, REPORT_SERVER, init.Appl_Repserver);
                        SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_EXECUTION_MODE, BATCH);
                        SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE,SYNCHRONOUS);
                        set_report_object_property(report_id, REPORT_DESFORMAT,'PDF');
              select rprm_param_val||rep_folder_name||rep_pdf_name||'.pdf' into bat_loc from rprm where rprm_param_name = 'BAT_LOC';
              SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,FILE);
              SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_DESNAME,'"'||bat_loc||'"');
              begin
              v_rep := RUN_REPORT_OBJECT(report_id,plist);
              exception when others then
                   Message('Error While executing running reports ::'||error_code);
              end;
         end;
    END;

    Abhishek,
    Please post your question in the Reports forum. This forum is for Forms related questions.
    Craig...

  • How to run the 9I report from the forms menue 9i

    how to run the 9I report from the forms menue 9i.
    Shehzad Latif

    Hi,
    1. create a Reports Object node in Forms. If you use teh same object node name then you can write generic code that works in all Forms
    2. Get the whitepaper about Forms/reports integrtion
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    Frank

  • E-mailing pdf-report from Adobe

    In a Forms application running on a 10g applicationserver (9.0.4.1.0) I am calling a reportserver to create a pdf-report and show it on the screen. I am using web.show_document to achieve this. The report is shown in Adobe Reader in the Browser window (Int Explorer). If I then press the Email button in Adobe a new Outlook message window is opened with the pdf-file already inserted as attachment. This allows me to sent the Report immediately by E-mail.
    I have a two questions regarding the use of the feature.
    I am performing application management on the application for a costomer on a different location. The feature described above works in my development surrondings. The customer can do the same actions as described, with the exception that the report is NOT automatically attached to the new mail-message. I am trying to determine the reason for this.
    The E-mailing feature and linking as attachment seems to work fine when used outside the browser. Also, when opening a pdf-file from the internet and pushing the Email button the file is automatically linked as attachment. These steps work equally for me and the client. However, when starting from a reportserver the attachment is missing for the client, as described above.
    What could be the reason for the difference in behaviour? The only difference that I see is that the costomer uses Adobe 6 (an not able to upgrade) and I am using Adobe 7.
    Another question is regarding the name of the attachment. What determines the name of the attachment the Outlook uses when performing this type of E-mailing?

    Hi,
    you really should ask thsi question on an Adobe forum because this would happen to any PDF files not only those generated by Reports or accessed from Forms.
    Do you know that Oracle Reports, since version 9i, can send PDF attached to emails ?
    Frank

  • Calling Report from Oracle form 11g

    I am new to Forms 11g, trying to call report from Oracle forms 11g .
    I want to call report from oracle forms, but its giving error.
    Below is the code
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    repid := FIND_REPORT_OBJECT('empreport'); -- report node in forms builder
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, BATCH);
    set_report_object_property ( repid, report_filename, 'empreport.rdf' ); -- report name
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'RptSvr'); -- report server name
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    if
    rep_status = 'FINISHED'
    then
    WEB.SHOW_DOCUMENT('http://inorasrv-pc:7001/reports/dtd/rwservlet/getjobid='||v_rep||'?server='||'RptSvr','_blank');
    else
    message ( 'error while running reports-object ' || error_text );
    message ( ' ' );
    clear_message;
    end if;
    end;
    Above code giving following error :
    Unable to connect to report server RptSvr
    I think my report servername is wrong
    Where to find report server name in 11g.
    I am Using weblogic server, so can i give weblogic server name
    Thanks in advance.
    Edited by: parapr on Aug 17, 2012 1:52 AM
    Edited by: parapr on Aug 17, 2012 3:21 AM

    Hi,
    You have to have the report server
    a. Installed and configured
    b. Running.
    See
    http://docs.oracle.com/cd/E21764_01/bi.1111/b32121/pbr_strt001.htm
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_verify004.htm
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_conf003.htm#i1007341
    If you are using rwservlet then you will find the name from the Configuration file referred to in the last link.
    Cheers,

  • Calling report from a form with user input parameters

    Hello,
    I am new to Oracle reports. I have an application coded in 6i. I am currently running the application in Oracle Forms Builder 9i. There are also few reports which are called from the forms. Since the application was developed in 6i, the report was called using Run_Product. The forms pass a set of user parameters to the report using the parameter list pl_id. The syntax used was Run_Product(REPORTS, 'D:\Report\sales.rdf', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
    I learnt that the Run_product doesnt work in 9i and we need to use run_report_object. I have changed the code to use run_report_object and using web.show_document () i am able to run the report from the form. There are 2 parameters that need to be passed from forms to reports. The parameters are from_date and to_date which the user will be prompted to enter on running the form. In the report, the initial values for these parametes are defined. So, the report runs fine for the initial value always. But when i try to change the user inputs for the form_date and to_date, the report output doesnt seem to take the new values, instead the old report with the initial values(defined in the report) runs again.
    Can someone give me the code to pass the user defined parameters to the report from the forms? I have defined a report object in the forms node as REPTEST and defined a parameter list pl_id and added form_date and to_date to pl_id and used the following coding:
    vrepid := FIND_REPORT_OBJECT ('REPTEST');
    vrep := RUN_REPORT_OBJECT (vrepid,pl_id);
    But this doesnt work.
    Also, Should the parameters defined in the forms and reports have the same name?

    Thanks for the quick response Denis.
    I had referred to the document link before and tried using the RUN_REPORT_OBJECT_PROC procedure and ENCODE functions as given in the doc and added the following SET_REPORT_OBJECT_PROPERTY in the RUN_REPORT_OBJECT_PROC :
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    But this also dint work. Please help me understand what difference does setting paramform=no OR paramform=yes make?
    In the report, i have defined the user parameters as FROM_DATE and TO_DATE respectively so that they match the form datablock BLK_INPUT items FROM_DATE and TO_DATE.
    My WHEN_BUTTON_PRESSED trigger is as below:
    DECLARE
    report_id report_object;
    vrep VARCHAR2 (100);
    v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
    v_connect VARCHAR2 (30) := '&userid=scott/tiger@oracle';
    v_report_server VARCHAR2 (30) := 'repserver90';
    BEGIN
    report_id:= find_report_object('REPTEST');
    -- Call the generic PL/SQL procedure to run the Reports
    RUN_REPORT_OBJECT_PROC( report_id,'repserver90','PDF',CACHE,'D:\Report\sales.rdf','paramform=no','/reports/rwservlet');
    END;
    ... and the SET_REPORT_OBJECT_PROPERTY code in the RUN_REPORT_OBJECT_PROC procedure is as:
    PROCEDURE RUN_REPORT_OBJECT_PROC(
    report_id REPORT_OBJECT,
    report_server_name VARCHAR2,
    report_format VARCHAR2,
    report_destype_name NUMBER,
    report_file_name VARCHAR2,
    report_otherparam VARCHAR2,
    reports_servlet VARCHAR2) IS
    report_message VARCHAR2(100) :='';
    rep_status VARCHAR2(100) :='';
    vjob_id VARCHAR2(4000) :='';
    hidden_action VARCHAR2(2000) :='';
    v_report_other VARCHAR2(4000) :='';
    i number (5);
    c char;
    c_old char;
    c_new char;
    BEGIN
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,' FROM_DATE='||:BLK_INPUT.FROM_DATE||' TO_DATE='||:BLK_INPUT.TO_DATE||' paramform=no');
    hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
    hidden_action := hidden_action||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
    hidden_action := hidden_action||'&desformat='||GET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);
    hidden_action := hidden_action ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
    c_old :='@';
    FOR i IN 1..LENGTH(report_otherparam) LOOP
    c_new:= substr(report_otherparam,i,1);
    IF (c_new =' ') THEN
    c:='&';
    ELSE
    c:= c_new;
    END IF;
    -- eliminate multiple blanks
    IF (c_old =' ' and c_new = ' ') THEN
    null;
    ELSE
    v_report_other := v_report_other||c;
    END IF;
    c_old := c_new;
    END LOOP;
    hidden_action := hidden_action ||'&'|| v_report_other;
    hidden_action := reports_servlet||'?_hidden_server='||report_server_name|| encode(hidden_action);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
    -- run Reports
    report_message := run_report_object(report_id);
    rep_status := report_object_status(report_message);
    IF rep_status='FINISHED' THEN
    vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
    message('job id is'||vjob_id);pause;
    WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
    ELSE
    --handle errors
    null;
    END IF;
    In the code - " hidden_action := hidden_action ||'&'|| v_report_other; " in the RUN_REPORT_OBJECT_PROC procedure above, how do i make sure that the v_report_other variable reflects the user input parameters FROM_DATE and TO_DATE ??? v_report_other is initialised as v_report_other VARCHAR2(4000) :=''; in the procedure. Will ensuring that the v_report_other contains the user input parameters FROM_DATE and TO_DATE ensure that my report will run fine for the input parameters?
    Thanks in advance.
    Edited by: user10713842 on Apr 7, 2009 6:05 AM

  • OBE - Creating a PDF Report

    http://www.oracle.com/technology/obe/hol08/apexprnt/apexprnt_otn.htm
    At the above link is a samle demo of how to create a PDF report using Oracle 11g, BI Publisher, BI Publisher Desktop.
    I am stuck at the step # 8:
    Import the Printing Application in Application Builder using the printapp.sql file located in the directory where you unzipped the file in the previous step.
    I have the above referenced file and when I execute it I get the following error:
    SQL> alter session set current_schema=APEX_030200;
    Session altered.
    SQL>
    SQL> @prntapp
    APPLICATION 107 - Printing Application
    Set Credentials...
    Check Compatibility...
    API Last Extended:20090112
    Your Current Version:20090112
    This import is compatible with version: 20070108
    COMPATIBLE (You should be able to run this import without issues.)
    Set Application ID...
    begin
    ERROR at line 1:
    ORA-02291: integrity constraint (APEX_030200.WWV_FLOWS_FK) violated - parent
    key not found
    ORA-06512: at "APEX_030200.WWV_FLOW_API", line 555
    ORA-06512: at line 3
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    The BI publisher is working fine as I can see all the executive reports as well as all the demos work fine.
    Also: At the below URL
    http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html#03
    At step 5: 5. Installing and Configuring Apache FOP
    I am expected to install the fop.war file using OEM. I have OEM for 11g working but I don't see the application component, just the Database. How do I get the App component working. The BI Publisher was installed using "basic" option as suggested by the OBE I am using.
    Thanks a lot for your help.
    Mohsin

    Hi Venkatv and everyone.
    This is the link where I found about Including Dynamic Images in a Report.
    http://www.oracle.com/technetwork/testcontent/apexprnt2-otn-098981.html
    It's so easy and clear to do.
    Good Luck!!!
    Regards.
    Ayrem

  • Calling a report from oracle form 10g

    how to call a report from oracle form 10g

    Please see the link:
    http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf

  • Calling Report From Oracle Forms

    Hi
    I am calling this one report from oracle forms, I am using global temporary table to run that report. I am first inserting data into the temporary table through oracle form and then i am calling report in that form to view the data in that temporary table. The problem is, we can not view the data of an other session if we are using temporary table. When i call report from that form a new session get created due to which i can not see the data. Is there any method of calling report from oracle form that a same session is used to run the report?
    Thanks.

    As you mention Forms and Reports do not share the database session. I had the same problem and resolved it using record groups and DATA_PARAMETER to transfer data from Forms to Reports. You could also read the Note 110495.1 on Metalink to find useful information regarding this issue.
    Adi

  • How to print BIP reports from Oracle Forms?

    Hi all,
    I have a question in regards to printing BIP reports from Oracle Forms... We are aiming for a server installation of BIP with integration to Oracle Forms using SSO to handle security. We use Forms built-in web.show_document to render and view the report in PDF/Excel etc... We would like to by pass the viewing and print some of these reports directly to the printer.
    Any idea/suggestions how we can go about this?
    Thanks in advance for your time.
    Yahya

    Yahya,
    via HTTP it's not possible to send a report directly to the printer. You had to go via the Scheduler, which is able to do that. With the WebService API you can call a report with the Scheduler and Execute Immediate.
    Regards
    Rainer

Maybe you are looking for