How to view Crystal Reports Version 10 on Crystal Enterprise Folde

How to view Crystal Reports Version 10 on Crystal Enterprise Folde

Post by VG9tQi » Wed, 28 Sep 2005 02:08:05


1. Create a NEW Standard Exe in VB (I use VB6)

2. Click Project, click References and select:
(I use Crystal 9)
--- Crystal Report Viewer Control 9
--- Crystal Reports 9 ActiveX Designer Design and Runtime Library
--- Crystal Reports 9 ActiveX Designer Run Time Library
Click OK

3. Click Project, click Components and select:
--- Crystal Report Viewer Control 9
Click OK (this will add a small CRViewer9 icon under the General tab on
your ToolBox

4. Name your form: frmMain...
---put two command buttons on it
---name one command button: cmdYourReportName
---change its caption to: Y&our Report Name
---name the other command button: cmdExit
---change its caption to: E&xit
---rightclick on the form, select View Code and add this code:

Private Sub cmdExit_Click()
Unload Me
End
End Sub

Private Sub cmdYourReportName_Click()
frmYourReportName.Show
End Sub

5. Add a new form to your project...name it: frmYourReportName
---change the WindowState to: 2 - Maximized
---double-click the CRViewer9 icon (under the General tab on your ToolBox)
---that just added a viewer to frmYourReportName

6. Change the (Name) of this viewer from CRViewer91 to: YourReportName
---put a command button on frmYourReportName
---move it to: LEFT 7000 TOP 0 (that will place it in a good position
when you run the report)
---name it: cmdExitToMain
---change the caption to: E&xit to Main

8. Rightclick viewer and select View Code
---in the code window, paste this code:

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
YourReportName.Top = 0
YourReportName.Left = 0
YourReportName.Height = 12336
YourReportName.Width = 15408
Set Report = Appl.OpenReport("Y:\Reports\YourReportName.rpt")
YourReportName.ReportSource = Report
YourReportName.ViewReport
End Sub

***Obviously, you need to use the correct path and file name for YOUR
report***

9. Close these forms.

10. Click Project, select Project1 Properties.
---change the Project Name to: Toms_Wonderful_Program
---change Startup Object to: frmMain

11. SAVE

12. Run the program
---once it is up, click the "Your Report Name" command button
---your report will run (it will ask for parameters is needed)
---to close it, click the "Exit to Main" command button

13. Just add new command buttons (to frmMain) for each new form with a
CRViewer (remember to change the names accordingly) for each report you want
the others to access.
 
 
 

How to view Crystal Reports Version 10 on Crystal Enterprise Folde

Post by Luqma » Wed, 28 Sep 2005 16:54:55

ear Tom,

Thanks v. much for yout detailed answer, but I know all these, my
requirement is to put the RPT files on Server and clients even from other
Cities should access the reports from that server, no paths should be
defined, for such purpose, do I need Crystal Enterprise, Crystal Server or
something else ?

Best Regards,

Luqman


"TomB." < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...



 
 
 

How to view Crystal Reports Version 10 on Crystal Enterprise Folde

Post by don osterg » Sat, 08 Oct 2005 03:56:09

am brand new to Crystal and I am playing around trying to get a
Crystal report to show in my VB 6.0 application. I created the report
with some help from folks already on this forum, thank you, and the
report works great in the Crystal designer but I have no clue as to how
to now show the report in my app.

I am finding the documentation in both Crystal reports and VB 6.0 very
sketchy for doing any of this. Unless I am looking in the wrong places....



I just went through all the steps that were detailed here except I get
an error when I go to open the report/form up.

I am not using Crystal 9.0 but the version of Crystal came with VB 6.0
Professional CR 4.6.

I don't see any crystal report lines to choose when going into
references under project. I also went browsing and could not find
anything to add the looks like the three references needed as well.

I put in a new form and set up the Crystal control on the form and added
the form Load piece of code but I get an error of:

Compile error
User Defined type not defined and the code is stopped at

Private Sub Form_Load()
> (here) Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report

I am assuming that this is because I don't have the references set up
properly but not sure. Any help would be appreciated.

Thanks much
Don


TomB. wrote:
 
 
 

How to view Crystal Reports Version 10 on Crystal Enterprise Folde

Post by Luqma » Fri, 14 Oct 2005 02:22:31

elect Crystal Report ActiveX Design Ttime Library from References. This
should solve the problem.

Best Regards,

Luqman



"don ostergard" < XXXX@XXXXX.COM > wrote in message
news:dre1f.96918$oW2.86697@pd7tw1no...