kailash r

kailash r

  • NA
  • 69
  • 0

hOW TO EXPORT THREE REPORTS AS A SINGLE rtf FILE

Feb 1 2011 8:03 AM
In VB,

If I have many reports can I export it into only one file (for example, We have report named report1.rpt and we export it into the rich text file name rtfTest.rtf. Then we have another report named report2.rpt, can we append it into rtfTest.rtf)

code is,\

'First report

 CrystalReport1.Connect = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=192.168.2.11;DATABASE=qt;UID=mt;pwd="
   CrystalReport1.SelectionFormula = ""
   CrystalReport1.DiscardSavedData = True
   CrystalReport1.SelectionFormula = "{linecounts.invoiceno} = '" & InvNo & "'"
     CrystalReport1.ReportFileName = App.Path & "\" & "invcurrent.rpt"
   CrystalReport1.Destination = crptToFile
   CrystalReport1.PrintFileType = crptRTF
   CrystalReport1.PrintFileName = "D:\Invoice\" & Format(Date, "mm-dd-yy") & "\" & cmbAcName.Text & "-Invoice.rtf"
   CrystalReport1.Action = 1

'2nd report

CrystalReport1.Connect = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=192.168.2.11;DATABASE=qt;UID=mt;pwd="
      CrystalReport1.SelectionFormula = ""
      CrystalReport1.DiscardSavedData = True
      CrystalReport1.SelectionFormula = "{invoicelog.invoiceno} = '" & InvNo & "'"
     
          If optsingle.Value = True Then
             CrystalReport1.ReportFileName = App.Path & "\" & "invlogfull.rpt"
          ElseIf optmultiple.Value = True Then
             If chkLogEntry.Value = 0 Then
                CrystalReport1.ReportFileName = App.Path & "\" & "invlogfullgrp.rpt"
             Else
                CrystalReport1.ReportFileName = App.Path & "\" & "invlogfullgrpnext.rpt"
             End If
          End If
      CrystalReport1.Destination = crptToFile
      CrystalReport1.PrintFileType = crptRTF
      CrystalReport1.PrintFileName = "D:\Invoice\" & Format(Date, "mm-dd-yy") & "\" & cmbAcName.Text & "-InvoiceLog.rtf"
      CrystalReport1.Action = 1

How to export as a single rtf file. Very urgent, Thank you

Answers (3)