Formatting CSOM output

Hi
I have a list and using CSOM to surface information. However all the examples I found show an alert box or Gridview to output the information.
I would like the list items to show in a tabular form, this could be div or something so I can style it. In addition it would be useful to have some sort of pagination, i.e. a link to show next set of list items (in batches).
The following code  pages through a list but gives an alert box, need to modify it so it shows in tabular form.
Any ideas?
var listItems; //holds retrieved list items
var query; //must continue to reuse the same query object for paging to work
var targetList; //list from which to retrieve items
var ctx;
function runCode() {
ctx = new SP.ClientContext();
targetList = ctx.get_web().get_lists().getByTitle('Test1');
query = new SP.CamlQuery();
query.set_viewXml("<View><ViewFields><FieldRef Name='Title'/></ViewFields><RowLimit>2</RowLimit></View>");
listItems = targetList.getItems(query);
ctx.load(listItems);
ctx.executeQueryAsync(onQuerySucceeded, onQueryFailed);
function onQuerySucceeded() {
var message = "Found Matching Items! ";
var listEnumerator = listItems.getEnumerator();
while (listEnumerator.moveNext()) {
message += "nTitle=" + listEnumerator.get_current().get_item("Title")
alert(message);
var position = listItems.get_listItemCollectionPosition();
if (position != null) {
query.set_listItemCollectionPosition(position);
listItems = targetList.getItems(query);
ctx.load(listItems);
ctx.executeQueryAsync(onQuerySucceeded, this.onQueryFailed);
function onQueryFailed(sender, args) {
alert('Request failed. nError: ' + args.get_message() + 'nStackTrace: ' + args.get_stackTrace());

Hi,
According to your description, you might want to print the retrieved result in a tabular format in the page.
There will be two main steps in your solution:
1. Retrieve the data needed as what you have done;
2. With the retrieved result, generate the HTML source code, inject into somewhere in the page, this should be a pure JavaScript issue now.
About the second step, the links below would be helpful:
Inject HTML on a page:
http://stackoverflow.com/questions/3762385/best-way-to-inject-html-using-javascript
About
how to modify the HTML using JavaScript:
http://www.w3schools.com/js/js_htmldom_html.asp
http://njarb.com/2011/06/update-html-content-using-javascript/
About
how to modify the HTML using jQuery:
http://www.w3schools.com/jquery/jquery_dom_set.asp
About
creating HTML table dynamically:
http://www.ryerson.ca/JavaScript/lectures/flowControl/loops/writingTables/simpleTable.html
http://www.mysamplecode.com/2012/04/generate-html-table-using-javascript.html
Other useful
JavaScript plugins for HTML table:
http://blog.teamtreehouse.com/jquery-plugins-html-tables
http://www.sitepoint.com/30-amazing-jquery-tables/
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
contact [email protected]
Patrick Liang
TechNet Community Support

Similar Messages

  • How to format sqlplus output

    In previous OTN Forum format we used {code} to format sqlplus output , how to do in this version ?

    Click on "Use Advanced Editor".
    Highlight your code.
    Click on the symbol >>
    Select Syntax Highlighting
    Select SQL...output looks like below:
    select sysdate from dual;

  • Need Formatted html output from Xalan

    We use xalan xslt processor to convert
    xml document to html. Everything works
    fine, except the output is unformatted html.
    (ie. several HTML elements appear on the
    same line. Some lines are longer than 1000
    characters). This happens inspite of me
    specifying the HTML elements in different
    lines in the xsl.
    I would like to know if there is any way, I can generate formatted html output.
    Thanks

    have u tried
    <xsl:output indent="yes"/>
    in your stylesheet?
    ravi <[email protected]> wrote:
    We use xalan xslt processor to convert
    xml document to html. Everything works
    fine, except the output is unformatted html.
    (ie. several HTML elements appear on the
    same line. Some lines are longer than 1000
    characters). This happens inspite of me
    specifying the HTML elements in different
    lines in the xsl.
    I would like to know if there is any way, I can generate formatted html
    output.
    Thanks

  • Formatting printer output for dotmatrix printer

    Hi Experts,
    i'm trying to format the output of the EPSON LQ-870 dot matrix printer to print the output in the paper size height 280 mm & width 210 mm.The device type i used for my output device is EPESCP2.For the first page the header and line items are coming correctly.But for the second page onwards, there is some space is coming between each line items.In third page,the header is coming little bit down from the required location.My page size is little bit less than the normal A4 size.How to rectify this?
    Points will be rewarded if helpful.......
    Thanks in advance.

    Hello,
    I created a condition table '550 - Shipping point/plant'. Then I created an access sequence 'ZSH1' and assigned this condition table 550 to it.
    In the output determination procedure, the procedure 'V10000 - Header output' has the condition type PL02 - BOL: Single Delivery assigned to it.
    The assignments look like:
    Step       Counter         Cond Type
    10               1                LD00     Delivery Note
    20               2                PL00     Packing list
    30               3                PL01     Planning Slip
    40               4                PL02     BOL: Single Delivery
    In Assign output procedures, the entry corresponding to delivery type 'LF' is:
    Del Type                O/P procedure                       O/P Type
    LF Delivery                    V10000  Header Output             LD00Delivery Note
    When I try to enter a new condition record using VV21, it does not show up this key combination 'Shipping point/Plant'.
    Can someone tell me if I am missing some customization?
    Thanks,
    Rugmani
    Edited by: Rugmani Rajan on Oct 22, 2008 3:06 PM

  • Formatting the output (currency with decimals)

    hi all,
          i want to format the output of the currency field. Right now it displays the exact value like say 23 or 43.5 etc. But my requirement is i need it to display in a standard format as 23.00 , 43.50 , 565.00 etc. i,e if there is no decimals then it should be filled with zero's.
    I have gone through some of the threads which speaks of formatting the output if it is a value node. But here i have directly bounded the table to a model node.
    Domian level datatype of the field is Currency in R/3. After model import in dictionary it is showing as decimal.
    How can i achieve this?I Appreciate if someone can help me on this.
    Regards,
    G Nid

    hi,
    Go thru this link it might helps you.
    column heading -refer to the webdynpro tutorial 34
    Change the currency data type char and specify the length.
    Thanks,
    Lohi.

  • Formatting the output

    Hi everyone in the forum,
    I do not know if i should post this question here, but i think is the best place. Sorry if i were wrong.
    just a question because i have no idea how to format the output i need.
    I have a REAL or FLOAT and the output restrictions shows that it should be:
    1.0000 D-08 if the value is less than 1
    1.0000 if the value is [1,9]
    1.0000 D+03 is value bigger than 9
    and the other problem is whith other variable (type String) which represents integers, e.g, 0.000000 1.0000000 2.000000; and i have to return only 0 1 2 .
    Any suggestion about how to format the output?
    Thanks

    DecimalFormat

  • Formatting displayed output

    Hi: how do I format the output so that it shows me the complete value for the EVENT_ID field
    ===========
    SQL> select /*+ FIRST_ROWS */ EVENT_ID from EVENT_DATA where AGENT_ID IN (160,212,264);
    EVENT_ID
    4.9561E+18
    4.9561E+18
    ================
    TIA
    Ravi

    You can also change numwidth in sql*plus
    SQL> select 12345678901234567890 from dual;
    12345678901234567890
              1.2346E+19
    SQL> set numwidth 20
    SQL> /
    12345678901234567890
    12345678901234567890

  • Formatting array output

    how do i format the output of an array so that only a certain number of the elements print per line. i know this is basic, i am a beginner and need help.

    final int itemsPerLine = 5;
    int counter = 0;
    String myArray[]; // This will contain your array
    while (counter < myArray.length) {
        System.out.print(myArray[counter]; // Print out the item
        counter++; // increment our counter;
        if (counter%itemsPerLine == 0) {
            System.out.print("\n"); // ad a line return
    }This is one example. It prints out the next string in the array (which you need to initialise and populate first), increments the counter, then checks the modulus to see if its time for a newline.
    Rob.

  • Formatting Binary Output

    I want to format binary output in text fields to confrom to the following scheme:
    head data1 data2 return offSet id
    6 bits 5 bits 5 bits 5 bits 5 bits 6 bits
    where the first row are field names and the second is the filed width.
    What that means is that, using the value 1 (base 10) as an example, a 6 bit filed will read 000001 and so a 5 bit field will read 00001.
    My program converts to binary no worries, but how do I enforce the width requirements? I am using Integer.toBinaryString(int) to convert, if that helps.
    Thanks

    public String intToJustifiedBinaryString(int number, int length)
      StringBuffer buffer = new StringBuffer(Integer.toBinaryString(number));
      while (buffer.length() < length)
          buffer.insert(0, "0");
      return buffer.toString();It works great! Now for the learning. I looked up StringBuffer and found this explanation:
    StringBuffer(String str)
    Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string.
    What I am trying to figure out is how it is not overwriting what already exists in the buffer. Lets pretend with int = 7 and a 6 bit field.
    So initially, buffer.length() = 3 and my buffer looks like 1 1 1.
    From the API: The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.
    If I am specifying my insert point as 0 (insert(int offset, char c) Inserts the string representation of the char argument into this string buffer.) How am I not overwriting one of my bits comprising my binary 7? My only guess is that insert operation first shifts what is already there over the necessary amount, based on the length of what is being inserted, before inserting at the specified point. I have read nothing to support this theory. Please let me know if it is correct.
    Thanks for the help!

  • Invalid END header format/no output available for this tool

    help me.
    I install oracle 9i into windows 2k server with pack3. when configuring the ODCA, when OUI prompt:
    invalid END header format&
    no output available for this tool.
    who can tell me that what is happen?
    before this, i had installed this version on windows 2003.

    Dear All
    I have the same problem when installing Oracle9iasR2 on a windows 2000 IBM server
    At the database configuration Assistant of the infrastructutre installation I am always getting this strange message Not a ZIP file (End Header Not found).
    We have tried a lot off scenarios to install Oracle9iasr2 but the installation always fails at the database creation with the followning message
    Not a ZIP file (End Header Not found).
    We had also tried to do the installation using a different copy of CD's with no success.
    Also the same installation on the same server was succesfull with O/S Win2003.
    Then the whole installation fails .
    If anyone has ever faced the same problem and had solved it please advice.
    Thank you in advance.
    Bill

  • Help with formatting multiline output into comma delimited ordered output

    I have 2 tables:
    SQL> desc table_1;
    Name Null? Type
    ===================================
    ID NOT NULL NUMBER
    DATA1 NOT NULL VARCHAR2(440)
    DATA2 NOT NULL VARCHAR2(1024)
    SQL> desc table_2;
    Name Null? Type
    ===================================
    ID NOT NULL NUMBER
    ATTNAME NOT NULL VARCHAR2(255)
    ATTVAL                          VARCHAR2 (4000)
    DATA1 NOT NULL CHAR(1)
    DATA2                          VARCHAR2 (2000)
    DATA3                          VARCHAR2 (255)
    I need to get ATTVAL from where e.g. ATTNAME=att_name1 to ATTNAME=att_name6 from every entry (with its unique ID), and format the output into comma delimited format in e.g. this order:
    att_val1,att_val3,att_val6,att_val4,att_val5,att_val6
    So e.g. for entry with ID "9812" from the query below, the output I need would be:
    187,179,156,134,1436,1809
    What I've got so far is as follows:
    SQL> SELECT id,attname,attval FROM table_2 WHERE id in (SELECT id from table_1 WHERE data2='xxx')
    AND attname in ('att_name1','att_name3','att_name6','att_name4','att_name5','att_name6');
    ID               ATTNAME               ATTVAL
    ===============================
    1970 att_name1 123
    1970 att_name2 abc
    1970 att_name3 1234
    1970 att_name4 def
    1970 att_name5 1134
    1970 att_name6 ghj
    9812 att_name4 134
    9812 att_name5 1436
    9812 att_name3 156
    9812 att_name1 187
    9812 att_name2 179
    9812 att_name6 1809
    77 att_name1 1980
    77 att_name5 1867
    77 att_name3 174
    77 att_name4 1345
    77 att_name2 1345
    77 att_name6 1345
    but I don't know how to format the output comma limited in certain order. (or if this is the best way of getting the data out)
    Would someone have idea how this could be done?

    846954 wrote:
    Thanks Frank!
    I got much further now :).
    I've got Oracle 10g So I used the "SYS_CONNECT_BY_PATH" for my query.
    Now I get the output in the format I want, however, it comes out in the order that the attributes are (which is pretty random).The values you posted are in order: 'attval1' < 'attval2' < ...
    So I'm using this now(had to use "|" as separator because SYS_CONNECT_BY_PATH would not work with comma due to some of the attval having comma in them ):The values you posted don't contain and commas.
    You're hiding what the problem is. It would really help if you posted actual data. It always helps if you post CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data.
    Assuming you really have something that has to be in a certain order, and that order is not based on anything in the values themselves, then DECODE might be a good way to do it. Storing the sort value in a table might be even better.
    It looks like you were using an Oracle 9 exanple. In Oracle 10, using SYS_CONNECT_BY_PATH is simpler:
    SELECT     id
    ,     LTRIM ( SYS_CONNECT_BY_PATH (attval, '|')
               , '|'
               )          AS attvals
    FROM     (
              SELECT     id
              ,     attval
              ,     ROW_NUMBER () OVER ( PARTITION BY  id
                                  ORDER BY          DECODE (...)
                                )     AS curr
              WHERE     id     IN (
                             SELECT  id
                             FROM     table_1
                             WHERE     data2     = 'xxx'
              AND     attname     IN ('attname1','attname2','attname3','attname4','attname5','attname6')
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     curr     = 1
    CONNECT BY     curr     = PRIOR curr + 1
         AND     id     = PRIOR id
    ;You don't need two almost-identical ROW_NUMBERs; one will do just fine.

  • Sqlplus set statement:format the output without specifying every col length

    Hi ppl,
    i am writing below query inside a shell script. Is there any way to format the output of sqlplus without providing the name of all the columns that we are going to output. for example, in below code i have specified the column width of the columns i want to output. but if the number of columns is large (or when we want to do a select * from...) then it becomes tedious to write all of them. Is there any way i can define display length all the columns to be of same size.. or at least all the number columns of one size, char columns of one size etc...
    sqlplus -sa/passwd@db_name << EOF
    SET ECHO ON;
    SET HEADING ON;
    COLUMN USERNAME FORMAT A20;
    COLUMN USER_ID FORMAT A20;
    COLUMN PASSWORD FORMAT A20;
    spool filename.txt
    some qry... ;
    exit
    EOFThanks
    Edited by: KnockTurnAll on 25 Oct, 2010 10:41 PM
    Edited by: KnockTurnAll on 26-Oct-2010 04:25

    My SQL*Plus is a bit rusty, but I don't think you can for characters. You can set NUMWIDTH for a default size for numeric columns.
    You could write a small bit of SQL to generate the required column definitions. You could even hit ALL_TAB_COLUMNS to generate a generic 'set every column width' file and run it as a separate sql script in your main script. Not sure if there is an upper limit on the number of Columns you can define.
    Back in the day when we did everything with SQL*Plus scripts, we had a standard columns file that we called in all our scripts, just for this purpose.
    Carl

  • The best format for output

    Hi All,
    working in animation project to be broadcasted on a TV channel as HD1080 50i,
    1- all the animation layers was rendered from TOONBOOM as .SWF to keep it in vector for compositing issue.
    Dose SWF lose any quality? we always use TGA sequence with alpha in our past SD projects but now we found SWF is a smaller file size and allows zooming Because it keeps all vector lines.
    2- compositing each scene in after effects cs6 and then render them.
    What is the best format for output to deal with premiere cs6 as a real time playback ( my editing pc includes gtx680 4gb., many HGST 3tb with raid controller,64g ram, aja kona 3g) so do I go with TGA sequence (I think it will destroy the raid Because of the large number of small-sized files in read and write ) or MOV uncompressed (I'm afraid of the space size and don’t know it will play in real time ) or what is the best compressed format Maintaining video image quality as its now will be my only master source?
    Many thanks,
    sherif

    Thanks Rick for your reply,
    Regarding the SWF i moved to flash pro forums and they are supporting me now,
    My system is a pc, win.64, I7-3930K, 64G RAM, EVGA GTX680 4G, Many HGST 3TB with raid controler,
    Some advised me to go with Quicktime Prores HQ or DNXHD or DPX ,
    In this year project my client's requirement for delivery is :
    DNxHD 120 Codec, wrapped with QuickTime rapper, which means a file with MOV extension and the codec used is DNxHD 120 ( 1080@50i HD)
    So do i work with dnxhd 120 from the beginning to the delivery? (and it will be my only master source) or another format encode it at the end to dnxhd 120? ( i will distribut this project to many channels after the first run exclusivity period end with different requirements).
    Thanks,
    Sherif

  • Creating a nicely formatted PDF output, suggestions/stratigies?

    I really wanted to call this "Stupid Questions 101", but figured this was probably a better thread title.
    I think this is going to rather long, as I have many variables and other considerations, so let me start off trying to explain.
    I finally have my application pretty much finished (at least the initial version, have to see what users say). Now, I also need to add the capability for a nicely formatted report that's rather complicated, preferably as a PDF file. The final result needs to look like pages from a book (different fonts, lots of whitespace, left, right and center alignement, etc.) instead of a standard report layout.
    So first, I have about 30 tables (views actually). For this application, I need to produce a report that goes through all of the views and 'dumps' all of the information in each table for whatever 'parent' record the user wants. There's going to be lots of looping, and I have the typical parent - child - grandchild relationships, so when I'm printing the child record, before progressing to the next child record, I also need to print all of the assosciated grandchild records.
    A couple views can be simply output in one line, like the simple report format. Most views though need to formatted across multiple lines, like a form. Many fields will also need to be wrapped across multiple lines, adding to the whitespace and indenting problem.
    All together, I have around 300 fields or so that I need output, so as I understand it, ApEx itself can't handle this as a web page (besides all the various looping problems, but also the 100 'item' limit), so I'm thinking that I'll need to create a page with a PL/SQL region and write a package (with all of the views getting their own procedure), that will go through all of the looping etc. I'll need for the 'dump'.
    So, I'm wondering which is the best approach to take on this, I don't think I can use a PSP page to accomplish this, so I think I just need to use the web toolkit.
    1. Should I start my PL/SQL region off with the "pre" tag, so my 'layout' stays intact?
    2. I'll also need to print my field 'labels' in bold, so will the "pre" tag interfere with that?
    3. Will it be easier to place the htp.p statements in my package's procedures, or just write the package with the htp.p statements and add those with the PL/SQL region on the page? (But then I'll need to use dbms.output to send the data to the region won't I?)
    4. Since this will wind up (hopefully) as a nicely formatted region on the page (with lots of whitespace, etc.), will the FOP package allow me to create it (just the region, not the entire page) as a PDF, or does the FOP package only work with standard ApEx 'reports'?
    5. Am I way off base here, or is there a better aproach I'm missing? I really need to try and keep everything free (otherwise I'd consider PL/PDF), as being in the government, money is usually pretty tight, we usually only have money just for our salaries and office space.
    Like I said above, pretty stupid questions, but I haven't used the web toolkit in about 7 years or so, being tied up with merging two database and cleaning up the data from one of them (it had no data validation or integrity constraints at all, everything was a free-form field, like a giant spreadsheet).
    Thanks for any suggestions on how to best tackle this next stage of my problem.
    Of to start experimenting some.
    Bill Ferguson

    For anybody following this, here's a couple updates.
    I decided to go with an internal stylesheet, vs. an external (one less file I need to worry about moving during an upgrade, machine change, etc.). Since I'm generating the entire page through a PL/SQL package anyway, the internal stylesheet stays with the code, just in a separate procedure.
    I'm having problems getting a button to fire off the javascript to popup a new window that runs the package. I can run the package fine if I start a new window manually and supply the URL/user.package.procedure, so it's something with where I'm placing the javascript call. I've searched the forums, and the closest I found to an answer was to add the code to the "Image Attributes", but when I tried that, it insisted on an image also being specified. Since I don't have an image, or know of any, I tried both the "HTML Button" and "Template Based Button", but those grey out the "Image Attributes", and the javascript doesn't seem to fire from the "Button Attributes".
    The (edited) javascript call is:
    onclick="javascript:MypopUp2
    ('http://my_machine:my_port/mrds/usgs.print_site.print_doc?dep_id_in=&P0_DEP_ID.',800,600);"Anybody have any ideas on what/where I really need to place this? The javascript does work elsewhere, it's simply a copy of the popup2 script in core.js that I moved over into my own javascript file.
    On a different note, since I'm learning about css as I progress, I discovered that using "div" "/div" causes a new line, while "span" "/span" does not (angle brackets replaced with quotes). Took me a while to get figured out, it was really messing up my formatting, so maybe somebody else just learning this css stuff can save a few headaches.
    Hope somebody knows where to add the code to the button. :^)
    Bill Ferguson

  • XML Bursting program was messed up the report format and output, not sure what is causing an issue

    Hi All,
    I need burst the report based on the customer number for some customers and burst based on invoice number for some customers in the same bursting program. I have made the changes accordingly and sending email attachments as expected, but when the output sent for as an attachment for each invoice the report does not printing in full format, its completely ignore one child block. Not sure what was the issue. This is very very urgent please help me out.
    Following is my bursting code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
       <xapi:request select="/XXARINVOICE/LIST_G_CUST_HDR/G_CUST_HDR">     
          <xapi:delivery>
             <xapi:email id="123" server="${SMTP_SERVER_NAME}" port="25" from="${XX_EMAIL}" reply-to = "">
            <xapi:message id="123" to="${EXCLUDED_BILL_TO_EMAIL}" attachment="true"
               subject="Confirmation for your Invoice(s)">
    Dear Customer,
    Thank you for placing an order with XX cust.
    Please review the attached invoice(s).
    Regards,
    Customer Service
            </xapi:message>
             </xapi:email>
          </xapi:delivery>     
          <xapi:document output="XX_INVOICE_EMAIL_${CUST_NO}" output-type="pdf" delivery="123">
             <xapi:template type="rtf" location="xdo://xxabc.XXARNONEDIINVOICE.en.00/?getSource=true" filter=".//G_INVOICE_HDR[EXCLUDED_BILL_TO_EMAIL!='N']"/>
          </xapi:document>  
       </xapi:request>
       <xapi:request select="/XXARINVOICE/LIST_G_CUST_HDR/G_CUST_HDR">     
          <xapi:delivery>
             <xapi:email id="123" server="${SMTP_SERVER_NAME}" port="25" from="${XX_EMAIL}" reply-to = "">
            <xapi:message id="123" to="${EXCLUDED_BILL_TO_FAX}" attachment="true"
               subject="Confirmation for your Invoice(s)">
    Dear Customer,
    Thank you for placing an order with XX cust.
    Please review the invoice(s).
    Regards,
    Customer Service          
            </xapi:message>
             </xapi:email>
          </xapi:delivery>     
          <xapi:document output="XX_INVOICE_FAX_${CUST_NO}" output-type="pdf" delivery="123">
             <xapi:template type="rtf" location="xdo://xxabc.XXARNONEDIINVOICE.en.00/?getSource=true" filter=".//G_INVOICE_HDR[EXCLUDED_BILL_TO_FAX!='N']"/>      
          </xapi:document>  
       </xapi:request> 
       <!-- START Sending email for each invoice in CR2197-->
       <xapi:request select="/XXARINVOICE/LIST_G_CUST_HDR/G_CUST_HDR/LIST_G_INVOICE_HDR/G_INVOICE_HDR">     
          <xapi:delivery>
             <xapi:email id="123" server="${SMTP_SERVER_NAME}" port="25" from="${XX_EMAIL}" reply-to = "">
            <xapi:message id="123" to="${BILL_TO_EMAIL}" attachment="true"
               subject="Confirmation for your Invoice ${INVOICE_NO}">
    Dear Customer,
    Thank you for placing an order with XX cust.
    Please review the attached invoice.
    Regards,
    Customer Service
            </xapi:message>
             </xapi:email>
          </xapi:delivery>     
          <xapi:document output="XX_INVOICE_EMAIL_${INVOICE_NO}" output-type="pdf" delivery="123">
             <xapi:template type="rtf" location="xdo://xxabc.XXARNONEDIINVOICE.en.00/?getSource=true" filter=".//G_INVOICE_HDR[BILL_TO_EMAIL!='N']"/>
          </xapi:document>  
       </xapi:request>
       <xapi:request select="/XXARINVOICE/LIST_G_CUST_HDR/G_CUST_HDR/LIST_G_INVOICE_HDR/G_INVOICE_HDR">     
          <xapi:delivery>
             <xapi:email id="123" server="${SMTP_SERVER_NAME}" port="25" from="${XX_EMAIL}" reply-to = "">
            <xapi:message id="123" to="${BILL_TO_FAX}" attachment="true"
               subject="Confirmation for your Invoice ${INVOICE_NO}">
    Dear Customer,
    Thank you for placing an order with XX cust.
    Please review the invoice.
    Regards,
    Customer Service          
            </xapi:message>
             </xapi:email>
          </xapi:delivery>     
          <xapi:document output="XX_INVOICE_FAX_${INVOICE_NO}" output-type="pdf" delivery="123">
             <xapi:template type="rtf" location="xdo://xxabc.XXARNONEDIINVOICE.en.00/?getSource=true" filter=".//G_INVOICE_HDR[BILL_TO_FAX!='N']"/>      
          </xapi:document>  
       </xapi:request>  
       <!-- END Sending email for each invoice in CR2197-->
       <xapi:request select="/XXARINVOICE/LIST_G_CUST_HDR/G_CUST_HDR/LIST_G_INVOICE_HDR/G_INVOICE_HDR">     
          <xapi:delivery>
               <xapi:filesystem output="${OUT_DIR}/INV_${SALES_ORDER}_${ORG_ID}_${INVOICE_NO}_${REQUEST_ID}_${INVOICE_DATE}.pdf">
               </xapi:filesystem>
          </xapi:delivery>     
          <xapi:document output-type="pdf">
             <xapi:template type="rtf" location="xdo://xxabc.XXARNONEDIINVOICE.en.00/?getSource=true" filter=".////XXARINVOICE[P_ATTACH='Y']"/>    
          </xapi:document>  
       </xapi:request>  
    </xapi:requestset>
    Thanks in Advance,
    Jagadish

    Initialize this:
                        String pet = "":>
    error is H:\JAVA\PetAdvice.java:88: variable pet might not have been initialized
                        return pet;Geez, the error tells you the source file and the line # at which the problem occurred, in addition to a lucid description. Why couldn't you figure it out for yourself?
    %

Maybe you are looking for