Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crystal report with VB

Status
Not open for further replies.

tyedyejenn

Programmer
Jun 14, 2000
35
US
I was hoping someone could provide me with some help.&nbsp;&nbsp;I am writing a program in Visual Basic 6.&nbsp;&nbsp;I designed a report in Crystal Report 8.&nbsp;&nbsp;Then I found out there is a Crystal Report package that shipped with VB 6.&nbsp;&nbsp;So I installed that.&nbsp;&nbsp;Under Project ¦ Componets I have Crystal Report Control(this added a cystal report icon to my tool box) and Crystal Select Expert OLE Control module(this added a ocx icon to my toolbox) checked.&nbsp;&nbsp;I put a crystal report control on the form the report is to print from.&nbsp;&nbsp;I have the the following code written to print my report:<br><br>CrystalReport1.DataFiles(0) = &quot;C:\vbInfoForJenn\REPORTS&quot;<br><br>CrystalReport1.ReportFileName = &quot;EditList2&quot;<br>&nbsp;<br>CrystalReport1.Destination = crptToPrinter<br>&nbsp;<br>CrystalReport1.PrintReport<br><br>However nothing prints out.&nbsp;&nbsp;I am also confused about which Crystal Report to use.&nbsp;&nbsp;Any help would be greatly appreciated.&nbsp;&nbsp;Thank you in advance for your time.<br><br>Jenn
 
Jenn:<br><br>Add <b>CrystalReport1.Action = 1</b> after the CrystalReport1.PrintReport command.<br><br>Hope that helps.<br><br>... Keyser
 
KeyserSoze,<br>When I add CrystalReport1.Action = 1 I get a invalid file name error.&nbsp;&nbsp;Any idea what would cause this<br>Thanks-Jenn
 
Jenn:<br><br>You may want to put the extensions of the file names for the Crystal Report file and the database (i.e.&nbsp;&nbsp;EditList2.rpt).&nbsp;&nbsp;I'm not sure if the OCX control has default file extensions for some of it's parameters.<br><br>..... Keyser
 
The version of Crystal that shipped with VB 6.0 was 4.6! You should not use this version if you have Crystal version 8.0 as it was only for those who did not purchase a retail version!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top