|
-
Jul 9th, 2008, 12:54 AM
#1
Thread Starter
Hyperactive Member
Formula
Hi,
I am using vb.net and cr10
I want to display the stock related to particular category and using the below said formula but it show the zero result but originaly there is a data.
Can anybody help how to define the 'like' in cr10
strFormula = "{TempItemStockStatement.BranchCode} = '" & strString & "' and {TempItemStockStatement.CurrentStock} <> 0 and {TempItemStockStatement.Category} = '" & txtCategoryCode.Text & "%'"
thanks
-
Jul 9th, 2008, 01:33 PM
#2
Re: Formula
Extracted from : Crystal Reports 10 Help
Like pattern operator
Basic and Crystal syntax.
The Like operator is useful for selecting records to include or exclude from your report.
Usage
x like y
{fieldname} like "c?n*"
This operator tests to see if the contents of {fieldname} matches a pattern that you specify in a character string "c?n*". If the contents of the field do fit the pattern "c?n*", then the formula returns the value True. If the field starts with anything else, the formula returns False.
Use the wildcard symbols ? and * to stand for variable characters. The ? stands for a single character. The * symbol stands for any number of characters.
Examples
The following examples are applicable to both Basic and Crystal syntax:
{customer.FIRST NAME} like "D?n"
TRUE, where {customer.FIRST NAME} = Dan or Don.
{customer.FIRST NAME} like "D?n"
FALSE, where {customer.FIRST NAME} = Doug or Rob.
{customer.LAST NAME} like "*s?n*"
TRUE, where {customer.LAST NAME} = Johnson or Olson or Olsen.
{customer.LAST NAME} like "*s?n*"
FALSE, where {customer.LAST NAME} = Johnston or Smith.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|