Save data and report in subfolder

Hi,
I spend one day  trying to solve this "stupid" thing  but now I raise my white flag.
Hope someone could show me the way.
In my script I want to organize the output result in such a way to have:
tdm files in "testdata" folder
pdf + xls in "testdata"\"document" folder
I'm able to create the testdata folder, but no idea how to create the subfolder.
The testdata folder should be a variable because it change test by test.
I've highlighted the error in my script.
dim myfold
myfold = inputbox("Inserire nome della prova", "diadem", DataSetName)
call foldercreate(DataReadPath & myfold)
call foldercreate(DataReadPath & myfold\"documents")
rem 'Save elaborated data
rem If (FileNameGet ("NAVIGATOR", "FileWrite", DataReadPath & DataSetName & myfold & "." & DataExtension) = "IDOk") Then
rem Else 'Dialog was canceled
  rem Call MsgBoxDisp ("Data saving was canceled")
rem End If
Bye
Solved!
Go to Solution.

Giova
You were very close to have it work.  Just some syntax issues.
The lines below will make the documents directory under /testdata/
dim myfold
myfold = inputbox("Inserire nome della prova", "diadem", DataSetName)
callfoldercreate(DataReadPath & myfold)
callfoldercreate(DataReadPath & myfold&"\documents")
You mentioned that PDF and Excel were the next files to create. I have done both.
Here is some helpful PDF making code for report output.
dim ofso
Set ofso = CreateObject("Scripting.FileSystemObject")
'ReportPrintTransparency = 1 ' needed to display transparency colors
REPORTPrintAsGraphic = 0' needed to display transparency colors
PDFResolution = "600 DPI"
PDFOptimization = true
iffilex(gsPDFFileFullPath) then
ofso.DeleteFile(gsPDFFileFullPath)
endif
CallPicPDFExport(gsPDFFileFullPath)
Paul

