General discussion

Locked

Crystal reports connection with vb6

By saravanakumar77 ·
iam using ms access and vb6, crystal report
how to build a crystal report with a parameter.
then how to handle the rpt, with vb and how to send the parameters.
if possible give me an example
regards
saravanakumar.d
98425 62147

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Miss Kitty In reply to Crystal reports connectio ...

In your vb project, you need to add a Crystal reports control and the Crystal viewer control(if you are going to have the user view the report).

On the form which will be calling the Crystal report, here is and example of code.

Option Explicit
Dim crxApplication As New CRAXDRT.Application
Public Report As CRAXDRT.Report
Public FormFrom As String

Private Sub cmdHaulRpt_Click()
Dim crxDatabaseTable As CRAXDRT.DatabaseTable
Dim crxParameterField As CRAXDRT.ParameterFieldDefinition
Dim crxFormulaField As CRAXDRT.FormulaFieldDefinition
Set Report = crxApplication.OpenReport _
("E:\PLTERA\CRYSTAL REPORTS\HAULER REPORTS\Contract Haulers Report.rpt", 1)
frmViewer.Show vbModal

My example does not show a parameter being passed, but does include the dim statement for it. Here is a link to Crystal Decision's knowledge base article on passing parameters.

http://support.businessobjects.com/communityCS/FilesAndUpdates/scr_vb_ocx_parameter.exe.asp

Cathy

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums