Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Running and viewing Crystal Report via VB Post Reply Post New Topic
Author Message
jaytyo
Newbie
Newbie
Avatar

Joined: 20 Jul 2017
Online Status: Offline
Posts: 2
Quote jaytyo Replybullet Topic: Running and viewing Crystal Report via VB
    Posted: 23 Jul 2017 at 3:51am
We are using GE's iFix application which supports VB. We would like to run some Crystal Reports that I have developed from a link/button in iFix but don't know how to make the call. We can get a reports parameter page to pop up using the following code, but then get an error on authentication to the database and don't know how to call the viewer. The ODBC data source is setup on the machine same as in the report. Are we missing a call to set the database security and how do we get the report to popup in the report viewer window?

Private Sub CommandButton2_Click()
Dim CrApp As CRAXDRT.Application
Dim CrRep As CRAXDRT.Report
Set CrApp = New CRAXDRT.Application
Dim strquery As String

Set CrRep = CrApp.OpenReport("D:\Reports\ReportName.rpt")
CrRep.DiscardSavedData

...

Set CrRep = Nothing
Set CrApp = Nothing

End Sub

Anyone know how to make this call work to run and view the report would be very much appreciated.

Jay Tyo
Thanks,

Jay Tyo
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 24 Jul 2017 at 8:58am
off the top of my head, I would say that you need to set the reports datasource. i haven't used odbc in a long time so i am not sure, but that is what I would google.

HTH
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 25 Jul 2017 at 3:33am
You can get the help files and other information here: https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads.

-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.