Add content to report (locals variable by example)

I would like to add some extra information in my TestStand V4.1 report.
Is it possible to add some text strings, values of local variable etc... ??

This doc lists several ways to go about it.  Pick your poison.
http://zone.ni.com/devzone/cda/tut/p/id/8289
The best for 4.1 is to use the section titled Using Additional Results in TestStand 4.1 and Later. 
Regards,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~

Similar Messages

  • S11 add content to a locall repo

    I would like to create a local repository that includes just a couple of packages ie FireFox, Gzip ... etc.
    I think I have figured out how to create the local repo, but how do I add specific pkgs to this.
    Thanks,
    M

    Did you see this section?
    Customizing Your Local Repository
    http://docs.oracle.com/cd/E23824_01/html/E21803/customizerepo.html
    You can create a repository that is a subset of the source repository. The following command copies all versions of the group/feature/amp package and all dependencies of those versions to the amprepo repository. The amprepo repository was previously created using the pkgrepo create command.
    # pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /export/amprepo -m all-versions -r group/feature/amp
    So you could do something like:
    # pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /my/repo pkg1 pkg2 pkg3
    See also the pkgrecv.1 man page
    http://docs.oracle.com/cd/E23824_01/html/E21796/pkgrecv-1.html
    which starts:
    pkgrecv allows the user to retrieve packages from a pkg(5) repository or package archive. pkgrecv can also optionally republish the retrieved packages to a different package repository
    See examples 4 and 5

  • Debugger: Watchpoint on local variable is triggered upon entering routine?

    Hi
    My problem is perhaps best illustrated in this small program:
    REPORT  zzkc_watchpoint.
    PERFORM form1 USING 'AB'.
    PERFORM form1 USING 'CD'.
    PERFORM form1 USING 'EF'.
    PERFORM form1 USING 'GH'.
    FORM form1  USING    value(p_1).
      DATA: lv_local(3)     TYPE c.
      IF 1 > 2.        <----
    Watchpoint triggered here - regardless of condition
      ENDIF.
      lv_local = p_1.
      IF 1 > 2.       <----
    And here when condition is met.
      ENDIF.
    ENDFORM
    I set a conditional watchpoint (all Module Instncs) on variable lv_local, condition: lv_local = 'EF', BUT: The watchpoint is whenever form form1 is entered. It's also triggered when lv_local eventually is set to 'EF", but why is it triggered upon entering form1???
    Best regards
    Kenneth

    This happens because the visibility of local variable is only in the subroutine. When system calls the subroutines subsequently, it reassigns the content of the local variable. If you watch the watchpoints (Watchpoints tool in the Break/watchpoints), you will see that for each subsequent call, system creates a new data reference and assign it to the Current Variable and Old variable. And it has the similar content (blank value) in the Current Value & Old Value.
    FORM form1 USING value(p_1).
      DATA: lv_local(3) TYPE c.
      IF 1 > 2. " At this point, Current Value and Old Value in the Watch points are same, BLANK.
      ENDIF.
      lv_local = p_1.   " here, After this statement Current Value would change to value of the P_1
      IF 1 > 2.
      ENDIF.
    ENDFORM.
    If you change the variable scope by changing it as the STATICS, it would only stop when it reaches to the EF.
    Check the last section:
    http://help.sap.com/saphelp_erp2005/helpdata/EN/f1/792442db42e22ce10000000a1550b0/frameset.htm
    In the OLD debugger, as soon as the validity of the variable changes, system would remove the watch point on that variable.
    Regards,
    Naimesh Patel

  • How many ways to read and write a local variable in a called VI?

    Ciao!
    I'm producing my first TestStand sequence. It is called "FirstAttempt" and it is made by a single step which calls a VI. One of the first dilemmas i encountered realizing this sequence is how to read and write a local variable (created going in Variables -> Locals ('FirstAttempt') -> <right click to insert local>) in the called VI.
    The first way (the only one i tried) is to create a control and an indicator on the VI front panel, connect them to their respective terminals in the connector pane and then specify (going in Step Settings -> Module) that these connectors (shown in the Parameter Name column) are linked to the local variable (selected in the Value column).
    The second way (not tried) consists in using TestStand API: create a Sequence Context reference on the VI front panel, link it to a property node in the block diagram, select the property "Locals" and extract from this the local variable name and value which, i think, can be readable and writable.
    So...
    Are the shown ways correct?
    Are there other ways?
    Knowing that a "local" variable can be considered "global" within the whole sequence, is there the possibility to simply create a reference to the local variable and use the reference in the called VI block diagram in order to save space in the connector pane (if using method 1) or in the block diagram (if using method 2)?
    Thanks!
    Message Edited by aRCo on 09-17-2009 05:09 AM

    Hi,
    Before TestStand 3 you would use the second way you quoted as its the only way.
    But now you would use the first way you quoted. You may still what to pass the SequenceContext if you were going to use the TestStand API. For TestStand 3.x and above you would use this way as the first chose. (Personnelly, I would not pass the SequenceContext into a VI if I know it was never going to be used in that VI.)
    Not sure I understand your final comment, maybe you are liking it to passing the reference of a control to a subVI so that the control can be updated from within the subVI.
    If this is the case and you had a situation where you had a step that was running in parallel with the rest of the steps in the sequence either as a separate thread or execution and were dependent on the contents of the  local variable changing from that parallel running step, then you would have to use the API SetVal method to change the local.
    Hope this is clear.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How can I use local variable in LabVIEW-Action?

    Hi All!
    There is local variable (for example "MyVariable") in local scope of project. There is Action-step, created by LabVIEW. One of input terminals step is "Sequence Context".
    How can I access to MyVariable by Sequence Context? Unbundle? It does't work.
    Thank you.

    On the TestStand palette there is a VI called TestStand - Get Property Value.vi.  Use that.  Attached is an image showing how to use it.  The trick is making it produce the correct data type.  Do that by right clicking on the VI and selecting Select Type.  Then you can choose the type.  I think in LV 2010 and TS 2010 it is a polymorphic VI and you can just change it.  I wrote an example here for Chaz: http://forums.ni.com/t5/NI-TestStand/How-to-execute-two-steps-in-parallel/td-p/1449874
    It's the second example that's attached.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    AccessLocalVar.JPG ‏67 KB

  • How to add a new Local Variable for DataBase Logging?

    Hello
    I need to add a Local sequence variable to my STEP_RESULT table, i know i need to modify the schema by adding a new column but not sure on what to write in "Expression" to access the value of local variable. 
    Please reply asap, as its a little urgent.
    Regards
    Nitin Goel

    Hi
    you can read this here:
    http://digital.ni.com/public.nsf/allkb/F5ADBC61222343B586256CE00055E6D6?OpenDocument
    Regards
    DianaS

  • Local variable in report writer

    how to declare local variable in report writer?

    HI Oscar,
    what is "local" for you? Local in the report?
    Did you check the documentation?
    My result in SAP Help Portal is:
    [Variables|http://help.sap.com/saphelp_nw04s/helpdata/en/fc/eb3034358411d1829f0000e829fbfe/frameset.htm]
    Regards, Boris

  • Changing the Variable Settings in Content Tracker report generation page

    I am looking out for Changing the Variable Settings for the Performance Optimization Functions in Content Tracker report generation page. Some options which were available in 10g are not in UCM11g. I got the information that Updating Content Tracker should help, but am unable to locate what are the parameters to be set.
    Any pointers on this would be really helpful.
    Regards,
    Bharat

    Hi
    From Update Component Configuration these are the options listed that can be changed :
    Update Component Configuration
    SctUrlMaxLength     
    SctMaxRecentCount     
    SctTrackContentAccessOnly     
    SctProxyNameMaxLength     
    SctSimplifyUserAgent     
    SctDoNotPopulateAccessLogColumns     
    SctDoNotArchive     
    SctPostReductionExec     
    SctTrackContentAccessOnly should be unchecked and then test to see if the options get listed .
    Thanks
    Srinath

  • How can I put the contents of an array into a set of write local variable clusters?

    I have a set of controls that a user fills in. The controls are clustered by rows, then combined into a 1D array, then written to a file. When I read the file, I want to feed the array back into the clusters with write local variables. Is there a simple way to handle the numerous local variable clusters so I can stuff the array back into them?
    Is there a better way to handle the whole issue of storing and recovering the information?
    The rows are steps in a procedure, and each row (cluster) contains numerical as well as string controls.

    There are many ways of doing this
    You may convert all your data to strings and save as an ascii file (you have to pay attention to the file format, so you can read it properly.
    Or you can use the configuration vi's, it may work in your case.
    or you may use an invoke node to get all controls of the vi's, save it, then read it, without worrying about any format. I have attached a vi that uses this method.
    Attachments:
    Temp.vi ‏52 KB

  • What is difference between local variable and property node ?

    What is difference between local variable and property node ?
    " 一天到晚游泳的鱼"
    [email protected]
    我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
    欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview

    To make things clear, here are two small examples that show how nasty locals and value properties can be to the naive programmer.
    - Open the diagram of the race condition.vi before running it and try to predict what will be the values of the two counters after the third run.
    - Use the Compare Locals Properties and Wires.vi to find out how slow locals and value properties can be (times 1000+).
    This being demonstrated, I must add that I use globals and value properties quite often, because they are often very convenient
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Race condition.vi ‏9 KB
    Compare Locals Properties and Wires.vi ‏18 KB

  • How to solve error using local variables?

    I've created a sequence with a local variable.
    But when I execute it, an error occurs since the first step (before the step where I manipulate the local variable).
    The error code is something like:
    Error in Evaluation. Syntax expression. Column [0-0]
    It's interesting because it seems that once I've executed my sequence for the first time I can't create any other sequence where this error doesn't appear.

    Pparo,
    The problem does not occur under TS 1.0.3 on my system. However, I think we can get to the bottom of this.
    When at a breakpoint in your sequence, if I type the expression "Locals.nls == 15-" in the TestStand watch window, I will get the message
    Evaluation Failed: Syntax error in expression (Column 18-18)
    I believe that this is the same type of error that you have encountered. Correct me if I am wrong.
    The numbers after the word "Column" indicate where the error has occurred in the expression. In your case the error occurs at the beginning of an expression. The question still remains as to in which expression is error occurring.
    Are you seeing this error reported in the watch window? If so, then you have typed the expression in the watch window.
    If I copy the bad expression above into a the expression of a Statement step I get a run-time error of
    An error occurred in the 'Statement' step of the 'MainSequence' sequence in 'Sequence File1'.
    The post-expression for the step 'Statement' could not be evaluated.
    Syntax error in expression.
    Error Code: -17322
    From what you report, the error appears to be located in your watch expression. When I executed your sequence with a breakpoint on the first step, I added the watch expression by selected the Context tab, expanding the Sequence Context tree view until I could see the nls variable, and then I dragged nls from the tree view to the watch window. This created the watch expression of Locals.nls. I also created the same watch expression by right clicking in the watch window, selecting Add Watch from the context menu, and selecting (or typing) Locals.nls. The expressions all evaluated to 24 without error.
    This process has NOTHING to do with creating local variables. You asked if you are creating variables properly. There are only 2 ways to create variables in TestStand 1.0.3, neither of which you have described. The most common method is to select the Locals tab after opening your sequence (not during execution), right click in the right pane and add the variable of your choice. It seems like you did this correctly based on the sequence file you sent. The other method of creating variables is to do so programmatically. However, this is beyond the scope of this answer.
    You ask a question about "the best way to create three constants in LabVIEW and pass them to a LabVIEW VI that is a step?" This implies to me that you want to create the strings within a VI called by one sequence step, and then use them in another VI called by a different sequence step. I would recommend taking a look at the example AccessingPropertiesAndVariables.seq that ships with TestStand. The first 3 VIs write values back to step properties, but could just as easily write them back to local variables. The 4th VI writes a file reference back to a TS local variable. The 5th and 6th step get the file reference from the TS local variable. You want to do something similar to the 4th and 5th VI, however, you want to send 3 strings to local TS variables, and then get them in the following VI. This will require using "TestStand - Set Property Value (String).vi" and "TestStand - Get Property Value (String).vi" which can be found in the TestStand function palette in LabVIEW. After reviewing this example you can then ask additional question. I recommend posting the question on a different thread since it is unrelated to your original question about the syntax error.

  • Data Acquisition - using local variables to write data to a file

    Hello,
    I am running a Data Acquisition vi (currently in LabVIEW 7.1 but soon to be updated to 8.2) that collects ~100 parameters of data from several sources contained in a while loop. The current configuration (which I did not write) uses very few subVIs and writes to ~100 local variables to store each parameter. It then reads all the local variables and builds an array of all the strings, converts then to a spreadsheet string, then uses the write characters to file function to append to a datafile. I am trying to clean things up and have came up with subVIs to collect the data from the following sources:
    8 serial port sources collecting btwn 8 and 20 parameters each
    ~15 thermocouple readings
    ~10 analog inputs
    ~20 parameters read off an ARINC 429 bus.
    I have come up with a subVI to read each of the sources and have placed the subVIs in the while loop. Each subVI outputs the data that it collects in array or cluster form. I was wondering how best to write each parameter to a CSV file at between 1 and 10 Hz. Should I write each subVI output to a LV and then read them off as was done before (the difference being that I have reduced the # of LVs to ~10 vs >100?
    I should add that precise timing is not that important, so if all the subVIs are not collecting simultaneously (which I understand that they won't be), it does not really matter.
    Thanks.

    Hi jilla,
    jilla wrote:
    What I think that you are saying is to turn the outputs of the 4 subVIs into inputs of a 5th subVI that writes to the data file. Correct?
    Yes.  It may sound like a fine-point, but I beileve it's better to create a VI specifically for formatting data - in your example, 4 arrays IN, a single string OUT.  Then write the string to file as a seperate operation.  GUI-displayed data can go through a similar transformation, the four arrays wired to a subVI which builds output-structures specifically for display.  It's a beginner's mistake to put lots of individual controls and indicators on the screen when groups of them are naturally related (in an object-oriented sense.)  Use clusters to group related controls - this will keep the diagram much cleaner.
    One more question: at what point (either # of data points or frequency of data collection) does it become necessary to use queues? Thanks.
    Well, there's not really a clearly definable "point".  I'd say if your update-rate climbs above 100Hz, or you witness poor program or system performance, then it's time.  The scenario you've described is a fairly simple acquire/display&log loop - and simple is good.   Then-again people can't see/react-to updates faster than about 10Hz - so it doesn't make sense to sacrifice performance - if performance becomes an issue.
    Re: queues:  Queues are sometimes used to buffer data that's "produced" in one place and "consumed" in another.
    Here, if/when logging data, you're logging with every DAQ.  I wouldn't recommend using a queue to transport data from a "DAQ loop" to a "Logging-loop" - those functions can be in the same loop.  Should/could a queue be used to get data from a "DAQ loop" to update the GUI at a lower frequency?  Sure, but a Notifier might be a better choice.   Further, in the (simple?) program you've described, you might use a case structure (True/False) to only update FP indicators every "X" iterations - a simple solution that doesn't require Queues or Notifiers.
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Inserting in the UUT_Results table a value that we read from our data base from a local variable

    We would like to include in the UUT_Results table a value that we read from our data base into a local variable during the execution of our sequence file. We found that by modifying the configure database options we were able to add a column for this variable, but the local variable was not available to be placed into an expression for that column from the local variables or parameters. Is it possible to do this, and if so, how? Station Globals were available to be included in the expression, however the sequence file may be executed on more than one system which makes the Global unavailable on systems other than the one where the sequence file originated.

    You can use the TestStand API to programmatically create global variables at runtime, thus ensuring their existence. For example, you could call Engine.Globals.SetValString("GlobalStringVariableName", PropOption_InsertIfMissing, "variable value")
    Of course, if you need to test multiple UUTs in parallel, a single global is not sufficient. In that case you might consider adding the field you need to the UUT datatype in the process model. You could then access the field in your sequence via RunState.Root.Locals.UUT.YourNewField = YourNewValue.
    If you also want your sequence to run without using a process model, you must check for the existence of the UUT before accessing it. You could use the expression function: PropertyExists("RunState.Root.Locals.UUT.YourNewFi
    eld")

  • RE: local variable cross-talk?

    Jeff
    A global can be considered as a variable to the entire code, where lots of
    different vi's can operate it. Locals only have any meaning within their
    own vi, or instances of their own vi.
    If anything writes to a particular global, whether in reenterent vi's or
    not, it's available everywhere in the code.
    What you were asking was about locals though. If a vi is non-renentrant
    (i.e. as they come out of the box) then the values in the locals are vi
    specific, no matter where the vi is, where it was last used, it retains the
    data from it's last operation. If it is re-entrant, then the values in the
    locals for each occurance of the vi are its own for EACH instance, i.e. just
    like different locals in different vi's, it doesn't matter where else the vi
    is used, the data held is that from the last operation of that specific
    instance.
    Simple way to demonstrate this. Make a vi that has one numeric control,
    then code in +1 and get it to write to a local variable for that control.
    Throw in an indicator to wire out the result of what is written to the local
    for the control.
    Then take this vi, put it in a for loop, then put another copy in the for
    loop as well. Wire the indicators to the side of the for loop and create
    indicator arrays for them. Get the loop to run 6 times say. Now try
    running this with the vi in the for loop non-reentrant and then reenterrant.
    One way the arrays will contain either all the odd no.s 1,3,5,7,9,11 and
    then the other array 2,4,6,8,10,12 (don't know which array will be which,
    depends which executes first in the for loop of this example). The other
    way they will both be 1,2,3,4,5,6. In the first example, the same vi has
    run 12 times, i.e. one copy of the vi which retains its info and is called
    in many places and therefore only has one set of values, and the other with
    two re-enterant copies where they have their information specific to that
    instance of them i.e. effectively they are different vi's. Both ways are
    useful, depends what you want.
    If you're looking for a use for non-reenterant vi's then consider this:-
    For instance. Supposing you get many things to try to write to a global
    array of numbers, and you have two vi's one "A" writes to the first element
    in the array and the other "B" writes to the second element. Because in LV
    you have to read a global first and then write to it to perform a change,
    these independant vi's "A" and "B" (be they re-enterant versions of the same
    vi, or different vi's), can be performing the tasks simultaneously in the
    code. I.e. "A" reads, "B" reads, "A" writes, and "B" writes over the top
    with a modified version of what it read, and "A"'s changes are lost. This
    is what's known as a "race condition" as "A" hadn't finished and "B" needed
    to know what "A" was going to write before "B" performed "A" read. Try it,
    hours of fun if you code this kind of thing in inadvertantly!
    If the same vi is used, and is not re enterant, it can only run in one
    instance at a time, hence two read / write operations cannot be performed
    together, problem solved. Unless that gives you timing issues of course,
    waiting for one to finish, to write the other......but that's another whole
    can of worms.
    cheers
    Tim Price
    This e-mail, its content and any files transmitted with it are intended
    solely for the addressee(s) and are confidential and may be legally
    privileged. Access by any other party is unauthorised without the express
    prior written permission of the sender. If you have received this e-mail in
    error you may not copy, disclose to any third party or use the contents,
    attachments or information in any way.
    -----Original Message-----
    From: [email protected]
    [mailto:[email protected]]On Behalf Of Jeffrey W Percival
    Sent: 29 November 2001 21:12
    To: [email protected]
    Subject: Re: local variable cross-talk?
    Another useful reply! What a great news group this is.
    One last thing I wanted to ask about, though, is global vs. local. I see
    you talk about globals, but in fact the variables in my subVI's were locals.
    I can easily understand the behavior I observed accompanying the use of
    global variables, But I guess the use of the word "local" stumped me.
    Should I interpret "local" in LabVIEW's sense to mean "local to all
    instances of this VI"? And global to mean "visible to all instances of this
    VI as well as other VI's"?
    -Jeff
    Tim Price wrote:
    This facility is actually very useful, for instances where you want to
    encapsulate some code so that it can only run in one place at a time,
    i.e.
    global arrays that are written to in more than one place. This method
    can
    eradicate race conditions completely for example when used like this.
    There
    are multiple other uses as well.
    However, using a vi as a module of code, to run in more than one
    instance at
    a time simultaneously, re-entrant is the way to go. Just make sure you
    debug it first!!!
    Remember though, just because a vi may be re-eneterant, doesn't mean
    that
    everything inside is; sub-vi's, Globals etc. The classic one I've seen
    is
    where people think that a re-enterant vi is talking to it's own copy of
    any
    Globals used within it, i.e. counters etc., where in actual fact of
    course,
    they are all using the same Globals.
    Worth playing with a few examples to get familiar with it.
    Tim Price
    Jeffrey W Percival, Senior Scientist and Associate Director
    Space Astronomy Laboratory, University of Wisconsin - Madison
    1150 University Ave, Madison, WI 53706 USA
    608-262-8686 (fax 608-263-0361) [email protected]
    http://www.sal.wisc.edu/~jwp

    Tim Price wrote:
    Tim, thanks very much. I'll try the experiment you suggest.
    Thanks for taking the time.
    -Jeff
    Jeffrey W Percival, Senior Scientist and Associate Director
    Space Astronomy Laboratory, University of Wisconsin - Madison
    1150 University Ave, Madison, WI 53706 USA
    608-262-8686 (fax 608-263-0361) [email protected] http://www.sal.wisc.edu/~jwp

  • Local variable needs to be declared final

    This is the error code I am getting:
    C:\javacode\Notepad>javac FinalProgram.java
    FinalProgram.java:60: local variable textfield1 is accessed from within inner class; needs to be declared final
    System.out.println("It is detected " + pressed +
    textfield1);
    ^
    1 error
    Here is my code:
    comments relevant to this topic are //ALL IN CAPS
    import java.awt.*; //declare packages needed
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.JMenuBar;
    public class FinalProgram extends JFrame
        implements ActionListener {
    static JFrame frame;
      public void actionPerformed (ActionEvent e) {
          String answer = (e.getActionCommand());
             if (answer == "Get Data") {
              JInternalFrame iFrame = new JInternalFrame("Get Data . ", false, true, false, false);
              iFrame.setLayout(new GridLayout(8,2));
              JLabel label1 = new JLabel("First Name");
              JLabel label2 = new JLabel("Last Name");
              JLabel label3 = new JLabel("Street");
              JLabel label4 = new JLabel("City");
              JLabel label5 = new JLabel("State");
              JLabel label6 = new JLabel("Zip");
              JLabel label7 = new JLabel("Phone");
              JLabel label8 = new JLabel("Click Button to Submit Form -->");
              JTextField textfield1 = new JTextField(10);
              JTextField textfield2 = new JTextField(10);
              JTextField textfield3 = new JTextField(10);
              JTextField textfield4 = new JTextField(10);
              JTextField textfield5 = new JTextField(10);
              JTextField textfield6 = new JTextField(10);
              JTextField textfield7 = new JTextField(10);
              JButton button1 = new JButton("Submit Data");
              //textfield1.addActionListener(this);
              textfield1.addActionListener(this);
              textfield2.addActionListener(this);
              textfield3.addActionListener(this);
              textfield4.addActionListener(this);
              textfield5.addActionListener(this);
              textfield6.addActionListener(this);
              textfield7.addActionListener(this);
              button1.addActionListener(new ActionListener() { //start button1.addActionListener
              public void actionPerformed(ActionEvent a) { //start button1 actionPerformed
                        String pressed = ((JButton) a.getSource()).getText();
                        System.out.println("button press is detected " + pressed + textfield1);  //THIS SYSTEM OUT PRINT IS A TEST, IT WORKS WHEN I DON'T HAVE THE "+ textfield1" PART, IT GIVES ME THE ERROR MESSAGE POSTED ABOVE ABOUT DECLARING IT FINAL.
    I'M A BEGINNER, MY GOAL HERE, IN EASY ENGLISH, IS TO GRAB THE DATA FROM EACH TEXTFIELD AND STORE THEM IN VARIABLES, OR MORE IDEALLY IN AN ARRAY SO THAT THE REST OF MY CODE BELOW CAN WRITE THEM TO FILE, I'VE BEEN TRYING THE PAST FEW DAYS ON THIS EXPERIMENTING AND ANY SUGGESTIONS WOULD BE APPRECIATED
              try {
                   String directoryName = "c:\\javacode\\Notepad";
                   String fileName = "program.txt";
                   File output = new File(directoryName,fileName);
                   output.createNewFile();
              if (! output.isFile()) {
                   System.out.println("File creation of" + output.getPath() + "failed");
            return;
              BufferedWriter out = new BufferedWriter(new FileWriter(output.getPath(), true));
              String[] text = {"This is the text that will be written. \r", //we pass an array, which holds the text to append to the file
                    "The text will be written to the file \r",
                    "in append mode. If the file does not \r",
                    "exist it will be created.\r"};  //WHAT YOU SEE HERE IS JUST A TEST, IN PLACE, I WOULD LIKE TO HAVE THE INFORMATION FOR MY TEXTFIELDS SO THAT I CAN PASS THEM THROUGH A FOR LOOP AS BELOW AND WRITE DATA FOR EACH OF THE TEXTFIELDS TO MY EXTERNAL TEXT FILE
                    for(int i = 0; i < text.length; i++) { //using the length of the text message we use out.Write() to write out the data.  Notice that all of the code is placed into a try-catch block so we can check for any IOExceptions that occur
           out.write(text[i] + "\n");
              //Here I create the code to grab the actions(grab the text) from the textFields and store them into variables OR into an array
              //after I have created my container to hold the information for my various textFields, then I want to create a for loop to go through each textField and write that information to a text file, separating each textField on its own line
         out.close();
         catch(IOException d) {
         System.out.println("Error writing to file " + d);
                   }  //end button1.addActionListener
              }  //end button1 actionPerformed
              );     //end actionListener statement     
              //textfield1.setSize(10, 10);
              iFrame.add(label1);
              iFrame.add(textfield1);
              iFrame.add(label2);
              iFrame.add(textfield2);
              iFrame.add(label3);
              iFrame.add(textfield3);
              iFrame.add(label4);
              iFrame.add(textfield4);
              iFrame.add(label5);
              iFrame.add(textfield5);
              iFrame.add(label6);
              iFrame.add(textfield6);
              iFrame.add(label7);
              iFrame.add(textfield7);
              iFrame.add(label8);
              iFrame.add(button1);
              iFrame.setSize(200, 500);
              iFrame.setVisible(true);
              add(iFrame);
              if (answer == "Display Data") {
              JInternalFrame iFrame = new JInternalFrame("Display Data . ", false, true, false, false);
              JTextArea text = new JTextArea();
              JScrollPane scroller = new JScrollPane();
              scroller.getViewport().add(text);
              iFrame.getContentPane().add(scroller);
              iFrame.setSize(200, 150);
              iFrame.setVisible(true);
              add(iFrame);
      public FinalProgram() {
        super ("Menu Example");
        JMenuBar jmb = new JMenuBar();
        JMenu file = new JMenu("Functions");
        JMenuItem item;
        file.add(item = new JMenuItem("Get Data"));
        item.addActionListener (this);
        file.add(item = new JMenuItem("Display Data"));
        item.addActionListener (this);
        jmb.add(file);
        addWindowListener(new ExitListener());    
         setJMenuBar (jmb);
        public static void main(String[] args) {
            FinalProgram window = new FinalProgram();
            window.setTitle("Final Program");
            window.setSize(600, 600);
            window.setVisible(true);
    }

    hi,
    Updated Code,
    import java.awt.*; //declare packages needed
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.JMenuBar;
    public class FinalProgram extends JFrame
        implements ActionListener {
    static JFrame frame;
              JLabel label1 = new JLabel("First Name");
              JLabel label2 = new JLabel("Last Name");
              JLabel label3 = new JLabel("Street");
              JLabel label4 = new JLabel("City");
              JLabel label5 = new JLabel("State");
              JLabel label6 = new JLabel("Zip");
              JLabel label7 = new JLabel("Phone");
              JLabel label8 = new JLabel("Click Button to Submit Form -->");
              JTextField textfield1 = new JTextField(10);
              JTextField textfield2 = new JTextField(10);
              JTextField textfield3 = new JTextField(10);
              JTextField textfield4 = new JTextField(10);
              JTextField textfield5 = new JTextField(10);
              JTextField textfield6 = new JTextField(10);
              JTextField textfield7 = new JTextField(10);
              JButton button1 = new JButton("Submit Data");
      public void actionPerformed (ActionEvent e) {
          String answer = (e.getActionCommand());
             if (answer == "Get Data") {
              JInternalFrame iFrame = new JInternalFrame("Get Data . ", false, true, false, false);
              iFrame.setLayout(new GridLayout(8,2));
              //textfield1.addActionListener(this);
              textfield1.addActionListener(this);
              textfield2.addActionListener(this);
              textfield3.addActionListener(this);
              textfield4.addActionListener(this);
              textfield5.addActionListener(this);
              textfield6.addActionListener(this);
              textfield7.addActionListener(this);
              button1.addActionListener(new ActionListener() { //start button1.addActionListener
              public void actionPerformed(ActionEvent a) { //start button1 actionPerformed
                        String pressed = ((JButton) a.getSource()).getText();
                        System.out.println("button press is detected " + pressed + textfield1.getText()); 
              try {
                   String directoryName = "c:\\javacode\\Notepad";
                   String fileName = "program.txt";
                   File output = new File(directoryName,fileName);
                   output.createNewFile();
              if (! output.isFile()) {
                   System.out.println("File creation of" + output.getPath() + "failed");
            return;
              BufferedWriter out = new BufferedWriter(new FileWriter(output.getPath(), true));
              String[] text = {"This is the text that will be written. \r", //we pass an array, which holds the text to append to the file
                    "The text will be written to the file \r",
                    "in append mode. If the file does not \r",
                    "exist it will be created.\r"};  //WHAT YOU SEE HERE IS JUST A TEST, IN PLACE, I WOULD LIKE TO HAVE THE INFORMATION FOR MY TEXTFIELDS SO THAT I CAN PASS THEM THROUGH A FOR LOOP AS BELOW AND WRITE DATA FOR EACH OF THE TEXTFIELDS TO MY EXTERNAL TEXT FILE
                    for(int i = 0; i < text.length; i++) { //using the length of the text message we use out.Write() to write out the data.  Notice that all of the code is placed into a try-catch block so we can check for any IOExceptions that occur
           out.write(text[i] + "\n");
              //Here I create the code to grab the actions(grab the text) from the textFields and store them into variables OR into an array
              //after I have created my container to hold the information for my various textFields, then I want to create a for loop to go through each textField and write that information to a text file, separating each textField on its own line
         out.close();
         catch(IOException d) {
         System.out.println("Error writing to file " + d);
                   }  //end button1.addActionListener
              }  //end button1 actionPerformed
              );     //end actionListener statement     
              //textfield1.setSize(10, 10);
              iFrame.add(label1);
              iFrame.add(textfield1);
              iFrame.add(label2);
              iFrame.add(textfield2);
              iFrame.add(label3);
              iFrame.add(textfield3);
              iFrame.add(label4);
              iFrame.add(textfield4);
              iFrame.add(label5);
              iFrame.add(textfield5);
              iFrame.add(label6);
              iFrame.add(textfield6);
              iFrame.add(label7);
              iFrame.add(textfield7);
              iFrame.add(label8);
              iFrame.add(button1);
              iFrame.setSize(200, 500);
              iFrame.setVisible(true);
              add(iFrame);
              if (answer == "Display Data") {
              JInternalFrame iFrame = new JInternalFrame("Display Data . ", false, true, false, false);
              JTextArea text = new JTextArea();
              JScrollPane scroller = new JScrollPane();
              scroller.getViewport().add(text);
              iFrame.getContentPane().add(scroller);
              iFrame.setSize(200, 150);
              iFrame.setVisible(true);
              add(iFrame);
      public FinalProgram() {
        super ("Menu Example");
        JMenuBar jmb = new JMenuBar();
        JMenu file = new JMenu("Functions");
        JMenuItem item;
        file.add(item = new JMenuItem("Get Data"));
        item.addActionListener (this);
        file.add(item = new JMenuItem("Display Data"));
        item.addActionListener (this);
        jmb.add(file);
        addWindowListener(new ExitListener());    
         setJMenuBar (jmb);
        public static void main(String[] args) {
            FinalProgram window = new FinalProgram();
            window.setTitle("Final Program");
            window.setSize(600, 600);
            window.setVisible(true);
    class ExitListener extends WindowAdapter {
      public void windowClosing(WindowEvent event) {
        System.exit(0);
    }

Maybe you are looking for

  • CR XI R2: Crystal Reports freezes and crashes when I try to open a report

    I added this question as a Reply to a message by nic2deep a month ago <Crystal Reports freezes every time I try to open a report.>, but got no response so I thought I'd try again on my own. I have 2 laptops with CR XI installed (same problem from ori

  • What is the diffrence between multicasting and broadcasting?

    hi friends What is the diffrence between multicasting and broadcasting? i'm bit confused in multicasting and broadcasting.

  • Slow iMac, kernel_task using 1GB memory

    My iMac has been running slower and slower over the past year or so.  The problem seems to come and go, but I have been noticing increasing tendency for applications to hang, or to get stuck for minutes with spinning beach balls.  I've been carrying

  • No Sound in PE 10 videos

    I have tried to 'share' my video to WMV, YouTube and MP4.  Each time it finishes, there is no sound.  I'm using video and audio from two Flip cams and have not changed any audio settings.  What's going on?

  • SSRS 2012 Configuration

    I have installed SQL Server 2012 Developer version and trying to configure SSRS for report manager URL and web service URL. But the url is not working and I am getting page not found error. Below are the screenshots of Reporting services configuratio