Crystal Reports 10 - Export to TEXT with Delimited Space Format

Hello,
I am new to Crystal reports, sorry if this is a really basic question.  I am trying to create a report which I can export to a TXT file.  The TXT file format will be delimted space (size 500 characters).  I would like to know how I can use Crystal reports to fix the size of the fields.
For example field 1 is 22 characters, field 2 starts directly after field 1 and is 9 characters (9 spaces), field 3 is then 7 characters so an example of the output I need is:
1111111111111111111111         2222222
I will need to use a mixture of TEXT fields and database fields to create the report.  Thefore is it possible to specify the length of a text file i.e. TEXT1 = 22?
I am new to Crystal so I hope there is a simple solution without the use of coding
Thanks,
Brett

You will have to force the fields to the length that you are looking for, as Crystal treats strings as variable length strings.  So to force a character field to 20 characters, you'd do something like:
left({db.charfield} + ReplicateString(" ", 20), 20)
For a number, you could use either
ToText({db.numfield}, "0000000000")
or
right(ReplicateString(" ", 10) + ToText({db.numfield}, "0"), 10)
(for a 10 digit integer; change the format string in ToText for other numeric data types)
I suggest that it may be clearer and more accurate to create one formula field with the entire line formatted as needed, then just display that one field on the report.
HTH,
Carl

