Click here to Skip to main content
15,898,984 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am Using Crystal Reports with a form to display a value using combobox i am getting an error like a String is required! Help me please

Thanks in advance

What I have tried:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       CRTOutPatientReport1.RecordSelectionFormula = "{OutPatient.PatientID}=" & (OutPatient.ComboBox1.Text.ToString())
   End Sub
Posted
Updated 9-Jan-19 20:28pm
v2

1 solution

Hi,

I thing you are code as missing concatenation operator for passing the value in recordselectionforula. Try this

CRTOutPatientReport1.RecordSelectionFormula ="{OutPatient.PatientID}='" & OutPatient.ComboBox1.Text.ToString() & "'"


I hope it will solve your problem and let me know if you have still same issue
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900