Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem in passing parameter to crystal report thru VB

Status
Not open for further replies.

smrati

Programmer
Jun 26, 2003
9
IN
I am using VB 6 and Sql server in my application.
I created reports using Crystal report version 4.6.1.0

My report is working fine when i call it in VB without using any selection formula.
EG
If the code is
Private Sub Command2_Click()
CrystalReport2.Action = 1
(the statement CrystalReport2.PrintReport also works similarly)
End Sub

This code works fine to display the report

BUT....
When i use a selection formula to facilitate parameter passing in Crystal report ,Report is not displayed.

EG:
if the code is as follows:

Private Sub Command2_Click()
CrystalReport2.SelectionFormula = "{OPDpatient_transaction.OPDregno} = " & Text1.Text
CrystalReport2.Action = 1

(here the statement CrystalReport2.PrintReport doesnt show following error but report is not displayed)

End Sub


Then there is an Run time error:
error no:20536
Unable to connect ;Incorrect Log on parameters


I have also tried Replaceselectionformula..it also gives same error.
Also i tried parameterfield property but that property is not avalable with my version of crystal report.

Please i am too much in problem.Can any one help me out?

Thanks a lott

 
I haven't worked with 4.6 in years you might try posting to forum768.
 
oops I see that you already posted in a Crystal forum. Thought I was in the VB forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top