Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 25th, 2005, 11:13 AM
Registered User
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal Reports 10 without CrystalActiveXReport !!

Good Day for everyone ....
We are trying to use Crystal Reports 10 in VB6 without using the
Component Crystal ActiveX Report View Library 10.0 . We use only the Reference .
We add the following references :
- Crystal Reports ActiveX Designer Runtime Library 10.0
- Crystal ActiveX Report View Library 10.0

We use the following Code :
Dim app2 As CRAXDRT.Application
Dim rap As CRAXDRT.Report
Dim viewreport1 As New CrystalActiveXReportViewer
Set app2 = New CRAXDRT.Application
Set rap = New CRAXDRT.Report
Set rap = app2.OpenReport("d:\Report3.rpt")
viewreport1.DisplayBorder = True
viewreport1.ReportSource = rap
viewreport1.Zoom (100)


No Errors and also Nothing Apeer on the screen
Is there any missing code ??

thanks to all

Old February 7th, 2006, 04:49 PM
Registered User
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I was trying to use almost the same code and could not get the report showing. I am using the same references.

I changed code and it works when I am using Crystal Report viewer control on VB form.

If you found solution how to use only references in VB code to produce the report please post the code and describe what is the problem.


Old February 23rd, 2006, 06:14 AM
Registered User
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Hi. I want to use CrystalActiveXReportViewer using C#.
I am using following code:

Application app2 = new CRAXDRT.ApplicationClass();
Report rap = new CRAXDRT.ReportClass();

CrystalActiveXReportViewer viewReport = new CrystalActiveXReportViewerClass();
rap = app2.OpenReport("C:\\TestReport.rpt",CRAXDRT.CROpe nReportMethod.crOpenReportByDefault);
viewReport.DisplayBorder = true;
viewReport.ReportSource = rap;
viewReport.Zoom (100);

It is running without any error but nothing is being dislayed on the screen.

If you could find the solution then please post it. Thnx in advance.

Old February 23rd, 2006, 10:15 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

hi there...
this is a VB 6 forum! try on a C# one...


Old May 21st, 2007, 02:31 AM
Registered User
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

i am using same with crystal 11 it' working fine.

CRAXDRT.Application app2;
CRAXDRT.Report rap;
app2 = new CRAXDRT.Application();
rap = new CRAXDRT.Report();
rap = app2.OpenReport("D:\\TestPrj_DAL\\Crystal report 11\\report3.rpt");
// use below code incomment when u want changes query or filter data or conditional output, i have given 2 example of query base on your table modify it before that pur login inof
app2.LogOnServer("p2sodbc.dll", "oss", "XLTP", "sa", "sa");

// p2sodbc.dll dll name
// oss server name // in case this dsn name
// xltp database name
// user name & password
rap.ReportTitle = "Hari Om Bapu";
////rap.SQLQueryString = "select * from f Where broker=10"
//rap.SQLQueryString = "select * from employeemaster where dofbirth ='2006-06-02'";
ReportViewer1.DisplayBorder = true;
ReportViewer1.ReportSource = rap;

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports 10 With .Net 3.5 subbukbc BOOK: Professional Crystal Reports for VS.NET 2 June 24th, 2011 05:08 AM
DateDiff in SQL using Crystal Reports 10 jmwiggins SQL Server 2000 3 August 10th, 2006 11:21 AM
Vb6 with crystal reports 10 Eleakim Cribe Pro VB 6 0 June 22nd, 2006 09:20 AM
Crystal reports 10 XML handling ferozkhan BOOK: Professional Crystal Reports for VS.NET 3 May 27th, 2005 11:25 AM
Crystal reports 10 with parameters HELP! stevecobbett Crystal Reports 0 March 18th, 2004 09:58 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.