Problem with Printing report
Hi,
I am using the following code to view a report in VB.
--------
Dim CrxApp As New CRAXDRT.Application
Dim CrxRpt As CRAXDRT.Report
Set CrxRpt = CrxApp.OpenReport("emp.rpt")
CrxRpt.DiscardSavedData
CRViewer1.ReportSource = CrxRpt
CRViewer1.ViewReport
------------
This works fine. Now I want to use something similar to print the report without showing it on screen.
I searched this forum and got 2 methods of doing this
1) setting the destination property of the Crviewer object to the printer.... However, I dont see a destination property for this object - (I am using crystal reports 8.5)
2) using CRViewer1.PrintReport
When I do this, I get a blank CrViewer control i.e. the control appears without the report and nothing is printed.
Where am I going wrong?
Thanks in advance
Satish
Re: Problem with Printing report
hi,
Open object browser and select crystal report library, for more details aboud class objects.
yours,
K.Babu
Quote:
Originally posted by Satishpp
Hi,
I am using the following code to view a report in VB.
--------
Dim CrxApp As New CRAXDRT.Application
Dim CrxRpt As CRAXDRT.Report
Set CrxRpt = CrxApp.OpenReport("emp.rpt")
CrxRpt.DiscardSavedData
CRViewer1.ReportSource = CrxRpt
CRViewer1.ViewReport
------------
This works fine. Now I want to use something similar to print the report without showing it on screen.
I searched this forum and got 2 methods of doing this
1) setting the destination property of the Crviewer object to the printer.... However, I dont see a destination property for this object - (I am using crystal reports 8.5)
2) using CRViewer1.PrintReport
When I do this, I get a blank CrViewer control i.e. the control appears without the report and nothing is printed.
Where am I going wrong?
Thanks in advance
Satish
Crystal Report Version Info
Hi Babu,
I'm not using Visual Basic, but I think you can help me with this problem. Is there a way to tell what version of Crystal Report is running on the computer? I have problem with printing multiple copies of a report on different versions of Crystal using Visual C++. I'm not too familiar with all the code interfacing with Crystal yet since I'm taking over a project that ist started by someone else. If I print on version 7.0 I get the correct number of copies, but if I print on version 8.5, I get an exponential number of copies. For example, if I put 3, I get 9 copies instead. I'm thinking if I can retrieve the version information, maybe I can get around this problem. Your help is greatly appreciated.
Thanks again,
CPB
How to access ms access secure database in crystal reports 8.0 with vb6
Hello babu.
Please help me how i can access password protected database in crystal reports 8.0 with vb6 .how i can pass password at runtime to crystal reports please answer me soon.
Thanx in Advance.
Nazim
Not seeing new XML column
I manually added a new column in my XML file.
I put it in both my schema and in the data section.
The new column does not show up in field explorer even though I disconnected and reconnected to the database, as well as, leaving and restarting Crystal.
Any ideas?
Thanks
Gary
Re: How to access ms access secure database in crystal reports 8.0 with vb6
hi
Use the following small code to access login and password from crystal report.
crCommon.LogonInfo(0)= "dsn=;uid=;pwd=Hello;dsq="
crCommon.DataFiles(0)= "C:\Mydata.mdb"
yours friendly,
k.Babu
Quote:
Originally posted by nazimocp
Hello babu.
Please help me how i can access password protected database in crystal reports 8.0 with vb6 .how i can pass password at runtime to crystal reports please answer me soon.
Thanx in Advance.
Nazim
How to access password protected database
Thanx for ur answer but it did't solve the prob i am using crystal report 8.0 and ther is no property or method of logoninfo
crReport.LogonInfo(0) i counld not found this property in crystal report 8.0 but there is a method crReport.database.tables(0).setLogonInfo "Servername,uid,pass") but i am using database file driver not oledb or dsn i am using direct database file.
Please help me to solve this prob
thanx in advance
Nazim