Removing unwanted control characters in exported text files

I am currently evaluating Crystal Reports 2008 to determine applicability to our requirements. I need to export data files to continuous text to be read by other application software. I have successfully created the files but have what I believe to be page feed or end-of-page control characters (small rectangles) in the output. Can someone enlighten me as to how I can suppress or remove these control characters?

In the export to text options enter 0 for the number of lines per page. This will produce an unpaginated text document without the page control markers.

Similar Messages

  • Removing the Control Characters from a text file

    Hi,
    I am using the java.util.regex.* package to removing the control characters from a text file. I got below programming from the java.sun site.
    I am able to successfully compile the file and the when I try to run the file I got the error as
    ------------------------------------------------------------------------D:\Debi\datamigration>java Control
    Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal repet
    ition
    {cntrl}
    at java.util.regex.Pattern.error(Pattern.java:1472)
    at java.util.regex.Pattern.closure(Pattern.java:2473)
    at java.util.regex.Pattern.sequence(Pattern.java:1597)
    at java.util.regex.Pattern.expr(Pattern.java:1489)
    at java.util.regex.Pattern.compile(Pattern.java:1257)
    at java.util.regex.Pattern.<init>(Pattern.java:1013)
    at java.util.regex.Pattern.compile(Pattern.java:760)
    at Control.main(Control.java:24)
    Please help me on this issue.
    Thanks&Regards
    Debi
    import java.util.regex.*;
    import java.io.*;
    public class Control {
    public static void main(String[] args)
    throws Exception {
    //Create a file object with the file name
    //in the argument:
    File fin = new File("fileName1");
    File fout = new File("fileName2");
    //Open and input and output stream
    FileInputStream fis =
    new FileInputStream(fin);
    FileOutputStream fos =
    new FileOutputStream(fout);
    BufferedReader in = new BufferedReader(
    new InputStreamReader(fis));
    BufferedWriter out = new BufferedWriter(
    new OutputStreamWriter(fos));
         // The pattern matches control characters
    Pattern p = Pattern.compile("{cntrl}");
    Matcher m = p.matcher("");
    String aLine = null;
    while((aLine = in.readLine()) != null) {
    m.reset(aLine);
    //Replaces control characters with an empty
    //string.
    String result = m.replaceAll("");
    out.write(result);
    out.newLine();
    in.close();
    out.close();

    Hi,
    I used the code below with the \p, but I didn't able to complie the file. It gave me an
    D:\Debi\datamigration>javac Control.java
    Control.java:24: illegal escape character
    Pattern p = Pattern.compile("\p{cntrl}");
    ^
    1 error
    Please help me on this issue.
    Thanks&Regards
    Debi
    // The pattern matches control characters
    Pattern p = Pattern.compile("\p{cntrl}");
    Matcher m = p.matcher("");
    String aLine = null;

  • [SOLVED] Why are control characters visible in text files??

    Hi,
    If I direct the output of 'ls' to a file like:
    ls > file.txt
    and open the file in a editor such as vi, joe or mousepad, it looks like this:
    [[01;34m22x22[[0m
    [[01;34m24x24[[0m
    [[01;34m32x32[[0m
    [[0mindex.theme[[0m
    [[01;34mscalable[[0m
    [[m
    I just did the same thing on an old slackware box and no control characters are visible. The same for a recent LFS build. I realize I could probably pipe through dos2unix, but it shouldn't be happening anyway. Any input is appreciated.
    Thanks
    -Frank
    Last edited by fianella (2007-10-24 10:37:00)

    at the DOS prompt (sorry, old habits die hard :-) ) type
    alias ls
    and see what the results are.  Compare that against your slackware or lfs builds.  You will probably find that the color= option is different - most builds will not include the color ANSI sequences if you pipe the output, but if it says color=always the color codes will be included in the redirected file.
    Assuming you find an alias for ls that forces color output, you need to find where that is taking place... in your ~/.bashrc file?  in /etc/profile.d?  And change that to alias ls='ls --color=tty' or something sensible like that.

  • Non printable characters in a text file..

    hi,
    How to get blank lines and non-printable characters
    and remove those characters from the text file being uploaded from application server .
    thanks,
    Anil.

    Take a look at the constants in cl_abap_char_utilities. A simpler solution would be to ask for a file without such characters...

  • Removing non printable characters from an excel file using powershell

    Hello,
    anyone know how to remove non printable characters from an excel file using powershell?
    thanks,
    jose.

    To add - Excel is a binary file.  It cannot be managed via external methods easily.  You can write a macro that can do this.  Post in the Excel forum and explain what you are seeing and get the MVPs there to show you how to use the macro facility
    to edit cells.  Outside of cell text "unprintable" characters are a normal part of Excel.
    ¯\_(ツ)_/¯

  • Reading characters from a text file into a multidimensional array?

    I have an array, maze[][] that is to be filled with characters from a text file. I've got most of the program worked out (i think) but can't test it because I am reading my file incorrectly. However, I'm running into major headaches with this part of the program.
    The text file looks like this: (It is meant to be a maze, 19 is the size of the maze(assumed to be square). is free space, # is block, s is start, x is finish)
    This didn't paste evenly, but thats not a big deal. Just giving an idea.
    19
    5..................
    And my constructor looks like follows, I've tried zillions of things with the input.hasNext() and hasNextLine() to no avail.
    Code:
    //Scanner to read file
    Scanner input = null;
    try{
    input = new Scanner(fileName);
    }catch(RuntimeException e) {
    System.err.println("Couldn't find the file");
    System.exit(0);
    //Set the size of the maze
    while(input.hasNextInt())
    size = input.nextInt();
    //Set Limits on coordinates
    Coordinates.setLimits(size);
    //Set the maze[][] array equal to this size
    maze = new char[size][size];
    //Fill the Array with maze values
    for(int i = 0; i < maze.length; i++)
    for(int x = 0; x < maze.length; x++)
    if(input.hasNextLine())
    String insert = input.nextLine();
    maze[i][x] = insert.charAt(x);
    Any advice would be loved =D

    Code-tags sometimes cause wonders, I replaced # with *, as the code tags interprets # as comment, which looks odd:
    ******...*.........To your code: Did you test it step by step, to find out about what is read? You could either use a debugger (e.g., if you have an IDE) or system outs to get a clue. First thing to check would be, if the maze size is read correctly. Further, the following loops look odd:for(int i = 0; i < maze.length; i++) {
        for(int x = 0; x < maze.length; x++) {
            if (input.hasNextLine()) {
                String insert = input.nextLine();
                maze[x] = insert.charAt(x);
    }Shouldn't the nextLine test and assignment be in the outer loop? And assignment be to each maze's inner array? Like so:for(int i = 0; i < maze.length; i++) {
        if (input.hasNextLine()) {
            String insert = input.nextLine();
            for(int x = 0; x < insert.size(); x++) {
                maze[i][x] = insert.charAt(x);
    }Otherwise, only one character per line is read and storing a character actually should fail.

  • Export text files

    Hi
    I need to export text files delimited by '|', but our data is very large, i want to know if i can use some database utility.
    would you help me with this problem ?
    Felix Ramirez.

    The quickest and easiest approach is to use SQL*Plus.
    spool "someFile.txt"
    SELECT col1 || '|' || col2 || '|' || col3
      FROM someTablewill generate a pipe-delimited text file called someFile.txt. Depending on the size of your data and the nature of the query (i.e. do you need to do this with a bunch of different queries), and the timing constraints, you could also write a simple JDBC or OCI application to dump the data. I seem to recall Tom Kyte having a script on asktom.oracle.com that will use utl_file to dump a delimited text file, but that's going to be the slowest option.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Exporting text files with wide row lengths

    Post Author: stingray454
    CA Forum: Exporting
    I'm using Crystal Reports v 9.2, and I'm trying to export a report to an ASCII text file that needs to have very wide rows of data, up to 420 characters long (wide) on each row.  This report will never be physically printed, only used to export an ASCII text file. 
    When designing the report, Crystal's page width is dependent on the printer driver used and the page width.  I obviously needed something wider than 8.5 x 14 in landscape mode to fit all the fields in a 420 character wide row.  I found by using an Adobe PDF generating printer driver, like CutePDF as the printer, I could go into the driver advanced setting, and set a customized PostScript page size up to 200 inches wide.  That works for creating a wide enough Report layout to place all my fields.  However, when I go to export the report to the TXT file, it cuts off at 22.5 inches or 180 characters wide when viewed in Notepad or any other text reader, even though the data is showing in Crystal Reports' preview mode. 
    My question is:  is there any way I could export an ASCII text file using Crystal Reports that has up to 420 characters wide in a single row?  Are there any characters per inch settings in Crystal? 
    Thanks!

    Post Author: mzellner
    CA Forum: Exporting
    Have you tested the limits of a csv? What you're doing sounds like creating a fixed length ascii record. I thought about writing a program to build fixed length records from a csv file. Maybe there's one out there somewhere, who knows?

  • Exporting text files with song names and artist names only

    I need help exporting a playlist as a text file. I know how to do this already,(right click playlist and select "export song list...") but when i open it up in notepad, it is unorganized and is very hard to read. I am burning a disc for my mom and pasting the playlist on the back of the cd cover. I dont want to type out every artist and song name. Help is appreciated.

    do you have a copy of Excel (or a different spreadsheet) on the PC, kevin? if so, try opening the text file with that. then it's relatively easy to remove information by deleting the columns of info that you don't want.

  • Removing useless contents of an unsorted text file in excel 2013

    hi friends
    i am new to excel & there is an urgent need for me, that's why i pose this question which may appear simple.
    in my server i have redirected the output of a command help into a text file (c:\myhelp.txt)
    i have pasted some initial lines of that text file here:
    The following is a list of unattend parameters for promotion (default values are enclosed in <>):
    /AllowDomainControllerReinstall:{Yes | <No> | NoAndNoPromptEither}
    Specifies whether to continue installing this domain controller despite that a domain controller account with the same name is detected. Specify Yes only if you are sure that the account is no longer in use.
    /AllowDomainReinstall:{Yes | <No> | NoAndNoPromptEither}
    Specifies whether an existing domain is recreated.
    /ApplicationPartitionsToReplicate:""
    Specifies application partitions to be replicated in the format of "partition1" "partition2". If * is specified, all application partitions will be replicated.
    now i need to import this text file into excel 2013 so that i be able to remove comments & descriptions ( in fact anything except command switches, which their characteristics is that they begin with an
    slash & there is no space between their words).
    in other words i need to preserver strings which start with an slash.
    for example i need only the following strings remain in the file:
    /AllowDomainControllerReinstall:
    /AllowDomainReinstall:
    /ApplicationPartitionsToReplicate:
    so that then i be able to export that file & then execute my command & specify the path to this answer file (c:\myhelp.txt)
    how can i achieve this in excel?
    can i easily do the entire process when importing that file into excel, using importing options? if not, how can i do that after opened in excel?
    in the following screenshots i have shown what import options i used when importing this help file into excel & the result:
    really thanks in advanced, i really need this help.

    Hi John,
    Bit unclear on your requirment.
    Let me put it this way.
    1.You are running some command which generates output c:\myhelp.txt in multiple lines.
    2. You want to reformat the contents of c:\myhelp.txt so that only parameter name remains in each line, without the values.
    3. Reuse the updated c:\myhelp-clean.txt file into some other script\command.
    I can help you with quick excel formatting on point 2.
    Points noted:- the parameter are seperated from the rest of the data by ":" colon
    Hence once data is opened in excel, use Text-Col ->Delimited->Other-> Type : (colon) as the delimitor.
    This will result in only the 1st column with the long text in some rows and /parameters seperated
    Then Select all the data in the first column, Filter->Drop Down, Text Filters->Begins with-> /
    Only text with the parameters remain, as desc rows don't have / in beginning.
    Copy this and save it in another text file for re-use.
    Regards,
    Satyajit
    Please“Vote As Helpful”
    if you find my contribution useful or “MarkAs Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.
    Hi Satyajit.
    worked that's Great !
    thank you very very much for your great help
    best regards  ;-)

  • How to read characters from a text file in java program ?

    Sir,
    I have to read the characters m to z listed in a text file .
    I must compare the character read from the file.
    And if any of the characters between m to z is matched i have to replace it with a hexadecimal value.
    Any help or suggesstions in this regard would be very useful.
    Thanking you,
    khurram

    Hai,
    The requirement is like this
    There is an input file, the contents of the file are as follows, you can assume any name for the file.
    #Character mappings for Japanese Shift-JIS character set
    #ASCII character Mapped Shift-JIS character
    m 227,128,133 #Half width katakana letter small m
    n 227,128,134 #Half width katakana letter small n
    o 227,129,129
    p 227,129,130
    q 227,129,131
    r 227,129,132
    s 227,129,133
    t 227,129,134
    u 227,129,135
    v 227,129,136
    w 227,129,137
    x 227,129,138
    y 227,129,139
    z 227,129,142
    The contents of the above file are to be read as input.
    On encountering any character between m to z, i have to do a replacement with a hexadecimal code point value for the multibyte representation in the second column in the input file.
    I have the code to get the unicode codepoint value from the multibyte representation, but not from a file.
    So if you could please tell me how to get the characters in the second column, it would be very useful for me.
    The character # is used to represent the beginning of a comment in the input file.
    And comment lines are to be ignored while reading the file.
    Say i have a string str="message";
    then i should replace the m with the unicode code point value.
    Thanking you,
    khurram

  • Exporting text files in earlier editions of Oracle

    I'm not familiar with Oracle, but hope someone might be able to help me out. I have filed an access to information request with a public agency for data that I'm told is in an Oracle database.
    I have asked for the information to be released in flat text files but was told by the agency that they have an old edition (I'm not sure which one) and cannot export the information in that format as a result. As part of conditions for releasing any data to me, certain fields in their database will have to be severed to strip out personal information etc.
    The agency says it can only provide the data in pdf, which I don't believe I will be able to use.
    I'm wondering if this sounds like a valid argument - if there are earlier versions of Oracle that cannot export raw data in the format I requested. Or are there add-ons or aspects of each edition of Oracle that should make the severing and export possible?
    Thanks for any help you're able to provide...

    Any version of Oracle going back at least into the 1980s has the ability to output text files while simultaneously stripping out confidential/personal data.
    Not one of them is capable of producing that output as a .PDF file.
    Keep in mind that the people you are talking to may not know enough about Oracle to spell it correctly. If they need help they can contact me.
    Refer them to:
    SPOOL and UTL_FILE.

  • Remove duplicates while loading data from text file

    Hi,
    Data in text file (some times has duplicates) is being loaded into Oracle 9i database using Informatica. To improve performance, we would like to remove duplicates at the time of each load using Oracle procedure. Could you please help me with this?
    Thanks,
    Lakshmi

    No, our table doesn't have that. Most of the functionality is managed at the informatica level. Is there any other way? Thanks,

  • Scanning characters in a text file

    Hello, firstly I am trying to get the program to work, then I will use different methods (program description shown in code).
    I have not done Java for a while therefore I do not know if i am on the right track or not - please say. Basicly I have the characters in an array, but when I display them its looks like 160, 160, 12, 13, etc etc i.e. their is a separate number for each character.
    What I need to know is how to I get this number back to a character?
    Thank you anyone
    import java.io.*;
    * Write an application which scans through a text file, and counts
    * (and displays) the occurrences of a particular character (supplied
    * by the user) on each line of the file. Use a method to count the
    * occurrences on one line. The specification of the method should be:
    * private int countCharacters(String line, char c)
    * The method returns the number of �c� character in the line.
    public class TextfileScan2
         public static void main(String[] args)throws Exception
              byte[] byteArray = new byte[100];
              FileInputStream in = new FileInputStream("File.txt");
              int byteRead;
              int index = 0;
              while ((byteRead = in.read()) != -1)
                   byteArray[index] = (byte)byteRead;
                   index++;
              in.close();
              for(int i = 0; i < byteArray.length; i++)
                   System.out.println(byteArray);

    No need to get quite so uptight. Anyway I think I am making progress although what I have does not compile as it says I need to add curly braces to lines 28 and 44.
    Can someone please tell me why I get this error. Maybe the name of the methods - have tried changing but no luck.
    cheers
    import java.io.*;
    * Write an application which scans through a text file, and counts
    * (and displays) the occurrences of a particular character (supplied
    * by the user) on each line of the file. Use a method to count the
    * occurrences on one line. The specification of the method should be:
    * private int countCharacters(String line, char c)
    * The method returns the number of �c� characters in the line.
    public class TextfileScan2
         public int main(String[] args)throws Exception
              BufferedReader in = new BufferedReader(new FileReader("File.txt"));
              String line = null;
              String lines = null;
              while((line = in.readLine()) != null)
                   lines = line;
              countCharacters(line);
         private int countCharacters(String line)
              char[] charArray = line.toCharArray();
              int c = 0;
              for(int i = 0; i < charArray.length; i++)
                   if(charArray[i] == 'c')
                        c++;
              System.out.print("There are " + c + " 'c' characters in line");
    }

  • Need a line feed after 120 characters in a text file

    Hi ,
    I am in the verge of developing a report program which generates a text file (space delimited) for a third party vendor -
    After 80 characters (name field) - I need to have space till 120th position in the record and then the cursor should navigate to the
    the next line (line feed)  in the text file-
    I used several techniques but couldn't succeed u2013 Since there is no characters after 80th position the cursor navigates to the next line or record in the text file u2013  Can anyone help on this regard?
    Thanks in advance.
    Regards
    Rajesh.

    Rajesh,
    Insteadof  differentiating the fields in the text file with SPACE use # or @ as separator and then check by defining a field with length 40 and leave it  blank.
    K.Kiran.

Maybe you are looking for

  • Goods receipt during reversal of production order

    Hello ALL, I use production orders confirmation with Aut.goods receipt. Example is the following: I confirm 3psc of production order for semi-finished product, so system posts 3pcs with 101 movement type. Production order status is DLV Then 1 pc is c

  • 100% CPU usage with XP Cooler from PCAlert4

         Any idea why I would be running 100% cpu usage when running XP Cooler from PCAlert4?  I noticed PC was sluggish when running it so CTRL+ALT+DEL and under performance is 100% CPU with 245MB Ram Usage. No other TSR's running - several application

  • Request VBios for R9 290X Lightning

    Hi, Please may I have Hybrid VBios for my card. Serial NO: 602-V307-04SB1403018780 BIOS: [url] http://1drv.ms/1oBXA3f Thanks

  • After install wifi profile(802.1X), the wifi network can't automatic connection

    I want to connect a wifi network that uses 802.1X , and this wifi network support profile. when i install this wifi network profile, it can't been automatically connected. Can 802.1X network been automatically connected? or is issue in the profile?

  • How do I get rid of ios7's new dot matrix/monochrome monitor look?

    I can't believe what a giant step back apple took with this upgrade.  Was anyone complaining about the rich color,texture and depth of ios6. There's no need for retnia display because all the apps from apple now look like they were designed using a d