Similar Messages

  • Crystal report : Export to Text format from BI Launch pad

    Hi,
    We are facing issue in exporting the Crystal report to text format option from BI Launch pad view mode. Currently BI launch pad doesn’t support export to Text format option for crystal report in view mode. But export to text format option is feasible in schedule mode. But customer is not interested in exporting the reports through schedule mode.
    Please advise, if we have any alternative way of exporting the crystal report to text format option from BI Launch pad.
    Thanks,
    Chinnu A

    Hi Chinnu,
    The question is better suited to be asked in the BI Platform space.
    -Abhilash

  • Slow Crystal Reports Export to Text

    Post Author: shfisher
    CA Forum: General Feedback
    Previously posted on Legacy Products forum: We have a fairly complex report written in Crystal 8 that displays
    within seconds in the viewer.  A user routinely exports this report to
    a text file, and until approximately three weeks ago, the export also
    took less than 30 seconds.  Now the export is taking approximately
    three minutes.  I have seen similar posts on this topics but no
    solutions.  Are records queried differently for an export?  What could
    have caused this sudden slowdown?

    Hello,
    No, we don't have support having any command line options when exporting. There are likely third party tools out there that may give you the option though.
    One other way may be to export it to PDF format and then use Adobe API's to add the /E option when saving the output file.
    Thank you
    Don

  • Crystal Report Export to PDF with Group Tree Bookmarks

    Dear Forum
    I have created a Crystal Report aspx page with an export function of the report to pdf. So far all has been successful, except form one little annoying this. The report does export to a pdf file and it does create bookmarks based on the group tree, BUT when opening the pdf file the bookmarks hiest point which should be the file name is the really long temp file name with .rpt as an extension. I have looked every where to try to get it to write the filename to the bookmark hierarchy without success.
    I come you you all for any form of help to solve this issue.
    My code is below
    CrystalDecisions.Shared.ExportOptions export_options = new ExportOptions();
                export_options.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
                string ext = ".pdf";
                string reportName = "Filename";
                CrystalDecisions.Shared.PdfFormatOptions pdfOptions = new PdfFormatOptions();
                pdfOptions.CreateBookmarksFromGroupTree = true;
                export_options.ExportFormatOptions = pdfOptions;
                report.ExportToHttpResponse(export_options, Response, true, reportName);
                Response.Clear();
                Response.Buffer= true;
                Response.End();
    Below is an image of the output
    Any and all help is greatly appreciated

    Using the search box in the top right corner and entering the search string 'bookmark pdf crystal', the very 1st KBA is:
    1331152 - Report exported to PDF format with bookmarks displays the bookmarks as report name plus a GUID
    Please see if this resolves the issue for you.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Crystal report Export/Print issue with Non default websites

    Hello ,
    I have an issue and its driving me nuts.
    My problem i guess with the crystal reports. Might also be with IIS.
    We have developed an website on VS2008. This website is configured on IIS 8.5
    The server on which iis8.5 runs is a virtual server.
    I have configured the website to run as two different virtual directories as mentioned below;
    1) To run under default website (servername/virtualdirectory)
    2) To run under complete separate website (www.abc.com/virtualdirectory)
    if i  run crystal report using the servername/virtualdirectory, then the report is rendered fine and i can export the results also to any format and print successfully.
    But when i run the crystal report using www.abc.com/virtualdirectory, then the report renders fine but i cannot export the results nor print. Nothing happens when i click the export button.
    Any help will be highly appreciated.
    Thanks
    Abdul Aleem

    In addition to Don's suggestion. Remember that almost any action in the viewer will cause a post back - including clicking on the export button. If the report is not in session, the post back may fail and nothing will happen. See the following code on how to place a report object into a session:
    1985571 - How to use sessions in web applications using the Crystal Reports viewer (the complete code)
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Crystal Reports export and print fails with SSL / https but works with http

    Windows 2008 Server, 32-bit (IIS7)
    ASP.NET 2.0
    Ajax 1.0
    Crystal Reports version 10.5.3700.0
    http:  printing works, export works
    https:  printing not working, only export to MS Excel and MS Word work.
    I am able to generate reports using both http and https, and the toolbar icons are all showing.  However, I am unable to print or export properly with SSL.
    Printing prompts me with a select printer window, and then a window 'Retrieving Page 1' follow by two messages from Crystal Print Control both stating:
    A communication error occured.  Printing will be stopped.
    Exporting generates various errors depending on which export method is being selected (however Excel and Word work over https).
    I've found the same problem on this site and other forums, but never a resolution to get exporting and printing to work with SSL.  Will someone please provide me assistance or possibly relay what settings they're using if they have Crystal Reports export or printing working over SSL in IIS7?  Everything works fine when I change the address from https to http.
    Please let me know if I can help by providing further information.  We've gone through a great deal of possible solutions with code and I'm currently looking in to IIS settings again.
    Thank you.

    Thanks Ludek. I got it by searching KB number.
    Unfortunately, it didn’t fix my problem even my IE (IE8 and IE 9) has correct setting.  I double check my version. PrintControl.CAB is version 10.2.0.1146. we use VS 2005 Crystal report and VB .NET. It works fine on HTTP. But when we use HTTPS (SSL Certificate from go daddy).
    1: Crystal report export
                Export to MS Excel, Word: pop us “File download”, then click “Save”. It says “Internet Explorer cannot download ReportView.aspx from my site. Internet Explorer was not able to open this internet site. the requested site is either unavailable or cannot be found. Please try it again later”
                Export to RPt, Rich text format: It says “Internet Explorer cannot download ReportView.aspx from my site. Internet Explorer was not able to open this internet site. the requested site is either unavailable or cannot be found. Please try it again later”
                Export to PDF : nothing happened.
    2: Print:
                Pop up dialog to select printer, click “Print” “. Shows windows “Crystal Report Viewer” and pop us error message box. Title is “Crystal Print Control”. Message is “An communication error occurred. Printing will be stopped”. Click “OK” and pop up error message box again.
    Please advise.
    Thank you very much!

  • Export to text removes trailing spaces in XI R2

    I've found an article that talks about the problem of the export to text removing trailing spaces, but the article mentions that this is fixed in Crystal Reports XI with a newer version of u2ftext.dll to version 11.0.0.941.
    [1218375 - Trailing spaces ignored when exporting to Text format|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333333373335%7D.do]
    I'm using Crystal Reports XI R2 and my u2ftext.dll version is already 11.5.11.1470.
    I'm I missing something or is there another solution to the issue in XI R2?
    Thanks,
    Jeff

    2 Years, multiple people are asking this question.......Does anyone in support have a response for keeping the trailing spaces intact during export?

  • Hi Expert , crystal report export problem. system not responding

    Hi,
    crystal report export problem. system not responding.
    Thanks
    Rajkumar Gupta

    Dear Raj,
    Please try this
              Try
                Dim oSubReport As CrystalDecisions.CrystalReports.Engine.SubreportObject
                Dim rptSubReportDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument
                Dim rptView As New CrystalDecisions.Windows.Forms.CrystalReportViewer
                Dim rptPath As String = System.Windows.Forms.Application.StartupPath & "\" & rptName
                Dim rptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                rptDoc.Load(rptPath)
                rptView.ShowExportButton = True
                rptView.ReportSource = rptDoc
                For Each oMainReportTable As CrystalDecisions.CrystalReports.Engine.Table In rptDoc.Database.Tables
                    oMainReportTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                Next
                For Each rptSection As CrystalDecisions.CrystalReports.Engine.Section In rptDoc.ReportDefinition.Sections
                    For Each rptObject As CrystalDecisions.CrystalReports.Engine.ReportObject In rptSection.ReportObjects
                        If rptObject.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                            oSubReport = rptObject
                            rptSubReportDoc = oSubReport.OpenSubreport(oSubReport.SubreportName)
                            For Each oSubTable As CrystalDecisions.CrystalReports.Engine.Table In rptSubReportDoc.Database.Tables
                                oSubTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                            Next
                        End If
                    Next
                Next
                'Setting Paper
                Dim rawKind As Integer = 0
                Dim printSet As New System.Drawing.Printing.PrinterSettings
                For i As Integer = 0 To printSet.PaperSizes.Count - 1
                    If printSet.PaperSizes.Item(i).PaperName.ToUpper = PaperName.ToUpper Then
                        rawKind = CInt(printSet.PaperSizes.Item(i).RawKind)
                        Exit For
                    End If
                Next
                Dim MyTest As New SaveFileDialog
                rptDoc.PrintOptions.PaperSize = CType(rawKind, CrystalDecisions.Shared.PaperSize)
                rptDoc.ExportToStream(ExportFormatType.Excel)
                'rptDoc.SaveAs("C:\TBKING.xls", True)
                '''How to export the report
                Try
                    Dim CrExportOptions As ExportOptions
                    Dim CrDiskFileDestinationOptions As New _
                    DiskFileDestinationOptions()
                    Dim rename As String
                    rename = rptName.Replace(".rpt", "")
                    Dim CrFormatTypeOptions As New ExcelFormatOptions
                    CrDiskFileDestinationOptions.DiskFileName = _
                                                "c:\Report\" & rename & "_Export_File.xls"
                    CrExportOptions = rptDoc.ExportOptions
                    With CrExportOptions
                        .ExportDestinationType = ExportDestinationType.DiskFile
                        .ExportFormatType = ExportFormatType.Excel
                        .DestinationOptions = CrDiskFileDestinationOptions
                        .FormatOptions = CrFormatTypeOptions
                    End With
                    rptDoc.Export()
                Catch ex As Exception
                    MsgBox(ex.ToString)
                End Try
                '' end by kevin shah
                rptView.Show()
                rptView.ShowExportButton = True
                Dim oFrm As New System.Windows.Forms.Form
                rptView.DisplayGroupTree = True
                rptView.Dock = System.Windows.Forms.DockStyle.Fill
                rptView.Location = New System.Drawing.Point(0, 0)
                oFrm.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
                oFrm.Controls.Add(rptView)
                oFrm.Name = "Report Viewer"
                oFrm.Text = "Report Viewer11"
                oFrm.ResumeLayout(True)
                oFrm.WindowState = System.Windows.Forms.FormWindowState.Maximized
                oFrm.TopMost = True
                oFrm.ShowDialog()
            Catch ex As Exception
                objMain.objApplication.MessageBox(ex.Message)
            End Try
    By pressing this button XLS file be generated on C:\report\
    Hope this will resolved the issue
    Thanks
    Kevin

  • Databases that Crystal Reports 9 can function with

    Hi,
    We are going to purchase Crystal Reports for the use with a new financial program that we will be purchasing.  The financial program that we will purchase allows report customization within the program if using the Crystal Reports 9 engine.  For that reason we are going to purchase Crystal Reports 9.  Otherwise we would have to create custom reports outside of this program if using a more recent version of Crystal like 2008.
    However we need to make sure Crystal Reports will work with our SQL Server 2005 database.  I tried to research a bit on Crystal Reports 9 (of which currently I know nothing about) and came across this document when doing a search https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202ff507-281f-2b10-78b6-b6bce2668d6b.
    We also need Crystal 9.0 to work with Paradox and BDE databases.  It looks like BDE 5.1 and Paradox 8 & 9 are listed as supported platforms.  I also see SQL Server 2000 but do not see SQL Server 2005.  Will Crystal Reports 9.0 work with a SQL Server 2005 database and also what are the plans for Crystal Reports 9.0 working with future versions of SQL like 2008?
    thanks,
    JW

    According to the supported platforms document for CR9:
    (You should be able to search and fine this document via https://www.sdn.sap.com/ - you may have to create an account and login)
    Database Connectivity
    Clients:
    u2022 DB2 6.1
    u2022 DB2 7.1
    u2022 Holos 8.0
    u2022 Holos 8.5
    u2022 Informix 2000
    u2022 Lotus Notes 4.6
    u2022 Lotus Domino R5
    u2022 Microsoft SQL Server 7.0 SP3
    u2022 Microsoft SQL Server 7.0 OLAP Services (SP1)
    u2022 Microsoft SQL Server 2000 Analysis Services (SP2)
    u2022 Microsoft SQL Server 2000
    u2022 Oracle 8i
    u2022 Oracle 8.06
    u2022 Oracle 9i
    u2022 Sybase 12.5
    u2022 Sybase 12.0
    Servers:
    u2022 DB2 UDB 7.1 (Intel)
    u2022 DB2 (OLAP) 1.1, 7.1 (Fixpac 0)
    u2022 Essbase 5.02 (Patch 13a)
    u2022 Essbase 6.0, 6.1 (Patch 2)
    u2022 Essbase 6.5 (Only available with the updated
    u2022 driver, Essbhapi_650.dll.)
    u2022 Holos 8.0
    u2022 Holos 8.5
    u2022 Informix 9.14 (Intel)
    u2022 Informix 2000 (Intel)
    u2022 Lotus Domino R5 (Intel)
    u2022 Microsoft SQL Server 7.0.699 (Intel)
    u2022 Microsoft SQL Server 2000
    u2022 Oracle Server 8.0.6
    u2022 Oracle Server 9i
    u2022 Sybase Adaptive Server 12.0 7/20/2004 4:59 PM Copyright © 2004 Business Objects. All rights reserved.
    u2022 Sybase Adaptive Server 12.5
    u2022 SAP BW 2.0/Oracle Server 8.0.5 back end
    u2022 SAP BW 3.0/Microsoft SQL Server 2000 back end
    Other:
    u2022 ACT! 4.02 and ACT! 2000
    u2022 BDE 5.1
    u2022 Btrieve Pervasive SQL 7
    u2022 Btrieve Pervasive SQL 2000
    u2022 Microsoft Access 97
    u2022 Microsoft Access 2000
    u2022 Paradox 8
    u2022 Paradox 9
    u2022 Microsoft Outlook 98
    u2022 Microsoft Outlook 2000
    u2022 Microsoft Exchange 5.5

  • Does Crystal Report XI R2 comes with Crystal Data Object (CDO)

    Hi,
    Does anyone knows if installation of crystal reports include Crystal Data Object (CDO) ? From the article(http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2183) it seems like it doesn't comes with the standard installation package in Crystal Report XI R2. Please advise. Thanks =)
    Regards.

    You need to pick "Crystal Data Objects" from the list of Data Access options offered by Crystal Reports when you are installing it -- that item is not selected by default.
    To add that to your machine:
    - Open Add/Remove Programs
    - Select Crystal Reports 11 and click on the Change button
    - Expand the tree under "Data Access"
    - Select "Crystal Data Objects" and click on it
    - Select it to be installed -- you will probably need your Crystal Reports CD to proceed with the installation.
    Ludek

  • Crystal Report Server 2008 integration with java application

    Hi All,
    Any of you having complete document about Crystal Report Server 2008 integration with java application....like source code and what are all the jar files needed? Or tell me that the implementation is same as Crystal Report Server XI R2?
    Thanks

    Have you looked at the BusinessObjects Enterprise XI 3.x Java Developer Guide?
    [http://www.sdn.sap.com/irj/boc/sdklibrary]
    Sincerely,
    Ted Ueda

  • Exporting Crystal report to excel 2007 with an image

    Hi - I hope this is the correct forum for this question.
    We are using the Crystal report viewer and everything works just fine . When I go to export to excel (using office 2007) the images are not exporting, do you know if this is an excel 2007 problem or a Crystal issue?
    Thanks in advance
    DanPlo

    Hi;
    I still recommend installing the Service Pack. If the issue persists, and is contained to the version 8.5 reports, then yet, they will likely need to be converted to version 11.0 to work correctly. The Crystal Reports engine was completely re-written in version 9.0, so moving from 8.5 can cause some issues.
    If you try exporting one of the 8.5 reports from the verison 11.0 Designer, do you have the issue?
    Regards,
    Jonathan

  • Issue with Crystal Report export to PDF

    Have a report in Crystal Report 2008. The report runs fine, but would like to export it to PDF/EXCEL, but nothing happens when I select the Export type(i.e. PDF,Excel, etc).
    Steps to replicate:
    1. Run Crystal Report
    2. Click on EXPORT button.
    3. Select the Export type (PDF).
    4. Click on EXPORT - Nothing happens nor does it return any error.
    Would someone be able to provide some tips on this issue
    Thanks

    The problem is that the 3rd party is using some CR SDK. We don't even know what SDK that is. They should be coming here and asking us to help them on your behalf. It is almost impossible for us to help, not knowing how they implemented the SDK, which SDk, etc..
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Discover Plus - Export to Text Tab delimited is not exporting all the rows

    Hi gurus,
    I am trying to export a large data report which has 1 million plus rows to text tab delimited. The export takes 9 plus hours to export and the data is not more than 100000.
    My question is
    1. How can I make the discoverer to export it quicker or rather faster to tab delimited.
    2. Where can I change the number of rows to be exported.
    Any help, suggestions is appreciated.
    Thanks,
    SAI

    Hi Rod,
    Yes. The text tab delimited export is taking lot of time. The total rows for this report are nearly 1 million. If I break down the report with condition and export it I was able to export it ( three files exported with 212000, 103000 and 687000 rows respectively).
    But I m still having problems exporting it in one shot. Is there any way I could resolve this? Please let me know.
    Thanks,
    SAI

  • Crystal Report export to PDF cause high Heap usage ?

    Hi all,
    As part of our reporting integrated with our JSF/JSP application, Crystal report is converted to PDF then sent to browser for user to display. mean while during peak load our Heap usage could reach 3.5GB - 4GB. So I am suspecting the unclosed byteArrayInputStream is the cause.
    (This is a production application so I am collecting information before change the code)
    Is the unclosed() byteArrayInputStream  really cause the problem ?  (the codes is below)
    Thank you,
    Krist
    ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)
                                     reportClientDoc.getPrintOutputController().export(exportOptions);       
    reportClientDoc.close();
    writeToBrowser(byteArrayInputStream, response, "application/csv", EXPORT_FILE);
    private void writeToBrowser(ByteArrayInputStream byteArrayInputStream, HttpServletResponse
    response, String mimetype, String exportFile)
       throws Exception {
          byte[] buffer = new byte[byteArrayInputStream.available()];
          int bytesRead = 0;
          response.reset();
          response.setHeader("Content-disposition", "inline;filename=" + exportFile);
          response.setContentType(mimetype);
          //Stream the byte array to the client.
          while((bytesRead = byteArrayInputStream.read(buffer)) != -1)
                { response.getOutputStream().write(buffer , 0, bytesRead);}
          //Flush and close the output stream.
          response.getOutputStream().flush();
          response.getOutputStream().close();

    I do not know if my solution to my Heap problem will help any of you but I thought I would just post it here
    just incase yourselves or others come looking for possible solutions.
    I created a very simlpe report with 2 groups and not much in the way of complex functions. Whilst reporting against about
    100 pages of output everything worked fine, but as soon as we pushed the report up to 500+ pages we got all sorts
    of issues.
    java.lang.OutOfMemoryError: Java heap space
    After much hair pulling and trial and error I discovered that the issue came about where I did not declare formula variables as local. I was concatinating various street address details for of the envelope windows.
    Stringvar Address;      //    I was using this declaration
    Global Stringvar Address;    // Specific Global declaration
    Local Stringvar Address;    // Changed to this declaration
    After changing to Local, my report now runs with no hassels. And the memory usage whilst exporting the report has gone from maxing out at over 1GB to almost nothing (dont even get it registering)
    Am sure someone can come up with a better explanation for this and give reasons but just thougth I would share.
    Cheers
    Darren

Maybe you are looking for

  • Error in START_SHDI_FIRST... RFC logon fails

    Hello All, I cannot get past a step in the enhancement package 4  installation.  The step is called:  START_SHDI_FIRST. The error says to troubleshoot by looking at 2 logs,  STARTSFI.LOG  and DEVTRACE.log.   extracted below. The problem can be descri

  • ICal alarm sound

    My iCal alarm works except there is no sound. Just the alarm window with a pulsating alarm clock. Any suggestions? Thanks

  • How to create own button for closed captioning

    Hi, I have created my own buttons for play, pause, exit etc. But I do not know how to create button to show closed captioning.  I tried few hours but I give up. What I need to do?: First clik - closed captioning will appear Second clik - closed capti

  • If an apps doesn't perform

    How can you get reimburse for an apps that doesn't fulfill the promise or work?

  • Anyone running Portal with NOARCHIVELOG mode in the Oracle DB?

    Although we have several high-volume SQL Server customers running their DB in simple recovery mode (no transaction logging) with success, I am trying to determine if anyone is doing the equivalent with Oracle DB. Even if you aren't using NOARCHIVELOG