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.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
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.
hope it will print your report
cryRpt.PrintToPrinter(2, true, 1, 2);
Last edited by Hack; 05-20-2013 at 09:24 AM.
Last Post: 01-10-2008, 09:51 PM
By vijayvishwanath in forum VB Classic
Last Post: 10-29-2006, 09:48 AM
By software_develo in forum .NET
Last Post: 03-23-2006, 11:29 AM
Last Post: 05-21-2002, 08:36 AM
By Erwin in forum VB Classic
Last Post: 09-20-2000, 12:39 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center