Question about Query in crystalReports

Question about Query in crystalReports

Page 1 of 1

2 Replies - 762 Views - Last Post: 24 March 2010 - 02:01 AM Rate Topic: -----

#1 anoos  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-March 10

Question about Query in crystalReports

Posted 08 March 2010 - 07:53 AM

I have a programe in vb.net and I use crystal report in this programe , so I wanna make a query in the crystalreport,so I wrote this code in the command in crystal report
select * from country where name=&Combobox1.SelectedItem&



means show all info about the selected country , but it didn't work
so if any can help me
thanks for all

Is This A Good Question/Topic? 0
  • +

Replies To: Question about Query in crystalReports

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Question about Query in crystalReports

Posted 09 March 2010 - 07:11 AM

Check into the ReportViewers SelectionFormula property, this is how you can pass queries into the report.
something like:
CrystalReportViewer1.SelectionFormula = "{Name}=" & Combobox1.SelectedItem

Was This Post Helpful? 0
  • +
  • -

#3 fourteen_naveed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 19-March 10

Re: Question about Query in crystalReports

Posted 24 March 2010 - 02:01 AM

try this code to hepls your

select * from country where name='" & Combobox1.SelectedItem & "'


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1