Exit and save in LMS

Hello,
I am having problems saving the results in our LMS after closing the quiz. I have seen several solutions pass, but so far none seem to work.
- I've set the end action to Close Project.
- After the quiz created another slide with a button, which I gave the action on succes 'exit'.
- I've changed the code in utilities.js to
function DoCPExit()
     var win=window.open("","_top","","true");
     win.opener = true; 
     win.close();
and
function DoCPExit()
     finish();
and
function DoCPExit()
     LMSFinish();
But those dont seem to work either.
It does not matter how I close the quiz, the close button of the browser, the close button in the Captivate playbar, the back button of the browser, I keep getting errors and no results or attempts are saved.
I am using Captivate 7 and publish in SCORM 1.2.
Any advice on how to make our users exit the content and save the attempts and results?

I believe these two issues may be related...I am having a similar issue under slightly different conditions:
I'm using:
Captivate 7
SCORM 2004
Template: SendTrackingDataAtEnd
Cornerstone LMS
Users are accessing content via IE8, Firefox and Chrome
Around 10% of my users remain 'In Progress' even after they have completed the completion criteria (view 70% of the slides.)
I have heard of higher incidence of 'non-completion' if the user has more than one browser tab open.
Any suggestions or ideas why users are not being recognized as 'completed'?

