Results 1 to 2 of 2

Thread: Formula

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    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

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    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
  •  



Click Here to Expand Forum to Full Width