Similar Messages

  • Problem with Save data with report

    Post Author: ramprosoft
    CA Forum: General
    Hi,
    I am new to CR and using Crystal Reports XI with SQL Server 2000.
    I'm not able to remove the saved data in a report. I have played around different options, but unfortunately I'm not able to remove the data. I have checked variouse places in web above this issue not able to find a solution, so decided to open a new post. The problem is :
    I have created a simple report and saved with-out data (1st version) the file size was 16KB. After few changes I have saved the same report with Data, the file size become 1065 KB. Its perfect and I can view the report in Report Viewer. Great Stuff!. Now the Testing completed, I would like to move this report to production environment, I notice that I'm unable to remove the data. I have played around various tricks like below, but it didnt work well.
    Trick 1:
    Uncheck: File->Options->Reporting (tab)->Save Data With Report.
    Check: File -> Options -> Reporting (tab)->Discard Saved data on Open,
    Uncheck: file-> Report Options -> Save Data With Report.
    File -> Save Data with Report (Not selected)
    Opened the report and try "save" and also tried "save as", still the size is 1065.
    Trick 2:
    I enabled all "Save Data with report" feature. Deleted all the rows in the table related to the query, previewed the report and Saved the report with "Save Data with report" featuer. But now, the funny part happen, the file size increased to 1070kb, instead of reducing. Worst Stuff!!!
    Trick 3:
    Updated the latest version of Patch and tried above tricks, still i'm not able to remove the data.
    Appreciate, if you could help me to fix the problem.
    thanks in advance

    Post Author: salmanq
    CA Forum: General
    Hi, This
    post is very informative, however I would like some specific information. If
    someone can help me then please send me a private message. Best Regards,
    Wholesale Pages UK Dropshippers
    | Wholesale Suppliers
    Australia Wholesalers and
    Dropshippers | Dubai Property and Real Estate

  • Save Data with Reports

    Hi Friends,
    The Report Option has Save Data with Reports.
    What is Merit and Demerit of having this option on?
    Thanks and regards

    If you select the report option save data with report - i think it will save the report along with the data retrieved at that particular time.
    When open the report again it will show that data. The crystal reports will not search for new data, If click refresh then it will try to get the updated data. If you save the report with data, if publish the report in Infoview- open the report it will display the data without going for the dynamic data. If you schedule it then it will get the latest data from db server.
    You can view the data in crystal  reports viewer if you save the data along with the report.
    sorry for my english!!
    Regards,
    Parsa.

  • No "save data with report"

    Hi
          I have a report with prompts... I saved the report with "_save data with report_". If i didnt do the "save data with report" ,every time I run the report ,its asking for selecting  Prompts.
    My question is
          when i run the report , It should not ask for prompts and I need to fetch the latest data from the database but not the saved data .
    Plz get me out of this situation.
    Thank u 

    Hi Dans,
    Purpose of parameters:
    The purpose of creating prompts in the report is to filter  the data as per user's requirement.Whenever you refresh the report it is going to ask for the parameter values as the crystal engine will fire the required query on the database and include the parameter values in the 'where' clause of this query.In the absence of filters report fetches all the records in the databse which can significantly impact the performance of this report.
    Minimum requirement for getting refreshed data:
    In order to fetch the refreshed data (and not the saved one) the query needs to be complete before executing and thus the where clause condition needs to be complete as well.
    To solve your issue:
    In your case,if you want to avoid being prompted then you may hard code the desired filters in the record selection formula(Report>>Selection formuls>>Record) say as in Order_id not in (,,,,,,,) and order_date>'' etc
    Limitations:
    However after hard coding the values you may loose the flexibility of choosing the filter values at runtime.
    If you have any further queries please keep this thread updated.
    Thanks

  • How to save Forms and Reports in Database ?

    How to save Forms and Reports in Database
    and
    Run from DataBase ?

    Saving forms in the database is no longer supported I am afraid. We only support the fmx file based format now.

  • How to Extract data and reports from the SAP BW warehouse

    Hi to All Guru's
    I am new to SAP BW. Can any one help me to know, How to Extract data and reports from SAP BW. Do we use any tools.  After Extracting the data from SAP BW how can we move all the data to Cognos.  It would be kind enough to provide me with any documentation or links.  Step by step procedure would be very much helpfull to me.
    Thanks
    Venu

    Hi Voodi
    Thanks for the quick response. I think Open hub is to extract the data from SAP BW, but what about sending this data into Cognos.  Can you please let me know in detail regarding answer. If possible send me any documentation or links regarding this.  Thanks for your concern.
    Venu

  • Dynamic pdf up to 200 images, the size of pdf is larger, cannot save data and images to the form

    Hi all,
    My client would like to dynamic images up to 200 pictures to my forms. It is working fine. However, when I add images up to 35 images. I could not add images to the form any more. Then, I save data on the form. All images and data typed on the form are disappeared. I don't know reason.
    If I only add 10 images - I can save data and images on the form. The size of pdf is 15456 kb.  I was unable to  add more pictures or data on the form.
    Maybe there are problem the size of pdf? How much size can an dynamic pdf  limited?
    Can we save the information and images as much as we want?
    I have spent 2 weeks to work and try to figure out this problem. However it is not successful.
    Please help,
    Cindy

    You should ensure, that your users do not import big images.
    Therefore you can use a script on the change event of an image field which checks the data size and warns the user if the file is too big.
    function formatNumber(number) {
        var num = number + '',
        x = num.split('.'),
        x1 = x[0],
        x2 = x.length > 1 ? '.' + x[1] : '',
        rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1)) {
            x1 = x1.replace(rgx, '$1' + ',' + '$2');
        return x1 + x2 + "KB";
    var sizeLimit = 200, //allow upto 200KB images
      thisSize = Math.round((this.value.oneOfChild.value.length * 3 / 4) / 1024);
    if (sizeLimit > 0) {
      if (thisSize > sizeLimit) {
      xfa.host.messageBox("Note: With " + formatNumber(thisSize) + " the size of the imported image is greater that the recommended maximum of " + formatNumber(sizeLimit) + ".\nLarge images can cause a insufficent performance.\n\nIf possible, use images with the following recommended specs:\nFormat:\t\tPNG or JPG\nColor depth:\t8 Bit (higher is not supported)\nColor space:\tRGB (CMYK is not supported)\nFile Size:\t\t" + formatNumber(sizeLimit), "Recommended image size exceeded", 3, 0);

  • Report Completion date and Report start date in BI Publisher

    Guys
    We have a requirement to get the Report Completion date and start date without Scheduling the report. Can any one give me an idea to get in the BIP Reports
    Regards

    What is the requirement ?
    When the user run report from BIP EE, you want to display how long the report run ?
    or
    Where you want to display these info >?
    If you expecting these info, on click of viewbutton then i dont think it is possible, unless you write the query to fetch the time and in the template processing, subtract that from the current sys-time to get the time it took to run.
    if you can schedule then
    Simplest would be is , taking these info from the tables, directly for the report you are running.
    or
    use Public WS provided by BIP to get the report info
    but in order to get these, first of all the reports should be run in scheduled mode.
    if you don't want the report to be scheduled then, i don't think, you can get these kind of report completion status info.
    otherwise , you can run the query by yourself to get the data and the time it took to complete from database and do some sort of custom calculation by urself

  • Save Data in Report to Use later

    I have several names to report I need to combine data from several records of the same type with different codes. Not all names have the same codes. I want to report the data on one line. Is there a way to save date to be used later in the report?
    For Example:
    Name              Code   Start Date        Code Transfer Date  Code              Promote Date          
    Sue
    SD
    01/15/2000
    TD
    01/15/2005
    Mitch
    SD
    01/15/2004
    Sam
    SD
    01/15/2003
    PD
    01/15/2006

    Using the three records above I want the report to print (I'm using the Name Group Footer):
    Name
    Start Date
    Transfer Date
    Promote Date
    Sue
    01/15/2000
    01/15/2005
    Mitch
    01/15/2004
    Sam
    01/15/2003
    01/15/2006

  • Save data and tcp connection

    Hi,
    I have a connection between a measurement roboter and LabVIEW. I transmit the data above an TCP connection (for example the coordinate plane of the sensor). I have different ports to transmit the data. Is it possible to save the transmitted data and the TCP number of the Port?
    Attachments:
    datasend.vi ‏20 KB

    Hi,
    Just use the:
    >
    Regards, Christian

  • Webdynpro application - save data and attachments

    Hello,
    I would like to know what is the best recommended practice / best apps methodology for the following scenario :
    A Custom web form with options to enter data, add attachments  and submit. On submission , the workflow gets triggered, followed by approvals and finally data update into the relevant transaction.
    My query :
      -  >  For saving the form data and attachments , the options which I am aware are :  tables, case management, into the transaction using GOS.
    Any more to add to this list would be really good.
    In such scenario , what are the best possible way to be used ?
    Would be good to hear your thoughts on this.
    Thanks alot
    Saujanya

    Hi
    Thanks for the update.
    Good to know the different ways to do it.
    Not sure if this fits in workflow forum too. as the question is primarily  around the  data handling and storage of attachments and documents.
    Hence I close this thread in this forum, And created the thread in 'Workflow forum ' to get to know the response.
    New Thread : Webforms - data handling and storage
    Please update your thoughts in the new thread. Appreciate your time and effort.
    Thanks alot.
    Best Regards
    Saujanya
    Edited by: Saujanya on Nov 17, 2011 12:20 PM

  • Bank account dates and reporting

    Hi,
    Is there any feature in SAP, that allows creation of a house bank account with an activation date, de-activation date and deactivation feature?
    Thanks!

    Hello Andrew,
    I am not only looking from FI12 screen but from a possibility of InHouse Cash and Bank Communication module.
    That's said, the business requirement is to monitor and track the bank accounts. This will give them a good hold of old accounts, new accounts, closed accounts.
    And as per business, when a bank account is closed the account is marked as de-activated. When a forward contract is still existing against the bank account, they would need to activate the account.
    Thanks,
    Sivaram

  • How to save data and load data from an arrayList ??

    i got a run time problem .....when i try to save my data to a file and load a data from a file....i got some kind of error like that
    Please enter your CD`s title : ivan
    Please enter your CD`s Artist/GroupName : diw
    Please enter your CD`s year of release : wid
    InputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) java.util.InputMismatchException
    Invaild value....Please enter the value between 1000 & 9999
    Please enter your CD`s MusicGenre(e.g.: Jazz, Blues, Funk, Classical, Rock, etc...) : w
    Please enter your CD`s comment : w
    Do you have another Cd ? (Y/N) : n
    Saving to file
    java.io.EOFException
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         at Demo.loadDate(Demo.java:49)
         at Demo.readDataFromConsole(Demo.java:103)
         at Demo.main(Demo.java:173)
    Exit code: 0
    import java.util.ArrayList;
    import java.io.*;
    public class Demo{
         readOperation theRo = new readOperation();
         errorCheckingOperation theEco = new errorCheckingOperation();
         ArrayList<MusicCd> MusicCdList;
         public Demo()
         private void heading()
              System.out.println("\tTesting read data from console, save to file, reopen that file\t");
         private void saveDate()
              MusicCdList = new ArrayList<MusicCd>( ); 
              try
                   File f = new File("jessica.txt");
                   FileOutputStream fos = new FileOutputStream(f);
                   ObjectOutputStream oos = new ObjectOutputStream(fos);
                   for( MusicCd s : MusicCdList)
                   oos.writeObject(s);
                   oos.close();
              catch (IOException ioe)
                   ioe.printStackTrace();
         private void loadDate()
              MusicCdList = new ArrayList<MusicCd>( );  
              try
                   File g = new File("jessica.txt");
                   FileInputStream fis = new FileInputStream(g);
                   ObjectInputStream ois = new ObjectInputStream(fis);
                   ArrayList<String> stuff = (ArrayList<String>)ois.readObject();
                   for( String s : stuff ) System.out.println(s);
                   ois.close();
              } catch (Exception ioe)
                   ioe.printStackTrace();
         private void readDataFromConsole()
         //private void insertCd()
           ArrayList<MusicCd> MusicCdList = new ArrayList<MusicCd>( ); 
            readOperation theRo = new readOperation();
            errorCheckingOperation theEco = new errorCheckingOperation();
            MusicCd theCd;
            String muiseCdsTitle;
            String muiseCdsArtistOrGroupName;
            int muiseCdsYearOfRelease;
            int validMuiseCdsYearOfRelease;
            String muiseCdsMusicGenre;
            String muiseCdsAComment;
              while(true)
                    String continueInsertCd = "Y";
                   do
                        muiseCdsTitle = theRo.readString("Please enter your CD`s title : ");
                        muiseCdsArtistOrGroupName = theRo.readString("Please enter your CD`s Artist/GroupName : ");
                        muiseCdsYearOfRelease = theRo.readInt("Please enter your CD`s year of release : ");
                        validMuiseCdsYearOfRelease = theEco.errorCheckingInteger(muiseCdsYearOfRelease, 1000, 9999);
                        muiseCdsMusicGenre = theRo.readString("Please enter your CD`s MusicGenre(e.g.: Jazz, Blues, Funk, Classical, Rock, etc...) : ");
                        muiseCdsAComment  = theRo.readString("Please enter your CD`s comment : ");
                        MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsArtistOrGroupName, validMuiseCdsYearOfRelease ,
                        muiseCdsMusicGenre, muiseCdsAComment));
                        MusicCdList.trimToSize();
                        //saveToFile(MusicCdList);
                        continueInsertCd = theRo.readString("Do you have another Cd ? (Y/N) : ");
                   }while(continueInsertCd.equals("Y") || continueInsertCd.equals("y") );
                   if(continueInsertCd.equals("N") || continueInsertCd.equals("n"));
                                        System.out.println("Saving to file ");
                                                    //MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsYearOfRelease));     
                                                    saveDate();
                                        loadDate();
                                  break;
         public static void main(String[] args)
              Demo one = new Demo();
              one.readDataFromConsole();
              how should i fix it if i want to reach the save to a file and load from a file purpose??
    thx all
    for much more understand of this program
    import java.io.Serializable;
    public class MusicCd implements Serializable
         private String musicCdsTitle;
         private String artistOrGroupName;
            private int yearOfRelease;
         private String musicGenre;
         private String aComment;
         public MusicCd()
              musicCdsTitle = "";
              artistOrGroupName = "";
              yearOfRelease = 1000;
              musicGenre = "";
              aComment = "";
         public MusicCd(String newMusicCdsTitle, String newArtistOrGroupName, int newYearOfRelease,
         String newMusicGenre, String aNewComment)
              musicCdsTitle = newMusicCdsTitle;
              artistOrGroupName = newArtistOrGroupName;
              yearOfRelease = newYearOfRelease;
              musicGenre = newMusicGenre;
              aComment = aNewComment;
         public String getTitle()
              return musicCdsTitle;
         public String getArtistOrGroupName()
              return artistOrGroupName;
         public int getYearOfRelease()
              return yearOfRelease;
         public String getMusicGenre()
              return musicGenre;
         public String getAComment()
              return aComment;
         public void setTitle(String newMusicCdsTitle)
              musicCdsTitle = newMusicCdsTitle;
         public void setArtistOrGroupName(String newArtistOrGroupName)
              artistOrGroupName = newArtistOrGroupName;
         public void setYearOfRelease(int newYearOfRelease)
              yearOfRelease = newYearOfRelease;
         public void setMusicGenre(String newMusicGenre)
              musicGenre = newMusicGenre;
         public void setAComment(String aNewComment)
               aComment = aNewComment;
         public boolean equalsName(MusicCd otherCd)
              if(otherCd == null)
                   return false;
              else
                   return (musicCdsTitle.equals(otherCd.musicCdsTitle));
         public String toString()
              return("Title: " + musicCdsTitle + "\t"
              + "Artist/GroupName: " + artistOrGroupName + "\t"
              + "Year of release: " + yearOfRelease + "\t"
              + "Music Genre: " + musicGenre + "\t"
              + "Comment: " + aComment + "\t" );
    }import java.util.*;
    public class readOperation{
         public String readString(String userInstruction)
              String aString = null;
              try
         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aString = scan.nextLine();
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aString;
         public char readTheFirstChar(String userInstruction)
              char aChar = ' ';
              String strSelection = null;
              try
                   //char charSelection;
         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   strSelection = scan.next();
                   aChar = strSelection.charAt(0);
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aChar;
         public int readInt(String userInstruction) {
              int aInt = 0;
              try {
                   Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aInt = scan.nextInt();
              } catch (InputMismatchException e) {
                   System.out.println("\nInputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) " + e);
              } catch (NoSuchElementException e) {
                   System.out.println("\nNoSuchElementException error occurred (input is exhausted)" + e);
              } catch (IllegalStateException e) {
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aInt;
    import java.util.Scanner;
    import java.util.InputMismatchException;
    import java.util.NoSuchElementException;
    public class errorCheckingOperation
         public int errorCheckingInteger(int checkThing, int lowerBound, int upperBound)
               int aInt = checkThing;
               try
                    while((checkThing < lowerBound ) || (checkThing > upperBound) )
                         throw new Exception("Invaild value....Please enter the value between  " +  lowerBound + " & " +  upperBound );
               catch (Exception e)
                 String message = e.getMessage();
                 System.out.println(message);
               return aInt;
           public int errorCheckingSelectionValue(String userInstruction)
                int validSelectionValue = 0;
                try
                     int selectionValue;
                     Scanner scan = new Scanner(System.in);
                     System.out.print(userInstruction);
                     selectionValue = scan.nextInt();
                     validSelectionValue = errorCheckingInteger(selectionValue , 1, 5);
               catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return validSelectionValue;
    }Message was edited by:
    Ivan1238
    Message was edited by:
    Ivan1238

    You should thoroughly check you code. It's full of problems.
    For example in saveDate():
    You create a new empty ArrayList and then want so save it's contents. I guess, the file size is always 0.
    For example in loadDate():
    Since you read from an empty file you get an EOFException. This is ok and you should catch and treat the exception properly.
    You try to read the ArrayList instead of single MusicCd objects, although in saveDate you saved the single MusicCD objects. You can only read from the file what to saved in it before.
    I suggest to write the size of the ArrayList as first object in the file. Then you know how much you can expect to read when loading from the file.
    private void saveDate()
              try
                   File f = new File("jessica.txt");
                   FileOutputStream fos = new FileOutputStream(f);
                   ObjectOutputStream oos = new ObjectOutputStream(fos);
                            oos.writeObject(new Integer(MusicCdList.size()));
                   for( MusicCd s : MusicCdList)
                   oos.writeObject(s);
                   oos.close();
              catch (IOException ioe)
                   ioe.printStackTrace();
         }

  • In table maintance to save date and time.

    Hi,
    I am trying to write a code in table maintenance for updating date, time and user id.
    I have created a z include and written a below code which i got from help document. Thid code i have implemented in maintenance event 01. When i checked the code system is showing declare total. Where shall i declare this. Is this code is correct.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    Please any one suggest on this.
    Thanks in advance,
    Ravi

    Hi Ravi,
    Can you go to SE80 and check the function group you have provided while creating the table maintainance generator.
    See at the top include what the name SAP has generated for the  internal table .
    I think if you get the name of the internal table name you can do the manipulation.

  • Changing classifications of material master data and reporting

    Hello experts,
    I have to update long list of material's classifications, I know about the transaction CL24N but in this
    one, I have to assign a material to the class and then for each material update the value of the wanted
    parameter.
    My questions are :
    1. Is there any better way to do this massive update ?
    2. Is there any standart report on classifications values for all materials ?
    Kind Regards,
    Amit Berku

    Hi Amit,
    You can look for the Report RCCLBI03 (this Report loads the File). This is the fastest way to load classifications.
    You can also use BAPI  'BAPI_OBJCL_CREATE' or write a batch input program, but my advice would be go to for Standard Report if this does not solve your problem then use BAPI and the third option would be to use Batch Input program.
    Hope this helps you!
    Reetesh

Maybe you are looking for