RE: How to Export the Table data Into PDF File  in ADF

Hi Experts,
I am using Jdeveloper 11.1.2.3.0
I am created employee VO and Drag and Drop as a Table in a page. So need to Export the Table data into A PDF file.
So please give me some suggestions regarding this Scnerio.
With Regards,
satish

Hi Guys ,
Any more answers for this question.
Please find my jsff below
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:f="http://java.sun.com/jsf/core" xmlns:report="http://www.adfwithejb.blogspot.com">
  <af:panelGroupLayout layout="vertical" id="pgl2">
      <af:query id="qryId1" headerText="Service Tariff Mapping Details" disclosed="true"
                value="#{bindings.findByTarifValidFromQuery.queryDescriptor}"
                model="#{bindings.findByTarifValidFromQuery.queryModel}"
                queryListener="#{reportWiseInvoiceBean.genericQueryListener}"
                queryOperationListener="#{bindings.findByTarifValidFromQuery.processQueryOperation}"
                resultComponentId="pc1::t2">
     <f:attribute name="queryExpression" value="bindings.findByTarifValidFromQuery.processQuery"/>
                      </af:query>
    <af:panelCollection id="pc1" styleClass="AFStretchWidth">
      <f:facet name="menus"/>
      <f:facet name="toolbar">
          <af:toolbar id="t1">
             <af:menuBar id="pt_m1">
            <report:reportDeclarative ButtonName="ExportToExcel" ReportName="ServiceTariffMappingDetails"
                                      ReportType="PDF" TableId=":::pc1:t2" id="rd1" Pagination="true"/>
            <af:commandButton text="excel" id="cb1" binding="#{exportToExcelBean.exportID}">
            <af:setActionListener from="pt1:pgl1:pgl2:pc1:t2" to="#{viewScope['exporter.exportedId']}"/>
            <af:setActionListener from="border:1px solid #cccccc" to="#{viewScope['exporter.thStyle']}"/>
            <af:setActionListener from="border:1px solid #cccccc" to="#{viewScope['exporter.tdStyle']}"/>
            <af:fileDownloadActionListener method="#{exportToExcelBean.exportToExcel}" filename="Service TariffMapping.xls"
                                             contentType="text/excel;chatset=UTF-8;"/>
            </af:commandButton>
            <af:commandMenuItem id="pt_cmi133" icon="/images/common/Excel-icon.png"
                                            shortDesc="ExportToExcel"
                            >
                            <af:exportCollectionActionListener exportedId="t2" type="excelHTML"
                                                               title="Service Tariff Mapping"
                                                               filename="Service Tariff Mapping.xls"/>
                        </af:commandMenuItem></af:menuBar>
          </af:toolbar>
      </f:facet>
      <f:facet name="statusbar"/>
      <af:table value="#{bindings.ServiceTariffMappingDtlsRVO1.collectionModel}" var="row"
                rows="#{bindings.ServiceTariffMappingDtlsRVO1.rangeSize}"
                emptyText="#{bindings.ServiceTariffMappingDtlsRVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
                fetchSize="#{bindings.ServiceTariffMappingDtlsRVO1.rangeSize}" rowBandingInterval="0"
                filterModel="#{bindings.findByTarifValidFromQuery.queryDescriptor}"
                queryListener="#{bindings.findByTarifValidFromQuery.processQuery}" filterVisible="true" varStatus="vs"
                id="t2" columnStretching="last" binding="#{ServiceTariffMappBean.testTable}">
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.label}"
                   id="c1">
          <af:inputText value="#{row.bindings.NormalTariffCode.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NormalTariffCode.tooltip}" id="it1">
            <f:validator binding="#{row.bindings.NormalTariffCode.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.label}"
                   id="c2">
          <af:inputText value="#{row.bindings.ServiceCode.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceCode.tooltip}" id="it2">
            <f:validator binding="#{row.bindings.ServiceCode.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.label}" id="c3">
          <f:facet name="filter">
            <af:inputDate value="#{vs.filterCriteria.TrfVldFrm}" id="id1">
              <af:convertDateTime pattern="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.format}"/>
            </af:inputDate>
          </f:facet>
          <af:inputDate value="#{row.bindings.TrfVldFrm.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.displayWidth}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.tooltip}" id="id2">
            <f:validator binding="#{row.bindings.TrfVldFrm.validator}"/>
            <af:convertDateTime pattern="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfVldFrm.format}"/>
          </af:inputDate>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.label}"
                   id="c4">
          <af:inputText value="#{row.bindings.ServiceDesc.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ServiceDesc.tooltip}" id="it3">
            <f:validator binding="#{row.bindings.ServiceDesc.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.label}" id="c5">
          <af:inputText value="#{row.bindings.OtTrfCode.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtTrfCode.tooltip}" id="it4">
            <f:validator binding="#{row.bindings.OtTrfCode.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.label}" id="c6">
          <af:inputText value="#{row.bindings.OtUnitRate.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.OtUnitRate.tooltip}" id="it5">
            <f:validator binding="#{row.bindings.OtUnitRate.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.label}" id="c7">
          <af:inputText value="#{row.bindings.NtUnitRate.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.NtUnitRate.tooltip}" id="it6">
            <f:validator binding="#{row.bindings.NtUnitRate.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.label}" id="c8">
          <af:inputText value="#{row.bindings.TrfGrt.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.TrfGrt.tooltip}" id="it7">
            <f:validator binding="#{row.bindings.TrfGrt.validator}"/>
          </af:inputText>
        </af:column>
        <af:column sortProperty="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.name}" filterable="true"
                   sortable="true" headerText="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.label}"
                   id="c9">
          <af:inputText value="#{row.bindings.ChargePartyCode.inputValue}"
                        label="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.label}"
                        required="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.mandatory}"
                        columns="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.displayWidth}"
                        maximumLength="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.precision}"
                        shortDesc="#{bindings.ServiceTariffMappingDtlsRVO1.hints.ChargePartyCode.tooltip}" id="it8">
            <f:validator binding="#{row.bindings.ChargePartyCode.validator}"/>
          </af:inputText>
        </af:column>
      </af:table>
    </af:panelCollection>
  </af:panelGroupLayout>
