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
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
Crystal Report Viewer
-
- Registered User
- Posts: 20576
- Joined: 19 Sep 2003, 02:00
- Location: Bloodbank
Re: Crystal Report Viewer
As far as I know the licenses only comes into play if you use the Crystal Reports Server
- Spoiler (show)
Re: Crystal Report Viewer
OK i managed to make a simple report viewer.
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
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
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)