954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

passing two parameter in Crystal report

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

SkyVValker
Light Poster
28 posts since Jan 2009
Reputation Points: 14
Solved Threads: 0
 

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.

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

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

SkyVValker
Light Poster
28 posts since Jan 2009
Reputation Points: 14
Solved Threads: 0
 
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 & "'"
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

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

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

sql

SkyVValker
Light Poster
28 posts since Jan 2009
Reputation Points: 14
Solved Threads: 0
 

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

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

This line work for me..! thanx andreRat

VReport.SelectionFormula = "{SPINF.GRNO}=" & Me.txtGRNo.Text & " And {SPINF.GRCAT}='" & Me.cmbCat.Text & "'"
SkyVValker
Light Poster
28 posts since Jan 2009
Reputation Points: 14
Solved Threads: 0
 

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

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You