-
July 22nd, 2009, 01:05 AM
#1
urgent help with crviewer control
im in need of urgent help.im doing a project where i have created a report using seagate crystal reports.when i click on a command button in vbform itgoes to another form where i have placed my crviewer control.
i have written the following and i get a blank viewer when run
Dim crApp As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Dim strSelectionfrm As String
Private Sub CRViewer1_CloseButtonClicked(UseDefault As Boolean)
Set crApp = New CRAXDRT.Application
Set Report = crApp.OpenReport("c:\project\rpt1.rpt")
CRViewer.ReportSource = Report
CRViewer.ViewReport
End Sub
-
July 22nd, 2009, 01:21 AM
#2
Re: urgent help with crviewer control
If looks like all your code is in the close button event? I don't use Crystal reports but from a quick glance at the code it looks like the report is only set when you click the close button at best that is a bad choice of where to put the code.
-
July 22nd, 2009, 01:25 AM
#3
Re: urgent help with crviewer control
can you tell me how to go about it then?thanks for the help
-
July 22nd, 2009, 01:29 AM
#4
Re: urgent help with crviewer control
even after giving the code in form_load() its displaying a blank viewer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|