PDA

Click to See Complete Forum and Search --> : Passing parameters to Crystal report (RDC)


dennisds
Mar 21st, 2003, 03:39 AM
I am new to Crystal Reports. I earlier used Microsoft Data Report but it didnot have the 'Record Number' feature , so I have to re create my reports in Crystal Reports.I am using crystal report 8 designer control ( RDC) for my project on Payroll . I want to create a report which will generate the report based on the month & year.

I have a form containg two combo boxes from where the user will select the month & the year.

I want to pass this to Crystal Report Designer as a parameter.


I used the following query in data report.

select p.empno,e.fname, p.bsal,p.itax,p.netsal,p.mnth,p.yr from emp e, payroll p where e.empno=p.empno and p.mnth= ? and p.yr= ?
order by p.bsal

I used to pass the value for p.mnth & p.yr using the following code in a form which contained the text boxes.

[Highlight=VB]

option Explicit

Private Sub Command1_Click()
deConsolidated.Command1 cmbMonth.Text, cmbYear.Text
drConsolidated.Show
End Sub

[\vbcode]

Pls guide me how to pass the parameters from the above combo box to crystal report designer ( RDC)

Thanking you,
Rgds,
Dennis.

Ken Bradford
Mar 24th, 2003, 01:38 PM
This documents has links to sample vb code starting on page 8.

http://support.crystaldecisions.com/communityCS/TechnicalPapers/apps_vb_rdc.pdf

dennisds
Mar 25th, 2003, 04:44 AM
Ken,

Thanks a lot for the help.This site is quite helpful. But I fail to understand the difference between
1. Crystal Report Control (CRYSTL32.OCX)
2. Crystal Report Viewer control .(CRVIEWER.DLL)
3. Crystal Report Designer Component - RDC ( CRAXDUI.DLL)

I am terribly confused pls help.

Ken Bradford
Mar 25th, 2003, 09:10 AM
The Crystal Report Control (CRYSTL32.OCX) has been replace by RDC. If you are use to using it, there is a good tutorial on converting to RDC at:

http://support.crystaldecisions.com/communityCS/TechnicalPapers/scr8-ocxtordc.pdf

I currently to not use parameters for selecting data, so I can't offer you any help with that. The above document does have at least one example.

The Report Viewer is nothing more than a vb form that has a control on it to display a given report. The above will explain how to use it.

Good luck.

dennisds
Mar 26th, 2003, 09:33 AM
Ken,

Thanks a lot for the help