[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Crystal Reports - How to query a certain record to print?

Posted on 2002-03-16
5
Medium Priority
?
154 Views
Last Modified: 2010-05-02
How can I select a certain record from a table with Crystal Reports using VB Code.
0
Comment
Question by:Gmoney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
trkcorp earned 200 total points
ID: 6872340
try something like this:
Crystalreport1.SelectionFormula = "({table.DateIssued} >=  Date(" & Year(txtFrom) & "," & Month(txtFrom) & _
            "," & Day(txtFrom) & ") and {table.DateIssued} <= Date(" & Year(txtTo) & "," & Month(txtTo) & _
            "," & Day(txtTo) & "))"
OR THIS:
.SelectionFormula = "{Table.Field} = " & NumericData
OR THIS:
.SelectionFormula ={Table.Field} = '" & AlpaNumericString & "'"
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 6872346
Sorry for the wierd continuations... you just never know what a thing will look like when you cut & paste.
0
 

Author Comment

by:Gmoney
ID: 6872470
thanks trkcorp, it worked
0
 

Author Comment

by:Gmoney
ID: 6872806
Hey trkcorp how would I retrieved the following data

Table = Continuation_Report
Field = Case_Number
Desired record = 123456
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 6873656
.SelectionFormula = "{Continuation_Report.Case_Number} = " & 123456
- OR -
Dim lNum as Long
lNum = 123456
.SelectionFormula = "{Continuation_Report.Case_Number} = " & lNum
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question