Programmatically read .rpt file, datasource and write it to word using ..

I am using Crystal Reports 2008. The default editable rtf export format is tab based, really not useful for table formatted data.
I would like to read rpt file along with data (e.g. saved xml source data) and write it to ms word format using com objects. Is this possible? If yes and supporting tutorial  or information.
2nd: Is there any available ready software/tool to a true word format conversion?
Thanks in advance.

I would like to read rpt file along with data (e.g. saved xml source data) and write it to ms word format using com objects. Is this possible? If yes and supporting tutorial or information.
- Export to XML(?)
Sample; vbnet_win_export.zip at [this|http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples] link.
Developer Help files:
https://boc.sdn.sap.com/developer/library
[Crystal Reports for Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
Above will apply to your version of CR and .NET also.
Is there any available ready software/tool to a true word format conversion?
- Not from SAP. Perhaps some 3rd party software(?).
Oh, and the wiki [Available Export Formats, Crystal Reports 9.1 to Crystal Reports 2008|http://wiki.sdn.sap.com/wiki/display/BOBJ/AvailableExportFormats%2CCrystalReports9.1toCrystalReports+2008] may be good to have also.
- Ludek

Similar Messages

  • Read data from Excel and write into oracle database

    Hi
    I want  to know how can i read data from excel and write into oracle database using java.Kindly help me out to find a solution.
    Thanks and Regards
    Neeta

    Hai,
    I am suggesting the solution.
    I will try out and let u know soon.
    Make a coma separated file from your excel file.
    Assuming that your requirement allows to make a csv file.
    This file may be passed as an file object to be read by java.Using JDBC you must be able to populate the data base.You can also use String Tokenizer if needed.
    You do not want to  go via sql Loader?
    For reading the excel file itself do you want java?

  • Need to read text file content and have to display it in multiline text box

    dear all,
    Need to read text file content and have to display it in multiline text box.
    actually im new to file handling. i have tried up to get_line and put_line.
    in_file := TEXT_IO.FOPEN ('D:\SAMPLE.txt', 'r');
    TEXT_IO.GET_LINE (in_file,linebuf);
    i dont know how to assign this get_line function to text item
    pls help me in this regards,

    Simply write:
    in_file := TEXT_IO.FOPEN ('D:\SAMPLE.txt', 'r');
    TEXT_IO.GET_LINE (in_file,linebuf);
    :block2.t1 := chr(10)||:block2.t1||chr(10)||linebuf;
    chr(10) --> is for new line character

  • Read Xml, Manipulate it and write it

    I need a simple Example of reading XML, manipulate it and write it out.

    I need a simple Example of reading XML, manipulate it and write it out.

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • Reading text file, Replace string, Write to new file....

    I'm kind a lost of on this problem. Using the BufferedReader class and BufferedWriter class, develop an application that reads lines of text from a file. Replace any occurrence of the word *?the?* with *?JAVAJAVA?* and change all characters to upper case before writing each line to a different text file named outfile.txt. Finally, have your application use the appropriate method on the File class to return the absolute path of the outfile.txt file and output the path to the screen.
    * Created December 10, 2008
    * @author Fausto Rivera
    * Colorado Technical University - Online Campus
    * IT271-0804B-02 Intermediate Object Oriented Programming II
    * Phase 2 IP
    * Instructor: Cheryl B Frederick
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class FRiveraReader {
          public static void main(String[] args) {
          // instantiated a new application object to initialize the application
          FRiveraReader application = new FRiveraReader();}
    //      application.getReadfr();  // call to openFile method
    //      application.doWritefr(); // call to readRecords method
    //      application.closeFile();  // call to closeFile method
    public FRiveraReader(){}
      public void getReadfr (String friveraInfile, String fr []){
       int i;
       File fileName = makeAbsoluteFilename(friveraInfile);
       try{
        BufferedReader reader = new BufferedReader(new FileReader(fileName));
        String line = reader.readLine();
         i=0;
          while (line != null) {
           fr[i] =line;
           line = reader.readLine();
        i++;
      reader.close();
    catch(IOException e) {
    System.out.println("Error with reading file:" + friveraInfile);
    }//end of getOrder method
    public void doWritefr(String friveraOutfile, String fw[]){//String name of file, String array to be written
    int i;
    File fileNameout = makeAbsoluteFilename(friveraOutfile);
    try {
    BufferedWriter writer = new BufferedWriter(new FileWriter (fileNameout));
      i=0;
      while (fw[i] != null) {
       writer.write(fw[i] + "%n"); //need delimiters between data in file;also, reader reads a line
       i++;
      writer.close();
    catch(FileNotFoundException e) {
    System.out.println("File not found");
    catch(IOException e) {
    System.out.println("Error with reading file:" + friveraOutfile);
    }//end of getOrder method
    private File makeAbsoluteFilename(String friveraOutfile)//these 2 classes used to resolve file name
            File file = new File(friveraOutfile);
            if(!file.isAbsolute()) {
                file = new File(friveraOutfile);
            return file;

    I have modified my code as far as being able to create a text file, write to string, and change to upper case. Now, how can I connected input to the output stream and then replace all the instances of the string "the" for the string "JAVAJAVA"? When the file is created, it goes into a loop writing the following:
    nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%nJAVA.IO.BUFFEREDWRITER@19821F%
    Here is my modified code
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class FRiveraReader {
    public FRiveraReader() {}
    private static final String inFile = "C:\\Documents and Settings\\Fausto Rivera\\My Documents\\NetBeansProjects\\Rivera_F_IT271_0804B_02_PH2_IP\\friverainfile.txt";//the path name of your file
      public void myReadfr (){
       try {
        BufferedReader reader = new BufferedReader(new FileReader(inFile));
        //String "JAVAJAVA" = String "the";
        System.out.println(inFile);
        String line = reader.readLine();
          while (reader != null) {
           line = reader.readLine();
      reader.close();
    catch(IOException e) {
    System.out.println("Error with reading file:" + inFile);
    }//end of myReadfr method
    public void myWritefr(){//String name of file, String array to be written
    File outFile = new File ("C:\\Documents and Settings\\Fausto Rivera\\My Documents\\NetBeansProjects\\Rivera_F_IT271_0804B_02_PH2_IP\\myoutFile.txt");
    try {
    BufferedWriter writer = new BufferedWriter(new FileWriter (outFile));
    String newline = writer.toString() .toUpperCase();
      while (writer != null) {
       writer.write(newline + "%n"); //need delimiters between data in file;also, reader reads a line
      writer.close();
    catch(FileNotFoundException e) {
    System.out.println("File not found");
    catch(IOException e) {
    System.out.println("Error writing file:" + outFile);
    }//end of getOrder method
    private File makeAbsoluteFilename(String myoutFile)//these 2 classes used to resolve file name
            File file = new File(myoutFile);
            if(!file.isAbsolute()) {
                file = new File(myoutFile);
            return file;
      }Edited by: FRiveraJr on Dec 17, 2008 12:10 PM

  • UDF to read a file name and use some of its contents to map fields in target.

    I have a scenario where I need to take the month and year from the file name and map it to suitable fields in the target. Ex - filename_apr2014 from this i should be able to read the month and year and map it. How to do this? I tried the udf -
    public String getFileName(Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName;
    got this error while testing the mapping -
    Runtime exception when processing target-field mapping /ns0:MT_<<>>_Output/I<<>>; root message: Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.get(com.sap.aii.mapping.api.DynamicConfigurationKey) of a null object loaded from a local variable at slot 2] in class <<>> method getSourceFileName[com.sap.aii.mappingtool.tf7.rt.Context@5b04fc0f]
    See error logs for details  

    Hi Satish - You declared "conf" twice.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    UDF -
    String filename    = "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
    filename = conf.get(key);
    return filename;
    And did you define the variable slot 2 in any of your UDF's?
    The above UDF return the filename and you should handle the sub string later..

  • Read a file content and copy to another Diectory

    I wanted to do the following
    1-read a file from dir
    2- read the content of the file
    3- if the file contains zeros
    exit from this file and go to read next file
    else
    do some calculations
    i read a file and its contents and found zeros in the contents, so how can i say in the code to go to next file..
    any help please

    It depends on your code, but most likely using "return":
    //pseudo code
    while(moreFiles) {
      parseFile(file)
    void parseFile(File file) {
      while(moreContentToRead) {
        if(foundZero) {
          return;
    }

  • Read from Oracle DB and Write to MySQL

    Hi All,
    I am fairly new to database administration, so please bear with me if this is something that is simple or not achievable at all -
    SetUp:
    I have an Oracle DB on one dedicated Server, to which I only have a read_only access.
    I have a MySQL database setup on a windows server 2008, both are on the company network and accessible to internal employees only.
    Problem Statement:
    I need to read certain tables from Oracle DB and push the records to MySQL database.
    I have a stored procedure which was doing this but from one Oracle Schema to another, which is running fine, now I need to use the same stored procedure but read from one database (Oracle) and write to another database (MySQL), is there a way to do this through the stored procedure, I know I can write a java program to do this, but need to do it through a stored procedure.
    Appreciate any help in this regards.

    c5b4a91d-d35a-43ba-ac96-6d1821541d33 wrote:
    Hi All,
    I am fairly new to database administration, so please bear with me if this is something that is simple or not achievable at all -
    SetUp:
    I have an Oracle DB on one dedicated Server, to which I only have a read_only access.
    I have a MySQL database setup on a windows server 2008, both are on the company network and accessible to internal employees only.
    Problem Statement:
    I need to read certain tables from Oracle DB and push the records to MySQL database.
    I have a stored procedure which was doing this but from one Oracle Schema to another, which is running fine, now I need to use the same stored procedure but read from one database (Oracle) and write to another database (MySQL), is there a way to do this through the stored procedure, I know I can write a java program to do this, but need to do it through a stored procedure.
    Appreciate any help in this regards.
    Start here:  http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_concepts.htm#i1007709

  • Read blob 's data and write them to a table

    I've managed at last to upload a blob to a table database (thanks to KUBA's)
    Now I want to retrieve the blob from the database table , read it's contents and insert them to a new table. I want to do this after the upload process finishes...
    the blob is always a txt file similar to this
    GR;Greece
    CY;Cyprus
    Because I am a bit lost any guidelines would be very helpfull
    thanks

    Hi user571628. A couple of days ago I was working on the same thing, I couldn't finish the app. 'cause I was assigned to do other web app., I used the same example as you to upload the image to the DB and someone called "gnewtonaus" came up with what appears to be an excellent idea to do it, you have to use something called PL/SQL web toolkit (I have never used it and don't know how it works)... but this is what you have to do:
    You've already solved the upload part so to download the BLOB (say an image in his example) you can use a simple PL/SQL stored procedure like the one below
    E.g to display an image (from the DB) on an HTML page you just use
    <!--
    <img src="http://your_base_url:your_port/dad_name/package.display_photo?i_person_id=1234">
    -->
    -- Display a photo from the database
    procedure display_photo(i_person_id in varchar2) is
    v_blob blob;
    begin
    -- retrieve blob from database
    select image into v_blob from pho_photos where person_id = i_person_id;
    -- set http headers
    owa_util.mime_header('image/jpeg', FALSE);
    htp.p('Content-Length: ' || dbms_lob.getlength(v_blob));
    owa_util.http_header_close;
    -- initiate direct BLOB download
    wpg_docload.download_file(v_blob);
    exception
    when others then
    htp.p(to_char(sqlcode)||' - '||sqlerrm) ;
    end; -- display_photo
    Message was edited by:
    gnewtonaus
    If you get it running please post how you did it, bacause I'll have to come back and do it myself.
    Regards

  • How to read a file name and send it a particular reciever

    Hi,
    I have a scenario, where i am receiving a a file and based on the file name i have to decide who is the receiver and send it to that particular receiver.I do not have to do any mapping.
    can someone suggest me how can I achieve this.
    Thanks in advance.

    HI This may help you.Let me know if not.
    Step by Step Guide: XML File 2 XML File Scenario: Part I
    Step by Step Guide: XML File 2 XML File Scenario: Part II
    Converting XML to PDF using XI
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    "JAVA MAPPING", an alternate way of reading a CSV file
    Dynamic File Name using XI 3.0 SP12 Part - I
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Push Data to MVC Architectured application using XI
    How to send any data (even binary) through XI, without using the Integration Repository
    XI in the role of a FTP
    The specified item was not found.
    The specified item was not found.
    The specified item was not found.
    The specified item was not found.

  • Rpt file storage and deployment

    Hello all-
    I have a few questions I'm hoping someone can answer.
    Currently we deploy an application with around 1100 reports. Due to customer security the report must be stored locally by them on their server with no outside access. Due to this we currently ship them new and updated reports which are stored in a standard \reports folder. One of the problems with this is the integrity of the rpt file itself. Storage of the reports in this manner allows the users to open the reports (if they have CR installed) and make changes which then are manifested when ran within the application.
    I would like to store / deploy the reports in a different manner but I don't know that much about it and I am not sure what methodology would work the best.
    Being that out data is stored in a SQL server can rpt files be stored in a SQL table (like a blob?) If so if it easy to call the reports from the table?
    Can you store rpt files in DLLs?
    I know we could assemble the reports inside the application itself but that would require a release when one off report changes take place.
    Am I barking up the wrong tree here or if what I am thinking about possible?
    Thanks a lot for any and all responses!
    Rob

    Hi,
    What version are you using crystal report .rpt? Thats why new crystal report are now integrated for security purposes so that .rpt files cannot be shown. For my experience you cant but you can still store the reports in a folder that they cant open the file. Do not install the whole package of the CR but instead just register the DLL so that it can be recognized by the OS.
    REgards,
    Clint

  • Read only file system and Problems witth pacman -S

    Hi im a newbie at Arch, and i have 2 problems...
    1) When I log in as a root user i can't modify any of the configuration files cause i only have a " Read only file System" does anyone know how  I can  change this cause im sick of using my live cd to modify the files i need to change..
    2) I have problems with pacman -S it says " Unable to lock database if you're sure pacman is not already running you can remove /tmp/pacman.lck"
    when i do rm /tmp/pacman.lck it says that it can't be done cause the file doesn't exist.. and Im sure that my dhcp and dns is working fine... (just in case of any wonder)
    Well if someone could help me i really would appreciate it
    thanks

    # <file>      <dir>           <type>     <options>           <dump>      <pass>
    none                 /dev/pts        devpts     defaults               0          0
    none                 /dev/shm        tmpfs      defaults           0          0
    /dev/cdrom           /mnt/cd          iso9660   ro,user,noauto,unhide  0          0
    /dev/dvd             /mnt/dvd         udf       ro,user,noauto,unhide  0          0
    /dev/fd0         /mnt/fl          vflat     user,noauto            0          0   
    /dev/hda6          swap            swap      default                0          0
    /dev/hda5/            ext3        defaults      0  0
    /dev/hda7/mnt/windows vfat  rw,usev,auto,umask = 000 0 0
    fsck -fC /dev/hda5 didnt work it said... "Error while executing fsck.ext3 for /dev/hda5

  • Reading a file in and storing it as a string

    I need help with reading the contents of a .txt file in and saving the whole thing (including format) as a string so that I can then use a while loop to go through one character at a time. I know that there is an incredibly easy way to do this iI just can't think of it right now. Thanks.

    I am really bad with processing files. I don't know
    how to do what I want. I get null when I do this:
    while ((text = in.readLine()) != null) {
    text += in.readLine();
    System.out.println(text);
    while ((text = in.readLine()) != null) {
        do something with text, but DON'T call readline again
        maybe just System.out.prinln(text); for now to make sure you're getting something
    } If you never get into the body of the loop, then the file is empty.

  • Programmatically reading .indd files.

    Hey everyone,
    I've been trying to get this right, but after having called with Adobe support and sales, I've turned to the community. My situation is like so: I need to read .indd files (in that format, no .idml) to read the XMP data that's embedded within. My environment is a 64-bit Linux server with Debian 7 running, with Ruby as the language of choice for the project. Any language is OK as long as it runs on this platform. I know, however, that the Adobe InDesign license strictly prohibits reading data explicitly from .indd files and encourages use of ExtendScript. Adobe InDesign Server is a possibility, but the price is too high for our purposes.
    What would you recommend?

    Instead, I was looking for a viewer of these files so that I can view them on any computer. Now, do you understand?
    Thanks
    Bye

Maybe you are looking for

  • How to delete the old code in the EXIT_SAPLRSAP_001

    Hi All, In R3 system, I wrote an exit for 2LIS_11_VAHDR  by using T-code CMOD in the function exit EXIT_SAPLRSAP_001 and the code does not meet my requirement today i want to delete the code and i will write the fresh one. now my problem is i am not

  • Boot Camp error when installing XP - cyclic redundancy check

    I am trying to install Windows XP through boot camp and I have tried settting up using NTFS or FAT and when it go to the XP installation screen I kept getting an error: Data Error (cyclic redundancy check). Does anyone know if there is anyway to solv

  • Dual Monitors Windows 7 Problems

    Ok, this problem is getting really annoying and I think its a problem with windows 7 itself and not my computer. Basically I have a dual monitor setup with the left hand monitor as my secondary and right hand monitor as my primary.  Whenever I have a

  • How to find out the error PL/SQL

    Actually I have written stored procedures in oracle. Which contains 5 insert statements. While calling stored procedures in java. I get an error. How find out error in which line. How to debug.

  • Getting the Headings and Time Column on Excel Spreadsheet

    Hi, I am reading a 2-D array of data on an excel spreadsheet. Currently I only have the readings on the spreadsheet. Ideally I would like to have a time column in the spreadsheet as well and also the ability to add column name to each column of data