locked
Lines Per Page option (Paginate) RRS feed

  • Question

  •  

    I have a VB.NET 2005 program that on a click of a button exports my report to a text file. This works fine apart from one thing, i get a strange charactor every 60 lines. So i opened Crystal Deveolper and tried exporting from there and it gave me and option set number of lines per page and setting this to 0 switched off paginate, which removed the charactors.

    My question is this how do i add the options for Charactors/Inch and Number of Lines per Page (setting this to 0 switches off paginate). Here is my code so far:-

    Private Sub btnGenFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenFile.Click Dim

    Exportpath As String Exportpath = "n:\Regatta Order Files\"
    CrDiskfileDestinationoption = New DiskFileDestinationOptions
    CrExportOption = CrReport.ExportOptions
    CrDiskfileDestinationoption.DiskFileName = Exportpath + ("CHAN1" & sDate & ".txt")
    With CrExportOption
    .DestinationOptions = CrDiskfileDestinationoption
    .ExportDestinationType = ExportDestinationType.DiskFile
    .ExportFormatType = ExportFormatType.Text
    End With

    Try CrReport.Export()
    'MessageBox.Show("Exported to " & CrReport.ExportOptions.DestinationOptions.DiskFileName)
    txtStatus.Text = "Text File has been created, you can now tranfer to Regatta"
    Catch ex As Exception
    MessageBox.Show(Me, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try

    End Sub


    I have XP Pro SP2
    Visual Studio 2005
    Crystal Reports Developer XI R2
    Thursday, September 27, 2007 9:58 AM

All replies

  • Can you explain for what purpose you want to export it to text file

    Can you explain for what purpose you want following

     

    My question is this how do i add the options for Charactors/Inch and Number of Lines per Page (setting this to 0 switches off paginate). Here is my code so far:-

     

    Regards

    Thursday, September 27, 2007 11:35 AM
  • In Crystal Reports Pro/Developer when you display a report and click the export option and select TEXT a dialogue box pops up asking for "Characters per Inch" and "Number of Lines per Page".

     

    Now the text file that is created is sent to our suppliers FTP server for auto processing.  Within Crystal Reports if I keep the default 60 Lines per page, and view the text file I get a box character denoting a page break so to speak.  But if I set the number of lines to 0 (no paginate) the character is removed from the text file and the suppliers are happy.

     

    Now this process of running the report, exporting to text the uploading to FTP server is going to be done by the Data entry staffs here that need a quick way of doing these steps and we don’t want to buy Crystal Reports for each machine.  So I have created a VB.NET windows app with crystal viewer control, and two buttons.  When they load the application the report is displayed so they can do a quick check, then when button one is clicked the VB code exports the text file to a temp folder, then they click button 2 and the text file is uploaded to the FTP site.

     

    My code works as it generates the file but I get the square character every 60 lines showing the page breaks, so I need to somehow set the "number of lines per page" option within the code

     

    Thursday, September 27, 2007 11:58 AM
  • dump

     

    Monday, October 1, 2007 11:11 AM