Loading

search entry to print using crystal report 8.5

1 post / 0 new
Offline
Joined: 06/25/2009
search entry to print using crystal report 8.5

can anyone please help me on this.
**************************code****************************************
With frmreport.CrystalReport2
.ReportFileName = App.Path & "\report\rptsalesreport.rpt"
.Connect = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=project;Initial Catalog=project"
.SQLQuery = "select * from pharmasaleshistory where Medicine_Name = " & Me.txtmedname.Text
.Destination = crptToWindow
.Action = 1
End With
***********************end code***************************************

.SQLQuery worked if i search only medicine_id, but if i search medicine_name like what i have on my code it always show the error ***error detected by database dll*****

any help will be appreciated...tnx

Add new comment

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.