DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008

    Automatically print Crystal Report within Windows application using VB.NET

    I am rewriting an existing VB 6 application which prints a label using a Crystal 7 report. It does not display the report, but merely uses it for the outline of the label. The report is stored in the application path. Currently, the VB 6 application has a reference to the Crystal Report object. I do not see this available reference within VS 2005.
    I am not very familiar with working with Crystal Reports within .NET.
    I am trying to include a Crystal report into my VB.NET project that will not be displayed, but just called to print a label.
    Do I need to include the report in my project? I do not know what references and how to include this into the project. Ideally I would just like to use the report as a shell and have the data source already populated. Can I still store it in the application path?
    Any help is greatly appreciated as I am stuck a bit.

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Welcome to DevX

    This sample project might help.


  3. #3
    Join Date
    Dec 2008
    Thanks for responding Hack. I have seen this solution when searching for answers, but it does not fit my situation. My situation seems to be unique because I am using the crystal report for the outline / format of a printed label. It is NOT displayed within the application, so I would not have a form with a report viewer on it.

    The old way in VB 6 application was to place the crystal report object on the form and then call the report located in app path. Report was tied to a specific table in the database. Table was populated by application.

    CR1.ReportFileName = App.Path & "\LBBundle.rpt"
    CR1.Destination = crptToPrinter
    CR1.DataFiles(0) = "bundles" & Hline
    CR1.Action = 1

    In .NET I am trying to find out if this same architecture is possible. I would like to model it the same way, but do not know how to use the crystal object to satisfy this need.

    Any help is appreciated and needed since I am a bit stuck.

  4. #4
    Join Date
    May 2013
    just do
    cryRpt.PrintToPrinter(2, true, 1, 2);
    hope it will print your report


    Last edited by Hack; 05-20-2013 at 09:24 AM.

Similar Threads

  1. Crystal Report with VB.Net - Need Help
    By philips in forum .NET
    Replies: 3
    Last Post: 01-10-2008, 09:51 PM
  2. Crystal Report Not Opening after changing DSN
    By vijayvishwanath in forum VB Classic
    Replies: 3
    Last Post: 10-29-2006, 09:48 AM
  3. Replies: 0
    Last Post: 03-23-2006, 11:29 AM
  4. Replies: 0
    Last Post: 05-21-2002, 08:36 AM
  5. CRYSTAL report error
    By Erwin in forum VB Classic
    Replies: 1
    Last Post: 09-20-2000, 12:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.