Results 1 to 4 of 4

Thread: A Crystal Report Problem

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Manila, Philippines
    Posts
    59

    Red face


    Hi Peeps! I have a very simple problem here that I just can't solve. Well, I just don't know how to do it.

    I am currently working on a project using VB 5.0. There's no problem in programming with the lower version but I never used its accompanying Crystal Report 4.5 in making reports. Well, making the report is simple but if you want some more, that's another story.

    THE PROBLEM;

    I need to show a field on the crystal report that will not come from the table. This value of this field depends on the parameter passed by my program. I don't know how to do it. I already tried using formula fields but i just can't access it from within my program. PLEASE HELP!

    I tried this:
    crpt.reportfilename = "c:\myrep.rpt"
    crpt.formulas(0) = "upper('My Value')"
    crpt.action = 1



    Thank You very much!
    Mikey
    A/P
    Using VB6 SP4 Enterprise Ed.

  2. #2

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Manila, Philippines
    Posts
    59


    I've got it! For those who have the same problem that i had, here's the solution:

    suppose you have two formula fields, @station and @label_one, you can change its formula at runtime by executing the following formulas:

    Report.Formulas(0) = "station = {table1}.column_name"
    Report.Formulas(1) = "label_one = 'My custom Label'"

    Mikey
    A/P
    Using VB6 SP4 Enterprise Ed.

  3. #3
    Lively Member
    Join Date
    Sep 2000
    Location
    Scotland
    Posts
    68

    Cool

    You could also try;

    CrystalReport1.SQLQuery="SELECT _ ClientData.LastName="+txtClientLastNametxt
    Why can't every day be Saturday ??

  4. #4
    Lively Member
    Join Date
    Sep 2000
    Location
    Scotland
    Posts
    68
    Opps sorry made a mistake in the previous post that should be;

    CrystalReport1.SQLQuery= "SELECT ClientData.LastName="+txtClientLastNametxt


    This should work sorry about the last post.

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