Similar Messages

  • How can I exit and save my open tags at the same time?

    If I am exiting Firefox, the next time I open it I would like to see the same tags I was working on there. Why I only get the Home page?

    Thanx TonyE for your answer. Unfortunately my Firefox browser's changed. I don't have the yellow/orange Firefox button which would allow me to select the options you point out in your answer. I've gone back to having the same old menu of: File, Edit, View, History, Bookmarks, Yahoo! (?), Tools and Help.
    What I do now, everytime I come back to Firefox, is going through History menu and restore the last session. It works.
    Many thanks for your support.
    JuanV

  • User exit in SAPMV50A to READ and SAVE TEXT from PO

    Hi Experts,
    I have an requirement for "Copying PO Header Text to Delivery Text". I have already created TEXT ID's , Access Sequence and assigment to Delivey type in VOXTN.
    Could you please suggest "User exit in the delivery program SAPMV50A, tcode VL01N,  to READ and SAVE TEXT from PO.
    In the user exit I will user READ_TEXT FM using the custeom id created.
    Thanks
    Krishan

    vofm

  • "An error occurred while opening the file dialog. Please save your presentation, exit, and restart PowerPoint."

    In PowerPoint 2013 on Windows 7 - 64 bit, when
    File / Save as is selected, an error message comes up stating, "An error occurred while opening the file dialog. Please save your presentation, exit, and restart PowerPoint." This is an intermittent issue and also
    affects Excel 2013. I have tried repairing it, done windows update and also uninstalled and reinstalled but no luck. I have researched this issue but it relates to Office 2007 and 2010 and the resolution does not support 2013.
    Has anyone come across this issue? If so how did you resolve it?
    Many thanks….

    Hi,
    You mentioned you tried some steps but I'm not sure what they are, you may try my suggestion to resolve this issue, follow these steps:
    Click Start, right-click Computer, click
    Properties, and then click Advanced system settings.
    On the Advanced tab, click Environment Variables.
    Locate and select the __COMPAT_LAYER variable, and then click Edit.
    Set the value of the __COMPAT_LAYER variable to EnableThemes. Or, delete the __COMPAT_LAYER variable.
    If the issue persists, we can troubleshoot this problem in Clean Boot to determine whether background programs are interfering with PowerPoint:
    http://support.microsoft.com/kb/929135
    Regards,
    Melon Chen
    TechNet Community Support

  • Reg: save exit and cancel buttons

    Hi,
    In normal report programs when we enable the back , exit and cancel buttons they work fine without writing any code.but its not in the case of Module pool why?
    In thr normal reports where does the code come from?
    regards
    prasanth

    Hi....
    Module pool programs is nothing but screen flow + reports...
    Here we designing the screens....
    So we hav to to give every functionality.. for all buttons and menu items of the appeared screen...
    Where as in reports...,
    We are just using the standard screen (sellection screen and list output screen ) s mostly...,
    Here also some times we hav to go for created screens.. nothing but.... interactive reports...,
    There we need to give again all those functionalities...
    And..,
    To see the BACK button logic and other logics in the reports...,
    Ex: PAI event of SAPLWBABAP program..., 
    You can find that name with...
    By giving /H and enter before ur action...
    Thanks,
    Naveen.I

  • How to Open and Save files

    I have a problem to open and save the files.here is my code. can anyone help me to open the files.
    public void actionPerformed(ActionEvent e) {
    if ("open".equals(e.getActionCommand())) {
    FileDialog fdopen=new FileDialog(this, "Load File", FileDialog.LOAD);
    fdopen.show();
    Thanks for ur time

    Hi fbnmir or who ever can answer my question,
    My problem is similar to the code you wrote. I'm trying to make (or rather complete a half done) editor for text files. For opening and saving files I have so far:
    public void actionPerformed(ActionEvent ae){
    FileDialog filedialog;
    final SearchDialog searchDialog;
    String arg = (String)ae.getActionCommand();
    // the Open ... case
    if(arg.equals(Editor.fileLabels[0])){ 
    if(Editor.VERBOSE)
    System.err.println(Editor.fileLabels[0] +
                        " has been selected");
    filedialog = new FileDialog(editor, "Open File Dialog", FileDialog.LOAD);
    filedialog.show();
    if(Editor.VERBOSE){  
    System.err.println("Exited filedialog.setVisible(true);");
    System.err.println("Open file = " + filedialog.getFile());
    System.err.println("Open directory = " + filedialog.getDirectory());
    //the Save ... case
    if(arg.equals(Editor.fileLabels[1])){ 
    if(Editor.VERBOSE)
    System.err.println(Editor.fileLabels[1] + " has been selected");
    filedialog = new FileDialog(editor, "Save File Dialog", FileDialog.SAVE);
    filedialog.show();
    if(Editor.VERBOSE){ 
    System.err.println("Exited filedialog.setVisible(true);");
    System.err.println("Save file = " + filedialog.getFile());
    System.err.println("Save directory = " + filedialog.getDirectory());
    These are two components of a MenuHandler class. The problem with this code is that in the text editor window, even if the Open button is pressed the file I want to open isn't displayed. Although the System.err (I think that's what it is called) says:
    Open ... has been selected
    Exited filedialog.setVisible(true);
    Open file = tutorial_01.rtf
    Open directory = C:\dhruba\epgy_2006\tutorial\
    Save ... has been selected
    Exited filedialog.setVisible(true);
    Save file = test.txt
    Save directory = C:\dhruba\epgy_2006\tutorial\
    How can I actually display the file I want to open, or save some text I've written?
    I would appreciate any help, thanks.

  • Close Outlook automatically and save open items to drafts

    Hello
    I have the following problem: some of my customers work with Outlook + POP3 (no Exchange Server) and from time to time an employee forgets to close Outlook after working hour. Because of the open PST-File I have problems with the backup (the open PST-File is
    in use and therfore the backup fails). Now I have wrote a small script to kill the outlook process on every machine at 10 p.m. But the next day when the employee starts Outlook he gets an annoying message about the PST-File was not closed properly and he has
    to wait up to 10 Minutes until Outlook starts. So my question: is there a tool or a script to close outlook properly?
    Btw: I have already found some sripts to close outlook in a decent way BUT: if the user has an open New E-Mail Window open all the scripts I found where not able to handle this situation - this is because in that case Outlook asks whether you want to save the
    open New Massage to Drafts or not (and Outlooks does not close until you press the YES, NO or CANCEL Button.
    Here is one of the Script I found (AutoHotKey Script):
    SetTitleMatchMode RegEx
    IfWinExist .*Microsoft\sOutlook
    WinClose .*Microsoft\sOutlook
    ExitApp
    This script works perfectly when no additional Outlook Item Window is open - Outlooks then closes properly and no problem arises with the PST-File. But as already mentioned when the user has a open New Item Window (e.g. new Mail he just started to compose)
    Outlook does not close but asks the user what to do. What I need is a script or a program that answers automatically to the Outlook question dialog box "Do you want to save changes?" YES and then closes Outlook properly. The next Day the user will
    find his new / unfinished Mail item in the drafts folder.
    I have also found a small program called "Close Outlook" by Douglas J. Nakakihara. But this tool also fails when an open (new) Message Windows exists.
    Any ideas?
    Markus

    This code works for me
    I created a batch file CloseOL.bat to call the CloseOL.vbs.
    Here's the code for the batch file:
    @echo off
    cscript "CloseOL.VBS"
    :EXIT
    And here's the code for CloseOL.vbs:
    Dim oOL 'As Outlook.Application
    Dim olkIns
    Set oOL = CreateObject("Outlook.Application")
    If oOL Is Nothing Then
        'no need to do anything, Outlook is not running
    Else
        'Outlook running
        Do while oOL.Inspectors.Count <> 0
            For each olkIns in oOl.Inspectors
                    olkIns.Close olSave
                Next
        Loop
        oOL.Session.Logoff
        oOL.Quit
    End If
    Set oOL = Nothing
    Hope this helps

  • Edit an field in alv and save it

    i have an report in alv, i have used func module 'alv_list_display'.
      i have to make an field edit'able,(so that i can edit,change the existing data) then i have to save the data so that the data is stored in the table.

    Hi,
    you have to use fieldcat-input = 'X', and edit = 'X'.to make the fields editable in alv display.and SAVE you need the SAVE button.
    report  ztest_alv_check     message-id zz           .
    type-pools: slis.
    data: x_fieldcat type slis_fieldcat_alv,
          it_fieldcat type slis_t_fieldcat_alv,
          l_layout type slis_layout_alv,
          x_events type slis_alv_event,
          it_events type slis_t_event.
    data: begin of itab occurs 0,
          vbeln like vbak-vbeln,
          posnr like vbap-posnr,
         end of itab.
    select vbeln
           posnr
           from vbap
           up to 20 rows
           into table itab.
    x_fieldcat-fieldname = 'VBELN'.
    x_fieldcat-seltext_l = 'VBELN'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-input = 'X'.
    x_fieldcat-edit = 'X'.
    x_fieldcat-col_pos = 1.
    append x_fieldcat to it_fieldcat.
    clear x_fieldcat.
    x_fieldcat-fieldname = 'POSNR'.
    x_fieldcat-seltext_l = 'POSNR'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-input = 'X'.
    x_fieldcat-edit = 'X'.
    x_fieldcat-col_pos = 2.
    append x_fieldcat to it_fieldcat.
    clear x_fieldcat.
    l_layout-zebra = 'X'.
    call function 'REUSE_ALV_LIST_DISPLAY'
      exporting
        i_callback_program       = sy-repid
        is_layout                = l_layout
        i_callback_pf_status_set = 'STATUS'
        i_callback_user_command  = 'USER_COMMAND'
        it_fieldcat              = it_fieldcat
       tables
        t_outtab                 = itab
      exceptions
        program_error            = 1
        others                   = 2.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    "using the PF-status enable the SAVE button
    "give some OKCODE to SAVE button and handle it
    "using user_command form
    form status using p_extab type slis_t_extab.
    *- Pf status
      set pf-status 'STATUS'.
    endform.                 " STATUS
    form user_command using r_ucomm     like sy-ucomm
                                   rs_selfield type slis_selfield.
      case r_ucomm.
        when 'BACK' or 'CANC' or 'EXIT'.
          leave to screen 0.
        when 'SAVE'.
         "here you have to find the changed records,and   modify the DB.
      endcase.
    endform.                    "USER_COMMAND
    Regards
    vijay

  • How to load and save custom workspaces in PE7

    I've written a little utility which allows PE7 users to load and save custom workspaces. It's attached to post #1 of this thread.
    System requirements
    The utility has been tested with Windows XP Pro SP3 only. It might or might not run under Vista. It will only work with PE7 installations where the executable files are in the default places.
    Installation
    When you have downloaded the utility (it's only 199KB) you can run it from any convenient place in your system - it doesn't need to be installed as such.
    Usage
    It's pretty self-explanatory in use but here's the manual!
    Run the downloaded utility "PE7WS.exe".
    A file selection dialog appears. Choose the workspace layout file you wish to use. "LastUsed.layout" is the last used workspace (that's all you will be offered the first time you run the program). If you press Cancel at this point, the program will exit and nothing will happen.
    Once you have selected the workspace, click "Open" and Premiere Elements 7 will run, using the workspace layout you chose.
    After you exit from Premiere Elements 7, a workspace layout file save dialog will appear. If you made changes to the workspace during your Premiere Elements 7 session, you can now give the revised workspace a name and save it.
    Do not save the workspace in a different directory from that which the dialog offers!
    If you have changed an existing custom workspace, and you want to update the version previously stored, just select the name and over-write the saved workspace layout with the new one.
    If you don't want to save the workspace at all, just click "Cancel" - next time you run Premiere Elements, you can choose the "LastUsed.layout" workspace to use that last used unsaved workspace in any event.
    If you use the PE7WS utility to run Premiere Elements 7, and then you use the menu option "Window > Restore Workspace", then exit, you can either cancel the workspace saving stage, (which will mean that "LastUsed.layout" will contain that default workspace), or you could give that default workspace a name like "PE7 Default" so you can start a future Premiere Elements 7 session with the default workspace, even though you last used a custom workspace.
    If you run Premiere Elements 7 in the usual way without using PE7WS.exe, the workspace that appears will be the last used one.
    The usual disclaimer...
    The utility should be entirely safe in use, but I can't accept responsibility for any loss or damage it might cause. However, the only file manipulation is does is to workspace files in the directory that Premiere Elements 7 uses purely for the purpose - the utility doesn't go anywhere near your precious project files.

    I'm finding it very handy on my particular twin 22" monitor setup to sometimes use a one-screen layout and sometimes a two screen layout. I 'discovered' that having the timeline on the second monitor enables me to tweak edits there while having the playback full size after pressing the "full screen" button on the first monitor. Where the timeline would normally be I have the history, mixer, and other windows always open. As the second monitor is also used by another PC (the one I have the net and email etc on) using "Maxivista" monitor sharing software, I revert to single screen layout when doing stuff like exporting to DVD so I can see what is going on with the render while typing stuff like this.
    Selectable workspaces are dead handy!

  • User Exit and BDC for ME22N

    Hello All,
    A code has been written in the User exit for Tcode ME22N, Which sets the indicator on PO line item. This has been done by modifying the standard itab POT by using field symbols, because the fields to be modified are shown in display mode in the tcode ME22N and cannot be done in BDC. See the below code in user exit ZXM06U43.
    DATA char(50) VALUE '(SAPLMEPO)POT[]'.
    CLEAR wa_ind.
        FIELD-SYMBOLS <f1> TYPE ANY.
    Move memory of internal table POT to field symbol f1.
        ASSIGN (char) TO <f1>.
    Move content of f1 to internal table i_ind
        i_ind[] = <f1> .
        LOOP AT i_ind INTO wa_ind.
          IF wa_ind-pstyp = '9'.            " Service PO - item category
    IF PO Line item has History per Purchasing Document as 'D'
    Set indicators on, for the line item.
            CLEAR v_cnt.
            SELECT COUNT( * ) INTO v_cnt FROM ent5100
                                         WHERE ebeln = wa_ind-ebeln
                                           AND ebelp = wa_ind-ebelp
                                           AND bewtp = 'D'.
            IF sy-subrc = 0.
              wa_ind-wepos = 'X'.            " Set Goods Receipt Indicator
              wa_ind-webre = 'X'.            " Set GR-based IV Indicator
              wa_ind-lebre = 'X'.            " Set Srv-based IV Indicator
            ELSE.
    *End of addition SAP-20070910104025 - SL36 - D01K963369
              wa_ind-wepos = ' '.            " Clear Goods Receipt Indicator
              wa_ind-webre = ' '.            " Clear GR-based IV Indicator
              wa_ind-lebre = ' '.            " Clear Srv-based IV Indicator
              wa_ind-xersy = ' '.            " Clear ERS Indicator
            ENDIF.                                           
            MODIFY i_ind FROM wa_ind INDEX sy-tabix.
          ENDIF.
        ENDLOOP.
        <f1> = i_ind[].
      ENDIF.          
    ENDIF.
    This code is in production and has been working fine.
    The requirnment is now to make this indicator work for all the Purchase order before this code has been written in the Exit. For this my functional suggests that to write a separate program using BDC for PO change and jus add a period/dot  in the short text and save it. The code has been written, the user exit and the above code is getting triggrred values are updated in internal table correctly.
    However the flags was not set or cleared when seen in the tcode ME22N . This works fine if the tcode me22n is run directly and not working in BDC.
    I have tried with ME22 without enjoy transaction in BDC changing the POT Program to SAPMM06E. It does not work.
    Please help me as why it is not uodating in the table when using BDC.
    Thanks in Advance.
    Senthil Kumar

    Hi All,
    Any luck on this??
    Thanks

  • Idoc creation on production order create and save

    I need to know if there is a way to create an idoc on the change and save of a production order.  We will need to base this on plants (not all plants get an idoc).  Is there any "safe" way to do this automatically?  We previous had a system in place that used the user exit of a production order save but it no longer works. 
    Regards,
    Davis

    It's not an error as such.  The program is doing exactly what it has been told to do.
    If you go to SE38, and look at ZXCO1U06, you'll find that there is a statement "BREAK-POINT".  This is hard-coded way of opening the debugger.
    Your best approach is to find the developer responsible for doing this, and ask them to change it.  If this is happening outside of development system - perhaps in test or production, then perhaps
    a) The programmer needs to be disciplined shot
    b) The development team need to introduce some review procedure of ALL coding, before transport.
    Regards
    matt

  • Read multiple files and save all into one output file(AGAIN)

    Hi, guys
    I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
    public class FileReduction1 extends JFrame implements ActionListener
       // GUI definition and layout
        /* ACTION PERFORMED */
        public void actionPerformed(ActionEvent event) {
            if (event.getActionCommand().equals("Open File")) getFileName();
        /* OPEN THE FILE */
        private void getFileName() {
            // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(true);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
            if (result == JFileChooser.APPROVE_OPTION)
             files = fileChooser.getSelectedFiles();
                textArea.setText("");
                if(files.length>0)
                    filelist="";
                    System.out.println("files length"+files.length);
                    for(int i=0;i<files.length;i++)
                         System.out.println(files.getName());
    filelist+=files[i].getName()+" ,";
    if (checkFileName(files[i]) )
    openButton.setEnabled(true);
    readButton.setEnabled(true);
    textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
    readFile(files[i]);
    textfield.setText(filelist);
    else{JOptionPane.showMessageDialog(this,"Please select file(s)",
                    "Error 5: ",JOptionPane.ERROR_MESSAGE); }
         // Obtain selected file
    /* READ FILE */
    private void readFile(File fileName_in) {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines(fileName_in);
         data = new String[numLines][4];
         // Read file
         readTheFile(fileName_in);
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines(File fileName_in) {
    int counter = 0;
         // Open the file
         openFile(fileName_in);
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile(fileName_in);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile(fileName_in);
         System.exit(1);
    /* READ FILE */
    private void readTheFile(File fileName_in)
    // Open the file
    //int row=0;
    int col=0;
    openFile(fileName_in);
    System.out.println("Read the file");
    // Loop through file incrementing counter
    try
    String line = fileInput.readLine();
    while (line != null)
    boolean containsDoubles = false;
    double temp;
    String[] lineParts = line.split("\t");
    try
    for (col=0;col<lineParts.length;col++)
    temp=Double.parseDouble(lineParts[col]);
    data[row][col] = lineParts[col];
    containsDoubles = true;
    System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
    } catch (Exception e) {row=0; col=0; temp=0.0;}
    if (containsDoubles){ row++;}
    System.out.println();
    line = fileInput.readLine();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
    closeFile(fileName_in);
    System.exit(1);
    //System.out.println("length"+data.length);
    closeFile(fileName_in);
    process(fileName_in);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName(File fileName_in) {
         if (fileName_in.exists()) {
         if (fileName_in.canRead()) {
              if (fileName_in.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* OPEN FILE */
    private void openFile(File fileName_in) {
         try {
         // Open file
         FileReader file = new FileReader(fileName_in);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
         textArea.append("OPEN FILE\n---------\n");
         textArea.append(fileName_in.getPath());
         textArea.append("\n");
         //System.out.println("File opened successfully");
    /* CLOSE FILE */
    private void closeFile(File fileName_in) {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    private void process(File fileName_in) {
    //getNumberOfLines();
         //data = new String[numLines][3];
         // Read file
    double temp,temp1;
         //readTheFile();
    //System.out.println("row:"+row);
    //int number=data.length;
    //System.out.println(number);
    for (int i=0; i<row; i++)
    temp=Double.parseDouble(data[i][1]);
    sumx+=temp;
    temp1=Double.parseDouble(data[i][3]);
    sumy+=temp1;
    multixy+=(temp*temp1);
    square_x_sum+=(temp*temp);
    square_y_sum+=(temp1*temp1);
    //System.out.println("Sum(x)="+sumx);
    double tempup=(row*multixy)-(sumx*sumy);
    double tempdown=(row*square_x_sum)-(sumx*sumx);
    slope=tempup/tempdown;
    double tempbup=sumy-(slope*sumx);
    intb=tempbup/row;
    double tempside=(row*square_y_sum)-(sumy*sumy);
    double cordown=Math.sqrt(tempdown*tempside);
    corr=tempup/cordown;
    r_sqrt=corr*corr;
         textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
         textArea.append("\n");
         textArea.append("Please enter output file name including extension.");
    System.out.println("number"+row);
    System.out.println("slope(m)="+slope);
    System.out.println("intecept b="+intb);
    System.out.println("correlation="+corr);
    System.out.println("correlation="+r_sqrt);
    saveFile();
    private void saveFile()
    textArea.append("SAVE FILE\n---------\n");
    if (openFile1())
         try {
              outputToFile();
    catch (IOException ioException) {
              JOptionPane.showMessageDialog(this,"Error Writing to File",
                   "Error",JOptionPane.ERROR_MESSAGE);
    private boolean openFile1 ()
         // search for the file path
    StringBuffer stringpath;
    title=textfield1.getText().trim();
    int temp=fileName_in.getName().length();
    int temp_path=fileName_in.getPath().length();
    int startd=(temp_path-temp);
    stringpath=new StringBuffer(fileName_in.getPath());
    stringpath.delete(startd, temp_path+1);
    //System.out.println("file-path="+temp_path);
    //System.out.println("length-file="+temp);
    path=stringpath.toString();
    fileName_out = new File(path, title);
    //System.out.println(file_out.getName());
    if (fileName_out==null || fileName_out.getName().equals(""))
         JOptionPane.showMessageDialog(this,"Invalid File name",
                   "Invalid File name",JOptionPane.ERROR_MESSAGE);
         return(false);
         else
    try
    boolean created = fileName_out.createNewFile();
    if(created)
    fileOutput = new PrintWriter(new FileWriter(fileName_out));
    fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
    return(true);
    else
    fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
    return(true);
    catch (IOException exc)
    JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
    return(false);
    private void outputToFile() throws IOException
    // Initial output
         textArea.append("File name = " + fileName_out + "\n");
         // Test if data exists
         if (data != null)
         fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
    textArea.append("File output complete\n\n");
         else
    textArea.append("No data\n\n");
         // End by closing file
    initialcomp();
         fileOutput.close();
    private void initialcomp()
    slope=0.0;
    intb=0.0;
    corr=0.0;
    r_sqrt=0.0;
    sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
    for(int i=0;i<data.length;i++)
    for(int j=0;j<data[i].length;j++)
    data[i][j]=null;
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Sorry about the long lines.
    As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
    When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
    Does anybody have an idea to solve this?
    Thanks a lot!!

    you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
    your code is doing too much..and hard to follows..
    1. get the selected files
    for each selected file
    process the file and return the result
    write out the result.
    /** close the precious resource */
    public void closeResource(Reader in){
        if (in != null){
            try{ in.close(); }
            catch (Exception e){}
    /** get the total number of line in a file */
    public int getLineCount(File file) throws IOException{
        BufferedReader in = null;
        int lineCount = 0;
        try{
            in = new BufferedReader(new FileReader(file));
            while ((in.readLine() != null)
                lineCount++;
            return lineCount;
        finally{ closeResource (in);  }
    /** read the file */
    public void processFile(File inFile, File outFile) throws IOException{
        BufferedReader in = null;
        StringBuffer result = new StringBuffer();
        try{
            in = new BufferedReader(new FileReader(inFile));
            String line = null;
            while ((in.readLine() != null){
                .. do something with the line
                result.append(....);
            writeToFile(outFile, result.toString());
        finally{ closeResource (in);  }
    public void writeToFile(File outFile, String result) throws IOException{
        PrintWriter out = null;
        try{
            out = new PrintWriter(new FileWriter(outFile, true));  // true for appending to the end of the file
            out.println(result);
        finally{  if (out != null){ try{ out.close(); } catch (Exception e){} }  }
    }

  • There is a problem with Adobe Acrobat/Reader. If it is running, please exit and try again. (4:4)

    Trying to open a streamed PDF in an IFRAME in Internet Explorer 9 on my Win7 64bit machine.
    This results in the following dialog:
    There is a problem with Adobe Acrobat/Reader. If it is running, please exit and try again. (4:4)
    The PDF is streamed (not read from disc) from a servlet in our Java WebSphere environment and the call looks like this:
    https://intranetserver.com/myapplication/OpenDocumentServlet.pdf?documentToOpenID=1
    The Servlet sets content-type header application/pdf and content-length and writes the bytes to the buffer.
    Does the error dialog even come from Acrobat? When the dialog opens there is no active AcrReader process visible in task manager.
    Please advise!
    Meddelandet redigerades av: p b
    Solved. Our IT dept. responsible for packaging and deployment repacked and redeployed 11.0.9. Unknown what changes were made to make it work.

    I don't know what acrofix.exe is; can you explain?
    Issue
    Nothing happens when you launch Acrobat 30 days after installing a CS6 suite.
    Solutions
    Important: Perform the solutions below in order. Do not continue further if an earlier solution resolves the problem.
    Solution1: Install the patch for Acrobat installed as part of a CS6 (Windows Only)
    1.   Log in to your Windows computer as an Administrator.
    2.   Click the following link to download the patch file:
    Acrofix.zip
    3.   When prompted "Do you want to open or save this file?,” click Open.
    4.   Extract the file. The location varies depending on your operating system and the utility.
    5.   Double-click the extracted Acrofix.exe to begin the execution.
    6.   If the execution is successful, Command Prompt closes automatically.
    7.   When the execution is complete, launch Acrobat.
    or
    Solution2: Install the patch for Acrobat installed as part of a CS6 using Command Prompt (Windows Only)
    1. Run the Command Prompt as an Administrator.
    2. Navigate to the location of the extracted hot fix in Solution 1 (Step 4).
    3. Type Acrofix.exe to execute it.
    4. If the execution is successful, Command Prompt shows Exit Code:0
    5. When the execution is complete, launch Acrobat.
    Solution 3: Reactivate Acrobat through another Suite product
    I will try your cleaner, thanks
    [private data removed]

  • Error at the time of Release and Save the WBS

    Dear All,
          When i am going to release and save the project the below error has occurred.
    Error-Release not allowed as budget is not allocated to the project. Project will be exited and data changes will not be saved!
    But, i have budgeted the WBS and release the budget.
    Kindly suggest.
    Thanks,
    Asutosh

    Hello ,
    System status will allow you to release project. You are getting this due to user status.
    Your user status say initially 1 needs to change to say 2 so that you can release your project.
    This user status is defined in customization and assigned to your project profile.
    Regards
    Keshav

  • Export table rows to Excel and save to BLOB field

    Hi all,
    I try to find out how export data from table to Excel file format and save the result to BLOB field in some other table.
    I know how to download report from Page by submit, but I need to process data and instead of returning result to user as Excel file - save it in BLOB.
    Also I found implementation on JAVA for the issue but actually I wanna study out - Is it possible to resolve this issue by PL/SQL and APEX API methods?
    So, any ideas :) ??
    Thanks,

    It is not very difficult.
    Here is the function I use to get a CSV file from a query :
    PROCEDURE get_query_result_as_csv_file(
         in_query    IN VARCHAR2,
         in_filename IN VARCHAR2)
    IS
         l_blob BLOB;
         l_raw     RAW(32767);
         l_cursor INTEGER;
         l_cursor_status INTEGER;
         l_col_count      NUMBER;
         l_col_val VARCHAR2(32767);
         l_desc_tbl sys.dbms_sql.desc_tab2;
    BEGIN
         -- create temporary BLOB
         dbms_lob.createtemporary(l_blob, FALSE);
         -- open BLOB
         dbms_lob.open(l_blob, dbms_lob.lob_readwrite);
         -- open cursor (and get cursor id)
         l_cursor := dbms_sql.open_cursor;
         -- parse query
         dbms_sql.parse(l_cursor,  in_query, dbms_sql.native);
         -- get number of columns and description
         dbms_sql.describe_columns2(l_cursor, l_col_count, l_desc_tbl);
         -- define report columns
         FOR i IN 1 .. l_col_count LOOP
              dbms_sql.define_column(l_cursor, i, l_col_val, 32767);
         END LOOP;
         -- write column headings to CSV file
         FOR i IN 1 .. l_col_count LOOP
              l_col_val := l_desc_tbl(i).col_name;
              IF i = l_col_count THEN
                   l_col_val := '"' || l_col_val || '"' || chr(10);
              ELSE
                   l_col_val := '"' || l_col_val || '",';
              END IF;
              l_raw := utl_raw.cast_to_raw(l_col_val);
              dbms_lob.writeappend(l_blob, utl_raw.length(l_raw), l_raw);
         END LOOP;
         -- execute the query
         l_cursor_status := dbms_sql.execute(l_cursor);
         -- write result set to CSV file
         LOOP
              EXIT WHEN dbms_sql.fetch_rows(l_cursor) <= 0 OR dbms_sql.last_row_count > 1000;
              FOR i IN 1 .. l_col_count LOOP
                   dbms_sql.column_value(l_cursor, i, l_col_val);
                   IF i = l_col_count THEN
                        l_col_val := '"' || l_col_val || '"' || chr(10);
                   ELSE
                        l_col_val := '"' || l_col_val || '",';
                   END IF;
                   l_raw := utl_raw.cast_to_raw(l_col_val);
                   dbms_lob.writeappend(l_blob, utl_raw.length(l_raw), l_raw);
              END LOOP;
         END LOOP;
         -- close cursor and BLOB
         dbms_sql.close_cursor(l_cursor);
         dbms_lob.close(l_blob);
         -- set http headers
         owa_util.mime_header('application/octet', FALSE);
         htp.p('content-length: ' || dbms_lob.getlength(l_blob));
         htp.p('content-disposition: attachment;filename="' || in_filename || '.csv"');
         owa_util.http_header_close;
         -- download the file
         wpg_docload.download_file(l_blob);
    END;If you need to get the query dynamically from your report, you can try to get the source from the apex_application_page_regions table :
    SELECT region_source
    FROM apex_application_page_regions
    WHERE application_id = 111 -- replace with your application id
    AND static_id = 'static_id_of_your_report'Then instead of using wpg_docload.download_file, simply insert the BLOB into your table.
    Good luck.
    Yann.

Maybe you are looking for

  • LOCKS checking user locked and SQL that he is executing

    Hello all, I have this script that inserts into a table the user causing the lock and the users waiting for the lock to be released. What I would like to add into this the script is the SQL string that the user causing the lock and the users waiting

  • Teradata SQL multiple statements (not multistmt) in Knowledge Module Step??

    In a Knowledge Module Step using Teradata Technology, I have the following statements statement 1 ; statement 2 ; statement 3 ; Since the semicolons are at the end of each statement, I expect that these statements will be executed in sequential order

  • Error when starting Power shell on Windows 2112 r2

    Using Windows 2012 r2 and trying to start Power Shell and it  keeps shutting down with will advise once we find a solution to error. In the event log I get two errors.  How can I fix this error? Thanks Event error #1 - System   - Provider    [ Name] 

  • Iphoto update has moved my photos in their frame.

    Last year i submitted a book from iphoto and all was well, this year i re-submitted the same book without any changes but the photos have now moved in the book meaning heads are being cut off ect. Why?

  • 24-hour clock

    Ever since I was in the army, of all the bad habits I picked up, the one that lingers is my personal preference for the time to be in 24 hour format. IE, it is not 1:49 PM where I am right now, it is 13h49. I have always customised my computers to di