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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi All, This piece of code has

Status
Not open for further replies.

NewStudent

Programmer
Nov 8, 2002
12
0
0
IR
Hi All,

This piece of code has sent to me by RedGate.(Best Thanks To RedGate).
This Code Discard Saved Data From a Crystal Report.My question is : If I Want to use normal window of crystal report, instead of ViewReport window ,What can I do?
Best Regards,
NewStudent

--
Dim CrystalApplication As CRAXDRT.Application
Dim CrystalReport As CRAXDRT.Report
Dim CrystalTable As CRAXDRT.DatabaseTable
Dim CrystalReportPath As String
--
Private Sub Form_Load()

CrystalReportPath = "S:\CrystalReports\" + strENVRptNme

Set CrystalApplication = New CRAXDRT.Application
Set CrystalReport = CrystalApplication.OpenReport(CrystalReportPath)

CrystalReport.DiscardSavedData


Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = CrystalReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub
--

 
Hi,

Are you talking about the Crystal designer window. Then you will need the CRDesignerCtrl(CRDesignerCtrl.dll) instead of the CRViewer.

Then you need to call

m_CRDesignerCtrl1.ReportObject = CrystalReport

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top