</jsp:root>

Similar Messages

  • How to download the script data into pdf file

    how to download the script data into pdf file
    i have one option to download the script data to pdf file --->rstxpdft4 program.
    i have one doubt how to use this proogram.or any function module to download the script data to pdf file.
    Thanks and regards,
    Sri.

    Hi      Sri Sai,
    I know one method to convert the sapscript to pdf file :
    first generate a Spool Request for the required Sapscript
    then goto transaction SP01 and copy the generated Spool Request number
    now execute the SAP report RSTXPDFT4
    here enter the copied Spool request number and the target directory into the parameters
    execute the report
    required pdf file will be generated into the target directory
    i hope it will help you out
    Please refer this simple program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Reward points if found helpful....
    Cheers,
    Eshwar.

  • To get the table data into a file in pl/sql developer

    Hi
    i have table with 90k rows, i want to get the table data into a file like excel....
    i executed the select statement it shows only 5k rows because of buffer problem.
    can u please help me any alternative way to get the table data into a file.
    using cursors like that

    Really? excel for 90K rows :)
    face/desk/floor/"Hi and sorry neighbours below, it's me again"
    Err, I see you point, thanks Dang, I completely missed the 90k recs part, I must be getting old or modern ;)
    @Ramanjaneyulu,
    can u please help me any alternative way to get the table data into a file.You can always dump a query to a file, check these:
    http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkyteflat.html
    How to create Excel file (scroll down when necessary)
    http://forums.oracle.com/forums/search.jspa?threadID=&q=export+to+excel&objID=f137&dateRange=all&userID=&numResults=15&rankBy=10001
    Depending on your database version ( the result of: select * from v$version; ) you might have some other options.

  • How to pull the table data into SAP BI

    hi all,
    i have connected to oracle database and i can see the view of the tables in sap BI.can u please help me out how to see the data inside the table and how to load that table data into info cube.

    Hi Vamshi ,
    In R3 there is a t-code RSDBC through that t-code you make your data source .
    I know you already make a connection between r3 and sql2000.
    in RSDBC in logical system name you enter your connection name,and in table /view u should enter sql table name and make sure the table name which u enter in this text box should be store in sql in capital letters and fields should be in capital letters.
    and generate your data source and execute it it show all the record .
    Thanks for material its really gud
    Ankit modi

  • How to download internal table data into xml file?

    Hi,
    Experts,
    I have downloaded internal table data into XLS format using GUI_DOWNLOAD Function module, But i didn't Know how to download internal table data into XML format please post some ideas/inputs on this issue.
    Thank you,
    Shabeer ahmed.

    check this
    data : gd_repid type sy-repid.
    GD_REPID = SY-REPID.
    DATA : L_DOM TYPE REF TO IF_IXML_ELEMENT,
           M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
           G_IXML TYPE REF TO IF_IXML,
           W_STRING TYPE XSTRING,
           W_SIZE TYPE I,
           W_RESULT TYPE I,
           W_LINE TYPE STRING,
           IT_XML TYPE DCXMLLINES,
           S_XML LIKE LINE OF IT_XML,
           W_RC LIKE SY-SUBRC.
    DATA: XML TYPE DCXMLLINES.
    DATA: RC TYPE SY-SUBRC,
          BEGIN OF XML_TAB OCCURS 0,
          D LIKE LINE OF XML,
          END OF XML_TAB.
    data : l_element           type ref to if_ixml_element,
           xml_ns_prefix_sf     type string,
           xml_ns_uri_sf        type string.
    CLASS CL_IXML DEFINITION LOAD.
    G_IXML = CL_IXML=>CREATE( ).
    CHECK NOT G_IXML IS INITIAL.
    M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
    CHECK NOT M_DOCUMENT IS INITIAL.
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
    EXPORTING
       NAME = 'REPAIRDATA'
       DATAOBJECT = IT_FINAL_LAST1[]
    IMPORTING
       DATA_AS_DOM = L_DOM
    CHANGING
       DOCUMENT = M_DOCUMENT
    EXCEPTIONS
       ILLEGAL_NAME = 1
       OTHERS = 2.
    CHECK NOT L_DOM IS INITIAL.
    W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
    *Start of code for Header
    * namespace
    t_mnr = sy-datum+4(2).
    CALL FUNCTION 'IDWT_READ_MONTH_TEXT'
      EXPORTING
        LANGU         = 'E'
        MONTH         = t_mnr
    IMPORTING
       T247          = wa_t247
    concatenate sy-datum+6(2)
                wa_t247-ktx
                sy-datum(4) into t_var1.
    concatenate sy-uzeit(2)
                sy-uzeit+2(2)
                sy-uzeit+4(2) into t_var2.
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    l_element  = m_document->get_root_element( ).
    xml_ns_prefix_sf = 'TIMESTAMP'.
    concatenate t_var1 t_var2 into xml_ns_uri_sf separated by space.
    clear : t_var1,
            t_var2,
            t_mnr,
            wa_t247.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'FILECREATOR'.
    xml_ns_uri_sf    =   'SAP'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'CLAIMGROUP'.
    xml_ns_uri_sf    = '1'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'CLAIMTYPES'.
    xml_ns_uri_sf    = 'W'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    *End of Code for Header
    CALL FUNCTION 'SDIXML_DOM_TO_XML'
    EXPORTING
      DOCUMENT = M_DOCUMENT
    IMPORTING
      XML_AS_STRING = W_STRING
      SIZE = W_SIZE
    TABLES
      XML_AS_TABLE = IT_XML
    EXCEPTIONS
      NO_DOCUMENT = 1
      OTHERS = 2.
    LOOP AT IT_XML INTO XML_TAB-D.
    APPEND XML_TAB.
    ENDLOOP.
    *Start of Code for File name
    concatenate p_file
                '\R'
                '000_119481'
                sy-datum+6(2) sy-datum+4(2) sy-datum+2(2)
                sy-uzeit(2)   sy-uzeit+2(2) sy-uzeit(2) '.xml' into p_file.
    *End of Code for File name
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE = W_SIZE
      FILENAME = p_file
      FILETYPE = 'BIN'
    TABLES
      DATA_TAB = XML_TAB
    EXCEPTIONS
      OTHERS = 10.
    IF SY-SUBRC  = 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to copy the table datas into an  open office excel file .

    Hello All ,
    I have a form which contains several pages . Each page contains some tables in it . How can we copy each table datas into an open office execl files ??
    I mean there will be several excel files each file corresponds to a particular table in the form. I am using LiveCycle Designer ES 2 . in Windows XP.
    Thanks
    Bibhu.

    Hi Bibhu,
    Here is a screenshot of exporting the form data to XML:
    I have not imported XML into Excel, but I know that Excel 2007 has tools for this in the Developer tab. I don't have Excel 2007 on this machine, so I can't get screenshots. However using Acrobat you can merge the XML file into a spreadsheet, using the same menu Forms > Manage Form Data > Merge Data Files into Spreadsheet.
    In addition you can set up a data connection to the spreadsheet. However this will only work in a Windows environment and you need to share the OLEDB data connection with all users. In addition if you Reader Enable the form with Acrobat, the data connection will not work.
    So on balance if you want to get data to a spreadsheet I would recommend export XML.
    Hope that helps,
    Niall

  • How to export the table data to the excel?

    Hi,
    I'm new to WebDynpro. im having a table 5rows and 6 columns, i need the data in the table to be exported to excel sheet by clicking on a button.
    As i went through some of the blogs and tutorials i couldn't understand the procedure, so could any one help out with detailed procedure.
    Thanks & Regards,
      Suresh

    HI! Suresh,
      This is a littile bit complicated process.Here i am trying to expalin the procedure,
    if you are having any problem then let me know.
    Following are the steps:--
    1.create two controls one of type linkToAction and other of type FileDownload and a location on your portal server say it's "/server0/temp/webdynpro/web/local/testexcel.xls"
    2.create a method in your view or controller and call this method as downLoadToXls()
    3.create a Value attribute of type binary in your context,say it's dataContent.
    4.Bind your linkToAction Control to the method downLoadToXls() and control   FileDownLoad data property to dataContent.
    5.In the init() Hook methos write the following code:--
    IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("dataContent");
    IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)  attInfo.getModifiableSimpleType();
    // In addition the FileDownload UI element needs for defined resource types
    binaryType.setFileName("testexcel.xls");
    binaryType.setMimeType(WDWebResourceType.XLS);
    6.in DownLoadToXls() method add the following code:--
    try {
            out = new FileOutputStream(path);
           workBook = new HSSFWorkbook();
          hsSheet = workBook.createSheet("UserID");
         cs = workBook.createCellStyle();
         cs1 = workBook.createCellStyle();
         cs2 = workBook.createCellStyle();
         dataFormat = workBook.createDataFormat();
         f = workBook.createFont();
         f1 = workBook.createFont();
         f.setFontHeightInPoints((short) 12);
        //make it blue
         f.setColor( (short)HSSFFont.COLOR_NORMAL );
         //make it bold
        //arial is the default font
        f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        //set font 2 to 10 point type
        f1.setFontHeightInPoints((short) 10);
        //make it red
        f1.setColor( (short)HSSFFont.COLOR_RED);
        //make it bold
        f1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        f1.setStrikeout(false);
       cs.setFont(f);
       cs.setDataFormat(dataFormat.getFormat("#,##0.0"));
       //set a thick border
       cs2.setBorderBottom(cs2.BORDER_THICK);
       //fill w fg fill color
       cs2.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);
       cs2.setFillBackgroundColor((short)HSSFCellStyle.SOLID_FOREGROUND);
       //set the cell format to text see HSSFDataFormat for a full list
       cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
       cs2.setFont(f1);
       cs2.setLocked(true);
        cs2.setWrapText(true);
        hsSheet.createFreezePane(0,1,1,1);
        row = hsSheet.createRow(0);
         cell = row.createCell((short)0 ,0);
          cell.setCellValue("User ID");
          cell.setCellStyle(cs2);
          cell = row.createCell((short)1 ,1);
          cell.setCellValue("Last Changed Password Date");
          cell.setCellStyle(cs2);
        int nodeSize = wdContext.nodeUserIDAndPass().size();
        for(int jCount=0; jCount < nodeSize; jCount++) {
         row = hsSheet.createRow(jCount+1);
           for(int count = 0; count < 2; count++) {
          if(count == 0) {
         cell = row.createCell((short)0,count);               
    cell.setCellValue(wdContext.nodeUserIDAndPass().getUserIDAndPassElementAt(jCount).getCtx_UserID());
          if(count == 1) {
            cell = row.createCell((short)1,count);
      cell.setCellValue(wdContext.nodeUserIDAndPass().getUserIDAndPassElementAt(jCount).getCtx_ChangedPasswd());
          cell.setCellStyle(cs2);                            
                                                               workBook.write(out);
    out.close();
    //Read the file that was created.
            FileInputStream fin = new FileInputStream(path);
            byte b[] = new byte[fin.available()];
           fin.read(b,0,b.length);
           fin.close();
            wdContext.currentContextElement().setDataContent(b);
      }catch(Exception e)     {
      wdComponentAPI.getComponent().getMessageManager().reportException("Exception while reading file "+e,true);                   }
    7. Add the follwoing constant at the end:--
    private FileOutputStream out = null;
         private HSSFWorkbook workBook = null;
         private HSSFSheet hsSheet = null;
         private HSSFRow row = null;
         private HSSFCell cell = null;
         private HSSFCellStyle cs = null;
         private HSSFCellStyle cs1 = null;
         private HSSFCellStyle cs2 = null;
         private HSSFDataFormat dataFormat = null;
         private HSSFFont f = null;
         private HSSFFont f1 = null;
         private String path = "/server0/temp/webdynpro/web/local/testexcel.xls";
    8.Add the follwowing jars in your classPath.
    1)poi-3.0.1-FINAL-20070705.jar
    2)jxls.jar
    regards,
    Mithileshwar

  • How to conver the oracle data into xml files

    Hi All,
    I have a table for ex emp, now i want to generate every row into an xml file. could anyone pls help...
    ex:- emp table
    eno ename sal
    1    bond  3000
    2    kiran    2000
    3    jai       1000
    4    henry   500
    o/p :-  i have to get a column in 4 different files for this 4 rows.
    1.xml file        should contain data  <ID>1</ID><eNAME>bond</eNAME><sal>3000</sal>
    2.xml file        should contain data  <ID>2</ID><eNAME>kiran</eNAME><sal>2000</sal>
    3.xml file       should contain data  <ID>3</ID><eNAME>jai</eNAME><sal>1000</sal>
    4.xml file       should contain data  <ID>1</ID><eNAME>bond</eNAME><sal>500</sal>
    regards,
    Badri.

    You can do it like this :
    begin
      for r in (
          select empno
               , xmlserialize(content xmlforest(empno as "ID", ename, sal)) as xmlcontent
          from scott.emp
      loop
        dbms_xslprocessor.clob2file(r.xmlcontent, 'TEST_DIR', to_char(r.empno) || '.xml');
      end loop;
    end;

  • How to save the form data into adobe db?

    Hi All,
    How to save the form data into adobe db?
    I have designed one xdp file.
    Through processFormSubmission(), I got the submitted form data as Document obj.
    Then I have called the workflow kickoff program.
    code:
    InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
    "invoke", //Specify the operation name
    params, //Specify input values (HashMap obj)
    false); //Create an asynchronous request
    It successfulyy started the workflow, but the submitted form data is not saved anywhere.
    And also, How get the form data from tables?
    Please provide the solution for the above.
    Thanks in advance.
    Regards,
    Saravanan G

    You need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
    Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
    Jasmin

  • How to insert one table data into multiple tables by using procedure?

    How to insert one table data into multiple tables by using procedure?

    Below is the simple procedure. Try the below
    CREATE OR REPLACE PROCEDURE test_proc
    AS
    BEGIN
    INSERT ALL
      INTO emp_test1
      INTO emp_test2
      SELECT * FROM emp;
    END;
    If you want more examples you can refer below link
    multi-table inserts in oracle 9i
    Message was edited by: 000000

  • How to populate the Quering data into Excel sheet in Oracle

    Dear Guys,
    How to populate the Quering data into Excel sheet in oracle.
    Please provide a solution.
    Thanks & Regards,
    Senthil K Kumar

    Hi
    To make Excel sheets from sqlplus, you can use the markup html tag in sqlplus.
    Here's an example.
    Example
    <code>
    SET LINESIZE 4000
    SET VERIFY OFF
    SET FEEDBACK OFF
    SET PAGESIZE 999
    SET MARKUP HTML ON ENTMAP ON SPOOL ON PREFORMAT OFF
    SPOOL c:\test_xls.xls
    SELECT object_type
    , SUBSTR( object_name, 1, 30 ) object
    , created
    , last_ddl_time
    , status
    FROM user_objects
    ORDER BY 1, 2
    SPOOL OFF
    SET MARKUP HTML OFF ENTMAP OFF SPOOL OFF PREFORMAT ON
    SET LINESIZE 2000 VERIFY ON FEEDBACK ON
    </code>

  • How to download the Dynamic data into PPT format

    Hi Friends,
    I have one doubt on WDJ. How to download the Dynamic data into PPT format. For Example Some Dynamic data is available in to View in that One Download Link or button available. Click on Download link or button download that data into PPT Format
    Is it possible for WDJ. If possible please tell me.
    Or
    How to create Business Graphics in Web Dynpro Applications depening up on Excel Data and finally we can download the  Business Graphics  into powerpoint presentation.
    Thank you,
    Regards
    Vijay Kalluri
    Edited by: KalluriVijay on Mar 11, 2011 6:34 AM

    Hi Govindu,
    1. I have one doubt on WDJ. Click on either Submit Buttion or LinkToURL UI we can download the file that file having ppt formate(Text.PPT).
    I am using NWDS Version: 7.0.09 and Java Version: JDK 1.6
    2. is it possible to download the business Graphics in to the PPT by using Java DynPro
    Regards
    VijayK

  • Export table data to Pdf file

    Hi all,
    I have a .jspx page wich contains a table and a button with an exportCollectionActionListener to export the table data to an excell file.
    Now i want to do the same but to a pdf file.
    Is that posible, and if so how can I do that?
    If it isn't posible is there any way to do that.
    Thanks all,
    Rowan

    Hi!
    Yes, the first step is to learn iReport. Then, investigate Jasper Forums where you will find lot of code and hints.
    To produce a report you have to:
    1. Create report definition and compile it in report files used by Jasper API later on (this you learn on Jasper forums)
    2. Create java code in your project to generate report (based on datasource in your app) - this is just java code which doesnt have anything special to ADF/JDev - learn this also on Jasper forums
    3. Decide which mechanism you will use to downstream report output (whichever render you select when generate report - PDF, HTML, Excle, RTF...) - there are two options:
    a. Use standard JSP Servlet, where you just have to generate report and downstream it into servlet's output stream
    b. more ADF 11g way - using af:fileDownloadActionListener with backingbean to downstream a generated report content
    That's it. You have to design your own strategy for supplying report query parameters (through Http Request params or any other way dependent on mechanism you decide to use).
    Try Googling for Jdeveloper Jasper and you will find several blogs/forums on this topic (try JDeveloper and Jasper.. HTML Report without information The servlet technique is same as in 10g and for ADF 11g way you have to manage yourself.
    Regards,
    PaKo

  • Java.io.NotSerializableException when overwrite the JTable data into .txt file

    hi everyone
    this is my first time to get help from sun forums
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
    but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    the following is my code...some of it i create it with the GUI netbean
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    this is the code that suspect maybe some error here
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2);
                   oos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                   return;
              System.out.println("JTable correctly saved to file " + filename);
    }the full code will be at the next msg

    this is the part 1 of the code
    this is the full code...i had /*....*/ some of it to make it easier for reading
    package gui;
    import javax.swing.*;
    import java.io.*;
    public class timetables extends javax.swing.JFrame {
        public timetables() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            jTextField1 = new javax.swing.JTextField();
            jLayeredPane1 = new javax.swing.JLayeredPane();
            jLabel6 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jScrollPane3 = new javax.swing.JScrollPane();
            jTable2 = new javax.swing.JTable();
            jScrollPane4 = new javax.swing.JScrollPane();
            jTable3 = new javax.swing.JTable();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
    /*       org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 400, Short.MAX_VALUE)
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
            String filename1 = "studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable2 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable3 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            jTable2.setRowHeight(20);
            jTable3.setRowHeight(20);
            jScrollPane3.setViewportView(jTable2);
            jScrollPane4.setViewportView(jTable3);
            jTable2.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
            jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
            jTextField1.setText("again n again");
            jLabel6.setText("jLabel5");
            jLabel6.setBounds(0, 0, -1, -1);
            jButton2.setText("jButton2");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
          

  • How to convert internal table data to PDF format

    HI,
         I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
    Kishore

    In which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
    Smartform to PDF to EMAIL
    This shows convertion of smartform to pdf and send it through email
    Regards,
    Abhishek

Maybe you are looking for