Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2004
    Posts
    6

    Question Unanswered: Two questions about formulas

    How can I do following issues with Crystal Reports 10 (PRO):
    a) email address should be edited

    Source => this_part.should.be.removed@domain.com
    Target => ***@domain.com (or @domain.com)

    b) I have three _number_ columns
    year (e.g "2004")
    month (e.g "11")
    day (e.g "20")

    I cannot combine those by doing "{year} + {month} + {day}" because then the result (sum) will be 2035. How can I combine those numeric values so that the result will be shown as "2004-11-20"

    Please include the formulas, thanx.

  2. #2
    Join Date
    Nov 2004
    Posts
    6
    I solved the "B"-question by the "date"-function .

    Does anybody know how to solve the first issue?

  3. #3
    Join Date
    Oct 2003
    Posts
    357

    Thumbs up

    Hi, Try this. Create a new formula having this code
    Code:
    stringVar Email :="Testing@domain.com";
    Right(Email,11)
    Insert it into the details section. The result is @Domain.com
    You can replace "Testing@domain.com" by the Database Email field

    Madhivanan
    Last edited by Madhivanan; 11-22-04 at 02:59.

  4. #4
    Join Date
    Nov 2004
    Posts
    6
    stringVar Email :="Testing@domain.com"; Right(Email,11)
    That doesnt work because @domain.com is not a fixed size --> It can be e.g @subdomain1.domain.com or something like....

    Cuting should be made from "@".

  5. #5
    Join Date
    Oct 2003
    Posts
    357

    Thumbs up

    Hi, try this
    Code:
    stringVar Email :="Testing@domain.com"
    mid(Email,(instr(Email,"@")))
    Cutting will be made from @ regardless of the length of the string

    Madhivanan
    Last edited by Madhivanan; 11-29-04 at 00:59.

  6. #6
    Join Date
    Nov 2004
    Posts
    6
    Quote Originally Posted by Madhivanan
    Hi, try this
    Code:
    stringVar Email :="Testing@domain.com"
    mid(Email,(instr(Email,"@")))
    Cutting will be made from @ regardless of the length of the string

    Madhivanan
    Thanx, Madhivanan!
    That works fine but there is still a small issue to solve:

    Email-adresses are "groupped" wrongly:
    Code:
    like ["@domain1.net*", "@domain2.org*", "@domain3.com*"]
    Note: Without the last "*" the result is not correct because some of data will me left out.

    This will result two kind of results:
    1) @domain1.net and 2) @domain1.net>

    There is two ways to do it but I dont know how...
    1) Cutting will be made from @domain... to domain.com (to "space" or if there are ">" then it will be cutted as well)
    or
    2) Those values @domain1.net & @domain1.net> (including ">") will be combined to "one"?

    How to do this?
    Last edited by cryptox; 01-04-05 at 17:08.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •