Crystal Report Viewer

Get help on programming - C++, Java, Delphi, etc.
Post Reply
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Crystal Report Viewer

Post by SBSP »

Hi Does anyone know if its legal to use the Crystal Reports runtime libraries to open and view crystal
.rpt files ?

Lemme give some more info :D

We have a load of crystal 7 reports soon we are upgrading our ERP, when you install the ERP it comes with crystal 9 runtimes.

So i'm looking to make a simple viewer using VB.

All it has to do is open the report, click a button to refresh it and click a button and export to excel.

The crystal report viewr from Business objects can only open new ver of the report format and only open reports that has saved data.

Edit.

I only have 2 legal copies of Crystal 11 and about 50 users that need to view reports
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Crystal Report Viewer

Post by RuadRauFlessa »

As far as I know the licenses only comes into play if you use the Crystal Reports Server
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Re: Crystal Report Viewer

Post by SBSP »

OK i managed to make a simple report viewer.

Code: Select all


Private Sub Form_Load()

Me.Caption = Command



Set crApp = New CRAXDRT.Application

Set Report = crApp.OpenReport(Command)


FrmReport.Show
FrmReport.WindowState = vbMaximized
FrmReport.CRViewer91.ReportSource = Report
FrmReport.CRViewer91.ViewReport
End Sub

Private Sub Form_Resize()
On Error Resume Next
CRViewer91.Top = 100
CRViewer91.Left = 0
CRViewer91.Width = Me.Width - 100
CRViewer91.Height = Me.Height - 700

End Sub

Private Sub MnuRefres_Click()
CRViewer91.Refresh
End Sub
It works perfectly but i cant seem to find a way to associate .rpt files to my application.

If i drag and drop a .rpt file onto my exe app it opens fin , but if i right click the report and say open with and browse to my app it doesnt transfer the full file path to the "command" variable.

Edit:
Nevermind got it!

Code: Select all

Dim ReportPath as string
Me.Caption = Command
ReportPath = Replace(Command, """", "")



Set crApp = New CRAXDRT.Application

Set Report = crApp.OpenReport(ReportPath)
Post Reply