Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 25th, 2005, 11:13 AM
Registered User
 
Join Date: Dec 2005
Location: , , .
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)
viewreport1.ViewReport
viewreport1.Refresh

----------

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

thanks to all



Reply With Quote
  #2 (permalink)  
Old February 7th, 2006, 04:49 PM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
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.

Thanks.


Reply With Quote
  #3 (permalink)  
Old February 23rd, 2006, 06:14 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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);
rap.Database.Tables.SetDataSource(objDS.Tables[0],null);
viewReport.DisplayBorder = true;
viewReport.ReportSource = rap;
viewReport.Zoom (100);
viewReport.ViewReport();
viewReport.Refresh();

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.

Reply With Quote
  #4 (permalink)  
Old February 23rd, 2006, 10:15 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

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

HTH

Gonzalo
Reply With Quote
  #5 (permalink)  
Old May 21st, 2007, 02:31 AM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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;
ReportViewer1.ViewReport();
ReportViewer1.Refresh();


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.