0 Replies - 1309 Views - Last Post: 30 November 2012 - 10:45 AM Rate Topic: -----

#1 oldnewbie  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 64
  • Joined: 16-December 11

Using VB.net with Crystal Reports, RecordSelectionFormula

Posted 30 November 2012 - 10:45 AM

First of all, I'm very new to Crystal Reports. I have a Crystal Report where the ReportViewer shows 3 dropdown boxes allowing the user to filter data there. The following code is in the RecordSelectionFormula in the code in VB, but as you can see, it requires the user to select a filter from all 3 dropdowns. Sometimes the user may only want to filter by one of the 3 fields instead of all of them and this formula forces the user to select something from all 3 dropdowns. Is there a way to create a formula so that they can choose to filter by 1, 2 or 3 fields? When I've tried to filter by only one field I get an error "A boolean is required here." Thanks for any ideas.

reportToView.DataDefinition.RecordSelectionFormula = "{Person_Contact.FirstName} like '" & searchFirst & "' AND {Person_Contact.LastName} like '" & searchLast & "' AND {Sales_SalesPerson.SalesLastYear} " & salesOperator & txtLastYearSales.Text & ""



Is This A Good Question/Topic? 0
  • +

Page 1 of 1