Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 7th, 2004, 05:41 AM
marcusk marcusk is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 9 marcusk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Crystal Reports and VB6

Hi,

I am using Crystal reports shipped with visual studio 6.

I am attempting to display a report from the app Ii am developing.

I place the crystal report activex on a form and set the report source property
to crptReport and the ReportFileName property to where the report file is located.

Then I set the Destination property to crptToWindow.

I then call CrystalReport1.PrintReport from a commad button, but the report does not display.

What do I need to do to get the report to display?

Please Help.

Reply With Quote
  #2  
Old June 3rd, 2004, 11:28 AM
swschmid swschmid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Central Wisconsin
Posts: 2 swschmid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Here is some code that I use.

CrystalReport1.Reset
CrystalReport1.Destination = crptToWindow
CrystalReport1.Connect = "DSN=" & gDSN & ";UID=" & gRptUID & ";PWD=" & gRptPWD & ";DSQL=" & gDSN
CrystalReport1.PrinterName = gOrdPrinter
CrystalReport1.PrinterPort = gOrdPrinterPort
CrystalReport1.PrinterDriver = "winspool"
CrystalReport1.ReportTitle = "ORDER PICKING LIST"
CrystalReport1.ReportFileName = App.Path + "\Report Folder\PickList.rpt"
CrystalReport1.ParameterFields(0) = "User;" & strUserName & ";true"
CrystalReport1.ParameterFields(1) = "@OrderNum;" & txtOrderNum.text & ";true"
CrystalReport1.ParameterFields(2) = "@OrderVer;" & txtOrderVer.text & ";true"
CrystalReport1.PrinterSelect

If CrystalReport1.PrintReport <> 0 Then
MsgBox CrystalReport1.LastErrorString
End If


Notice I set the printer and do the PrinterSelect before doing the PrintReport, not sure if that makes a difference or not.

Stanton

Reply With Quote
  #3  
Old August 21st, 2004, 05:15 PM
italiantom italiantom is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: Palm Springs
Posts: 4 italiantom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CRYSTl report with 4 parms

I have a report who asks for 4 parms by itslelf it works.
If i call it from vb i get a dll error???

How do you pass the 4 values to the report optionally.

Tom

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Crystal Reports and VB6


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway