CR.Reset
CR.ReportFileName = "StudentInformation.rpt"
CR.SelectionFormula = "{SPINF.GRNO}=" & Me.txtGRNo.Text & "" And "{SPINF.CMBCAT}=" & Me.cmbCat.Text & ""
CR.Action = 1

m trying to passing two parameter for cr..! bt it always shows the error type mis match.! plz help me

Mismatch refers to an incorrect field name in your table, incorrect control name, the use of say "Text1.Caption" and not "Text1.Text", incorrect string value etc.

Post your full code here and where the error occurs.

dat is the full code sir..!

here is the error occur

CR.SelectionFormula = "{SPINF.GRNO}=" & Me.txtGRNo.Text & "" And "{SPINF.CMBCAT}=" & Me.cmbCat.Text & ""

i dunt know the rite method to pass two parameter in crystal report

CR.SelectionFormula = "{SPINF.GRNO}=" & Me.txtGRNo.Text & "" And "{SPINF.CMBCAT}=" & Me.cmbCat.Text & ""

Change to this and try.

CR.SelectionFormula = "{SPINF.GRNO} = '" & Me.txtGRNo.Text & "'" And "{SPINF.CMBCAT} = '" & Me.cmbCat.Text & "'"

What database are you using, MS Access, MySql or sql?

Have a look at this tutorial on Crystal reports and the "SelectionFormula" statement over HERE.

This line work for me..! thanx andreRat

VReport.SelectionFormula = "{SPINF.GRNO}=" & Me.txtGRNo.Text & " And {SPINF.GRCAT}='" & Me.cmbCat.Text & "'"

Pleasure SkyVValker.:) I'll try and sort your other post tomorrow. Weekend time!!! Yeah:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.