Results 1 to 2 of 2

Thread: Crystal Subreport

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Posts
    154

    Crystal Subreport

    I have a Crystal Report that I wanto to print from VB.net. I was able to do that with no problem until I added a subreport to the main report. The subreport is NOT a standalone report. The code below is what I used to print the report prior to adding the subreport.
    VB Code:
    1. ord.Fill(ords)
    2.         Dim crdoc As New ReportDocument
    3.         crdoc.Load("C:\QBSautoproj\Orders.rpt")
    4.         crdoc.SetDataSource(ords)
    5.         Try
    6.             crdoc.PrintToPrinter(1, True, 0, 0)
    7.         Catch ex As Exception
    8.             MsgBox(ex.ToString)
    After adding the subreport this fails on one of the fields of the subreport. Do I have to somehow include that in the code as another report?
    Thanks,
    Russ
    Last edited by Hack; Mar 22nd, 2006 at 01:12 PM. Reason: Added [vbcode] [/vbcode] tags for more clarity.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Crystal Subreport

    Moved to reporting section

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width