Reading XML payload from text file

Hello,
I have a text file with XML payload in it. The text file has some header information and then the XML payload. How do I read only the XML payload for processing in PI?
the structure of the text file is something like this..
Header Information
Payload
Sample:
#Datetime: 20140318-09:28:50.129
#MessageID: sample123
#Sender: TEST
#SenderParty: TEST
#ReceiverService:
#ReceiverParty: Test
#Interface: Test123
#InterfaceNamespace: http://test.com
<?xml version="1.0" encoding="UTF-8"?>
<Sample ><Header>......
Please advise.
Thank you.
Larry.

package com.learning.utils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
public class FetchPayload extends AbstractTransformation {
  String strData = null;
  @Override
  public void transform(TransformationInput arg0, TransformationOutput arg1)
  throws StreamTransformationException {
  // TODO Auto-generated method stub
  getTrace().addInfo("File Reading started ");
  String strData = convertStreamToString(arg0.getInputPayload()
  .getInputStream());
  getTrace().addInfo("File Reading successfully completed ");
  try {
  getTrace().addInfo("Generating XML started");
  strData.substring(strData.indexOf("<?xml"), strData.length());
  arg1.getOutputPayload().getOutputStream().write(
  strData.getBytes("UTF-8"));
  getTrace().addInfo("Generating XML started");
  } catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  public String convertStreamToString(InputStream in) {
  StringBuffer sb = new StringBuffer();
  try {
  InputStreamReader isr = new InputStreamReader(in);
  Reader reader = new BufferedReader(isr);
  int ch;
  while ((ch = in.read()) > -1) {
  sb.append((char) ch);
  reader.close();
  } catch (Exception exception) {
  return sb.toString();
and u can get  the xml as a resultant which  u can use as input for next message mapping.
thanks and regards,
Praveen T

Similar Messages

  • How to store data into database by reading sql statements from text file

    how to write java program for storing data into database by reading sql statements from text file

    Step 1: Create a property file to add various queries.
    Step 2: Read the properties file using ResourceBundle
    Step 3: Use the jdbc to execute the query read from the property file.
    So in future if you need to change query no need do any modifications in java program. But depends on how you use the property file.

  • How can we read a column from text file

    hai,
    the Text file contains :
    m1 m2 m4 89
    m1 m2 m4 89
    m0 m4 m2 90
    I need one array for each column
    m[0]= m1,m1,m0 (first column from text file)
    m[1]= m2,m2,m2 (second column from text file)
    m[2]= 89,89,90 (third column from text file)
    andvance thanks

    If a 2D array is OK (instead of 4 separate arrays), try something like this
    import java.io.*;
    import java.util.ArrayList;
    class FileReadColumns
      public static void main(String args[]) throws IOException, FileNotFoundException
        String line;
        ArrayList lines = new ArrayList();
        BufferedReader in = new BufferedReader(new FileReader("data.txt"));
        while ((line = in.readLine()) != null) lines.add(line);
        String bits[];
        bits = lines.get(0).toString().split(" ");
        String grid[][] = new String[bits.length][];
        for(int i=0;i<grid.length;i++)grid[i] = new String[lines.size()];
        for(int i = 0; i < lines.size(); i++)
          bits = lines.get(i).toString().split(" ");
          for(int ii = 0; ii < bits.length; ii++) grid[ii] = bits[ii];
    for(int i = 0; i < grid.length; i++)
    for(int ii=0;ii<grid[i].length;ii++)System.out.print(grid[i][ii]+" ");
    System.out.println();
    System.exit(0);

  • Reading XML data from .pages file

    Hi All!
    I've been trying to get a script up and running, but frankly I'm lost. The script should read the date, lesson no, and name fields from a .pages file and then use that information to send an e-mail.
    What I'm having a problem with is reading the data from the .pages file and I don't know what the best way to do it is because I'm still a novice at this.
    So there are two ways I can think of:
    1. Read directly from the Pages document when it is open. The problem with this is that it's a Pages template and it contains tables. Perhaps the easiest thing would be just to select certain cells directly from pages, but I have no idea how they're labeled or how to access them so I came up with a second idea. If you happen to know how to do this, I would greatly appreciate it.
    2. Pages documents can be unzipped and one of the files is an xml file with a lot of tags and the data I need. I found the following post that talks about how to parse XML via an XSL stylesheet. After going through some tutorials, I got stuck because the xml itself in the Pages file is just a mess to me and I'm confused about which node to choose. In other xml docs you can see a clear, nicely laid out tabbed structure so you can at least figure out the path to the node you want. I stumbled across a nice script for TextWrangler which cleans up XML, but it just barks at the Pages file.
    3. On top of that, I will need to use the name field and match that with an Address Book e-mail address. Should I change the template and make it into an address book field?
    Thanks in advance,
    Paul

    The script should read the date, lesson no, and name fields from a .pages file and then use that information to send an e-mail.
    Maybe you might want to try the following script:
    tell application "Pages"
        activate
        tell foreground layer of page 1 of front document
            select (text box 1 whose vertical position < 0.5)
            tell application "System Events"
                keystroke "c" using {command down} -- ⌘C
                keystroke "a" using {shift down, command down} -- ⇧⌘A
            end tell
            set theText to the clipboard
        end tell
    end tell
    set TID to AppleScript's text item delimiters
    set AppleScript's text item delimiters to tab
    set theTextFields to text items of theText
    set AppleScript's text item delimiters to TID
    set {theDate, theLessonNo, theStudent} to {item 2, item 4, item 6} of theTextFields

  • Read in array from text file

    hello,
    i have managed to save the content of a 2d array to a text file, but i am a bit stuck reading it back and placing the data back into a 2d array.
    i have a Scanner object that can read the the integers from the file using nextInt(), but i am not sure how to place them back into the 2d array.
    i need something like:
            Scanner inputStream = null;
            try{
            inputStream = new Scanner(new FileInputStream("out.txt"));
            catch(FileNotFoundException e)
                System.out.println("out.txt not found");
                e.printStackTrace();
            for(int i = 0; i < 13; i++){
                for(int j = 0; j < 13; j++)
                    matrix[i][j] = inputStream.nextInt();
            inputStream.close();but it doesnt like the for loop.
    thanks

    morris7 wrote:
    but it doesnt like the for loop.1) You'll have to be much more specific than this if you want "helpful" help.
    2) You may need to call inputStream.nextLine() after the inner for loop but inside the outer for loop.
    3) Always, always use curly brackets "{" and "}" to enclose your for loops, while loops, if and else statements. They may seem like extra work if you are only processing one line, but they will save your life someday. Always.
    4) Consider closing your scanner in a finally block.

  • Reading first word from text file

    Hello all,
    I created a program which I can type in a line and store it into a file. What I need my next program to do is read and display just the first word from each line on the text file.
    Here is what I have:
    import java.io.*;
    public class ReadFromFile
    public static void main (String args[])
         FileInputStream firstWord;          
              try
                  // Open an input stream
                  firstWord = new FileInputStream ("FileofWords.txt");
                  // Read a line of text
                  System.out.println( new DataInputStream(firstWord).readLine() );
                  // Close our input stream
                  firstWord.close();          
                   System.err.println ("Unable to read from file");
                   System.exit(-1);
    }

    what i would like is my program to get the first word of every line and put it in my array.
    This is what i have attempted.
    import java.io.*;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    public class testing {
         String[] tmp = new String [2];
         String str;
         public void programTest()
              try
                             BufferedReader in2 = new BufferedReader(new FileReader("eventLog.log"));
                             while ((str = in2.readLine()) != null)
                                  tmp = str.split(" ");
                                  System.out.println(tmp[0]);
                        catch(IOException e)
                             System.out.println("cannot read file");
    public static void main(String[] args)
                 testing B = new testing();
                 B.programTest();
    }//end classAny help is most appreciated

  • How to read long line from text file

    Hi,
    I just faced problem when reading a big text file.
    BufferedReader br = new BufferedReader(new FileReader("D:\\afile.txt"));
    String str;
    int i;
    while ((str = br.readLine())!=null)
    i++;
    //do some work here...
    ...This code throws exception:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap spaceSo I thought file line is very long. When I opened it in FAR it only displays no more than 4096 characters as a line.
    Help me to read a text file that's line is very long?

    try,
    $ java -X
    -Xmixed mixed mode execution (default)
    -Xint interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by ;>
    set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by ;>
    append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by ;>
    prepend in front of bootstrap class path
    -Xnoclassgc disable class garbage collection
    -Xincgc enable incremental garbage collection
    -Xloggc:<file> log GC status to a file with time stamps
    -Xbatch disable background compilation
    -Xms<size> set initial Java heap size
    -Xmx<size> set maximum Java heap size
    -Xss<size> set java thread stack size
    -Xprof output cpu profiling data
    -Xrunhprof[:help]|[:<option>=<value>, ...]
    perform JVMPI heap, cpu, or monitor profiling
    -Xdebug enable remote debugging
    -Xfuture enable strictest checks, anticipating future default
    -Xrs reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni perform additional checks for JNI functions
    The -X options are non-standard and subject to change without notice.

  • Read a non english word from text file

    While Reading thai charater from text file which was sent by QAD(a different application),
    We are reading 60 char using substr() function.
    If the data is English word it reads correctly with 60 char.
    But if it is in thai characters it returns more than 60 char.
    In oracle all NLS Char set has been already set.
    Can anyone help in this issue
    thanks in advance

    Maybe you should use SUBSTRC, SUBSTR2 or SUBSTR4 depending on the character set of your database. See http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions119a.htm#87068
    Message was edited by:
    Pierre Forstmann

  • Why does Read from Text file default to array of 9 elements

    I am writing to a text file starting with a type def. cluster (control) of say 15 dbl numeric elements, that works fine I open the tab-delimited text file and all of the elements appear in the file.  However when I read from the same text file back to the same type def. cluster (indicator), the read from text file defaults to 9 elements?? Is there a way to control how many elements are read from the file.  This all works great when I initially use a cluster of 9 elements and read back to a cluster of 9 elements.
    Solved!
    Go to Solution.

    From the LabVIEW Help: http://zone.ni.com/reference/en-XX/help/371361G-01/glang/array_to_cluster/
    Converts a 1D array to a cluster of elements of the same type as the array elements. Right-click the function and select Cluster Size from the shortcut menu to set the number of elements in the cluster.
    The default is nine. The maximum cluster size for this function is 256.
    Aside: so, how many times has this question been asked over the years?

  • How to open saved files using 'read from text file' function

    Hi everyone, I am having a hard time trying to solve the this particular problem ( probably because I am a newb to lanbview ). Anyway , I am able to save the acquired waveforms by using the 'Write to text file' icon. I did manually modify the block diagram of the 'Write to text file' icon and create the correct number of connector so as to make my program work. But now I have no idea on how to modify the block diagram of the 'Read from text file' block diagram to make my program 'open' my saved waveforms. Or i do not have to modify anything from the block diagram of the 'Read from text file'? Can anyone teach/help me connect up? Do i need the build array on the "open" page?
    Here are some screenshots on part of my program  
    let me know if you guys would need more information / screenshots thank you!
    Attachments:
    ss_save.jpg ‏94 KB
    ss_open.jpg ‏94 KB
    modified_writetotextfile.jpg ‏99 KB

    Ohmy, thanks altenbach. oh yeah i forgot about those sub VIs. will upload them now. Was rather demoralized after reading the comments and really struck me on how weak i'm at on labview really hope to get this done. But of course i have to study through and see how it works. Actually i am going to replace those 'signal generators sub vi' with ThoughtTechonology's sample code so i can obtain data waveforms real-time using Electrocardiography (ECG) ,Electromyography (EMG ) and Electroencephalography (EEG) hopefully i can find out how to connect the sample code.
    ( ps . cant connect it now unless my program is working otherwise labview will crash ) 
    ( p.s.s the encoder of my biofeedback trainer already acts as an DAQ so i wont need to place an DAQ assistant in my block diagram i suppose )
    The sample code of ThoughtTechnology is named as attachment.ashx.vi. too bad i cant use it and present it as my project
    Attachments:
    frequency detactor.vi ‏53 KB
    signal generator.vi ‏13 KB
    attachment.ashx.vi ‏40 KB

  • LabVIEW for ARM 2009 Read from text file bug

    Hello,
    If you use the read from text file vi for reading text files from a sdcard there is a bug when you select the option "read lines"
    you cannot select how many lines you want to read, it always reads the whole file, which cause a memory fault if you read big files!
    I fixed this in the code (but the software doesn't recognize a EOF anymore..) in CCGByteStreamFileSupport.c
    at row 709 the memory is allocated but it tries to allocate to much (since u only want to read lines).
    looking at the codes it looks like it supposed to allocated 256 for a string:
    Boolean bReadEntireLine = (linemode && (cnt == 0)); 
    if(bReadEntireLine && !cnt) {
      cnt = BUFINCR;    //BUFINCR=256
    but cnt is never false since if you select read lines this is the size of the file!
    the variable linemode is also the size of the file.. STRANGE!
    my solution:
    Boolean bReadEntireLine = (linemode && (cnt > 0));  // ==
     if(bReadEntireLine) {    //if(bReadEntireLine && !cnt) {
      cnt = BUFINCR;
    and now the read line option does work, and reads one line until he sees CR or LF or if the count of 256 is done.
    maybe the code is good but the data link of the vi's to the variables may be not, (cnt and linemode are the size of the file!)
    count should be the number of lines, like chars in char mode.
    linemode should be 0 or 1.
    Hope someone can fix this in the new version!
    greets,
    Wouter
    Wouter.
    "LabVIEW for ARM guru and bug destroyer"

    I have another solution, the EOF works with this one.
    the cnt is the bytes that are not read yet, so the first time it tries to read (and allocate 4 MB).
    you only want to say that if it's in line mode and cnt > 256 (BUFINCR) cnt = BUFINCR
    the next time cnt is the value of the bytes that are not read yet, so the old value minus the line (until CR LF) or if cnt (256) is reached.
    with this solution the program does not try to allocate the whole file but for the max of 256.
    in CCGByteStreamFileSupprt.c row 705
     if(linemode && (cnt>BUFINCR)){
       cnt = BUFINCR;
    don't use the count input when using the vi in line mode. count does not make sense, cnt will be the total file size. also the output will be an array.
    linemode seems to be the value of the file size but I checked this and it is just 0 or 1, so this is good
    update: damn it doesn't work!
    Wouter.
    "LabVIEW for ARM guru and bug destroyer"

  • Trying to parse a file-read from text file.vi

    I'm attempting to read a txt file that has tab separated data. In the fourth (or any) column is the only data I need. The data is a string of numbers (23.454).
    I've used the Read from Text File.vi and the Read From Spreadsheet.vi and I just don't seem to have enough LV background to extract the pertinent  data into a graph. any suggestions?

    (It is silly to use "delete from array" if all you want is a column. The correct function is "index array")
    Joe's idea above basically works fine. Here's a quick adapdation (the node before the graph is "index array" from the array palette.).
    Message Edited by altenbach on 06-11-2007 11:57 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FileRead.png ‏11 KB

  • Set a timeout for "read from text file"

    I Need to read from a text file on a remote pc and use the read from text file function to do this. It wotks but sometimes this pc is down causing long wait times in my vi.
    Is there a way to set a timeout for the read from text file function, or is there an other solution?
    Thank you

    You could check that the path is valid first before you attempt to read the file.  hen put the file read in a True-False case structure based on the results of the check.  You can use the function "Check if File or Folder Exists"  It checks whether a file or folder exists on disk at a specified path. This VI works with standard files and folders as well as files in LLB files.   The function is found in the File I/O --> Advanced File Functions palette.
    Tom

  • Read from text file

    Hi, I need little help with the following application. I need to to read the items from the file, process them and save them in other file. I think I am on the right path but now I got stuck with the illegal start of the expression when I am declaring the arrays for the items and prices. Can anyone help me pls.
    public class AlaCarte extends JFrame implements ActionListener
       private JList yourChoices;
       private JTextArea  bill;
       private Container pane;
       public AlaCarte()
          super("Welcome to George's Kiosk");
             //Get the content pane and set its background color
             //and layout manager.
          pane = getContentPane();
          pane.setBackground(new Color(0, 200, 200));
          pane.setLayout(new BorderLayout(5, 5));
              //Create a label and place it at NORTH. Also
              //set the font of this label.
          JLabel yourChoicesJLabel = new JLabel("A LA CARTE MENU");
              //Create a list and place it at WEST. Also
              //set the font of this list.
          yourChoices = new JList(yourChoicesItems);
              //Create a text area and place it at EAST. Also
              //set the font of this text area.
          bill = new JTextArea();
              //Create a button and place it in the SOUTH region and
              //add an action listener.
          JButton selectionButton = new JButton("Selection Completed");
            JButton reportButton = new JButton("Daily Report");
          pane.add(reportButton,BorderLayout.SOUTH);
          reportButton.addActionListener(this);
          setSize(500, 360);
          setVisible(true);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
               //Method to display the order and the total cost.
       private void displayBill()
          int[] listArray = yourChoices.getSelectedIndices();
          double localTax = 0.01;
              double stateTax = 0.06;
          double localTaxes;
              double stateTaxes;
          double subTotal = 0;
          double total;
             //Set the text area to non-edit mode and start
             //with an empty string.
          bill.setEditable(false);
          bill.setText("");
              //Calculate the cost of the items ordered.
          for (int index = 0; index < listArray.length; index++)
              subTotal = subTotal
                         + yourChoicesPrices[listArray[index]];
          localTaxes = localTax * subTotal;
              stateTaxes = stateTax * subTotal;
              total = subTotal + localTaxes + stateTaxes;
              //Display the costs.
          bill.append("           GEORGE'S CAFE A LA CARTE\n\n");
          bill.append("--------------- Welcome ----------------\n\n");
          for (int index = 0; index < listArray.length; index++)
             bill.append(yourChoicesItems[listArray[index]] + "\n");
          bill.append("\n");
          bill.append("SUB TOTAL\t\t$"
                     + String.format("%.2f", subTotal) + "\n");
          bill.append("STATE TAX      \t\t$"
                     + String.format("%.2f", stateTaxes) + "\n");
               bill.append("LOCAL TAX      \t\t$"
                     + String.format("%.2f", localTaxes) + "\n");
          bill.append("TOTAL    \t\t$"
                     + String.format("%.2f", total) + "\n\n");
          bill.append("Thank you - Have a Nice Day\n\n");
              reportFile.println("State tax: " + stateTaxes + "n\n");
              reportFile.println("Local tax: " + localTaxes + "n\n");
              reportFile.println("Total sale: " + total + "n\n");
              reportFile.close();
              //Reset list array.
          yourChoices.clearSelection();
          repaint();
       public void actionPerformed1(ActionEvent event)
          if(event.getActionCommand().equals("Selection Completed"))
             displayBill();
          public void actionPerformed2(ActionEvent event)
          if(event.getActionCommand().equals("Daily Report"))
             displayReport();
         private void displayReport() {
       public static void main(String[] args)throws IOException
              FileReader itemsReader = new FileReader("Items.txt");
              BufferedReader br = new BufferedReader(itemsReader);          
              String itemName;
              double itemPrice;
              String line = br.readLine;
              while (line != null) {
              int blank = line.indexOf(" ");
              String itemName = line.substring(0, blank);
              String itemPrice = line.substring(blank +1, blank + 4);
              static String[] yourChoicesItems = itemName;                      
            static double[] yourChoicesPrices = itemPrice;
              PrintWriter reportFile = new PrintWriter("Report.txt");
              FileReader reportReader = new FileReader("Report.txt");
          AlaCarte alc = new AlaCarte();
         }

    This is what I get from compiler:
    AlaCarte.java:10: AlaCarte is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
    public class AlaCarte extends JFrame implements ActionListener
    ^
    AlaCarte.java:13: cannot find symbol
    symbol : variable itemName
    location: class AlaCarte
         String[] yourChoicesItems = itemName;
         ^
    AlaCarte.java:14: cannot find symbol
    symbol : variable itemPrice
    location: class AlaCarte
    double[] yourChoicesPrices = itemPrice;
    ^
    AlaCarte.java:110: cannot find symbol
    symbol : variable reportFile
    location: class AlaCarte
              reportFile.println("State tax: " + stateTaxes + "n\n");
              ^
    AlaCarte.java:111: cannot find symbol
    symbol : variable reportFile
    location: class AlaCarte
              reportFile.println("Local tax: " + localTaxes + "n\n");
              ^
    AlaCarte.java:112: cannot find symbol
    symbol : variable reportFile
    location: class AlaCarte
              reportFile.println("Total sale: " + total + "n\n");
              ^
    AlaCarte.java:113: cannot find symbol
    symbol : variable reportFile
    location: class AlaCarte
              reportFile.close();
              ^
    7 errors
    I am apparently not passing the strings for itemName and itemPrice to the AlaCarte class. Should I declare it in the AlaCarte class?

  • Read from text file vi won't read file...

    I am very new to LV programming so I hope you forgive any stupid mistakes I am making.   I am using Ver. 8.2 on an XP machine.
    I have a small program that stores small data sets in text files and can update them individually or read and update them all sequentially, sending the data out a USB device.   Currently I am just using two data sets, each in their own small text file.  The delimiter is two commas ",,".
    The program works fine as written when run in the regular programming environment.   I noticed, however, as soon as I built it into a project that the one function where it would read each file sequentially to update both files the read from text file vi would return an empty data set, resulting in blank values being written back into the file.   I read and rewrite the values back to the text file to place the one updated field (price) in it'sproper place.  Each small text file is identified and named with a 4 digit number "ID".   I built it twce, and get the same result.  I also built it into an installer and unfortunately the bug travelled into the installation as well.
    Here is the overall program code in question:
    Here is the reading and parsing subvi:
    If you have any idea at all what could cause this I would really appreciate it!
    Solved!
    Go to Solution.

    Hi Kiauma,
    Dennis beat me to it, but here goes my two cents:
    First of all, it's great to see that you're using error handling - that should make troubleshooting a lot easier.  By any chance, have you observed error 7 when you try to read your files and get an empty data set?  (You've probably seen that error before - it means the file wasn't found)
    If you're seeing that error, the issue probably has something to do with this:
    Relative paths differ in an executable.  This knowledge base document sums it up pretty well. To make matters more confusing, if you ever upgrade to LabVIEW 2009 the whole scheme changes.  Also, because an installer contains the executable, building the installer will always yield the same results.
    Lastly, instead of parsing each set of commas using the "match pattern" function, there's a function called "spreadsheet string to array" (also on the string palette) that does exactly what you're doing, except with one function:
    I hope this is helpful...
    Jim

Maybe you are looking for

  • Can I get both time and date in every single message that I receive or send?

    I have been usine iPhone for a while now, and I was wondering if you can change the message-settings somehow, so that I can see both date and time in every single message, instead of every 30 minutes, is this possible?

  • What is the error in this trigger

    create or replace trigger tt1 after insert on EXERCISE2_T referencing new as new for each row declare v_excd EXERCISE2_T.EX_CD%type:=(CASE EX_CD     WHEN 'X' THEN 'Extracted';     WHEN 'F' THEN 'Failed';     WHEN 'S' THEN 'Skipped';     WHEN 'C' THEN

  • ITunes quits during update. Will I lose everything during recovery?

    So I connected my iphone 5 to my laptop to upgrade it to iSO 7.0.2. I did what I usually do right before updating it: I transfer my purchases and I sync/back up my phone. Now I begin the update but then iTunes gets an error and quits on me. So I reop

  • Building Expressions with Repeated Cell References

    I have noticed a difficulty with building an expression using the 'Point and Click' method of inserting Cell References in Numbers 09. The first time a particular cell is clicked, its reference is inserted properly in the expression at the cursor. If

  • Calculation of Averages

    I need to be able to calculate the average difference between a total average on a single row for example Value , AverageTotValue , Difference 2, 4, -2 4, 4, 0 6, 4, +2 preferably using Discoverer plus (although I could write a function if necessary)