-
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!
-
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'"
-
You could also try;
CrystalReport1.SQLQuery="SELECT _ ClientData.LastName="+txtClientLastNametxt
-
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.