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!

Displaying Crystal repports at runtime 1

Status
Not open for further replies.

see123

Programmer
May 11, 2001
28
0
0
US
Hi,
Iam having some problem while displaying crystal report at vb runtime

here is my code


in the form level i declared

Dim ADOcnn As New ADODB.Connection
Private Const MAPSMACHINELIST = "rpMachineTest.rpt"

Private Sub cmdPreview_Click()



Me.MousePointer = vbHourglass

sReportName = Trim$(lstReportList.Text)

With CrptGUI
.Reset
If Len(.Connect) = 0 Then
.Connect = ADOcnn


.StoredProcParam(0) = cboParameters(1).ItemData(cboParameters(1).ListIndex)
.StoredProcParam(1) = cboParameters(2).ItemData(cboParameters(2).ListIndex)

.ReportFileName = MAPSMACHINELIST
.WindowState = crptMaximized
.Destination = crptToWindow
End If
End With

End Sub
 
Are you using the Crystal Viewer?
What error(if any) are you getting?
 
Hi woyer
yap iam using crystal viewer.

its not displaying any error message.

thanks
 
One more question...
Do you have a report designed in the crystal report designer in your VB project?
 
i loaded that also.this is a stand alone vbp.
so i saved this project in one folder called report maker.and i saved the crystal report in the same folder.

thanks
 
If you are using a stand alone .rpt file(which I think is what you have described) where in your VB code do you specify the path and file name of the report?
 
Hi woyler,
where do i have to specify the path.in cmd click event or in the form level

thanks
 
I don't see in your code where you have actually executed the report after loading the properties(reportfilename, destination, etc).

CrptGUI.Action = 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top