Microsoft
Software
Hardware
Network
Question : Crystal report: Field Name is not known
Hi,
I have the following formula which works fine. But, when i add another If condition at the top of this formula which is like
IF ({DataTable1.TripStatus} = "P") THEN
I do nto see any error in the crystal report when saving but, when i run the application, i get an error.
The Field name is not known.
Error in formula<myformulaname>
The formula with the bigger IF condition is at the bottom seperated bya line.
Local StringVar ADDR1 ;
Local StringVar ADDR2 ;
Local StringVar CITY ;
Local StringVar ZIP ;
IF IsNull({DataTable1.Start_A
ddr1}) THEN
(
ADDR1 := "" ;
)
ELSE
(
ADDR1 := ProperCase ({DataTable1.Start_Addr1})
;
);
IF IsNull({DataTable1.Start_A
ddr2}) THEN
(
ADDR2 := "" ;
)
ELSE
(
ADDR2 := ProperCase ({DataTable1.Start_Addr2})
;
);
IF IsNull({DataTable1.Start_C
ity}) THEN
( CITY := "" ; )
ELSE
( CITY := ProperCase ({DataTable1.Start_City});
);
IF IsNull({DataTable1.Start_Z
ip}) THEN
( ZIP := "" ; )
ELSE
( ZIP := {DataTable1.Start_Zip}; );
)
ADDR1 + ", " + ADDR2 +', ' + CITY+', ' + ZIP
--------------------------
----------
----------
---&&&&&&&
&&&&&&&&&&
&&&-------
----------
----------
----------
----------
-----
Local StringVar ADDR1 ;
Local StringVar ADDR2 ;
Local StringVar CITY ;
Local StringVar ZIP ;
IF ({DataTable1.TripStatus} = "P") THEN
(
IF IsNull({DataTable1.Start_A
ddr1}) THEN
(
ADDR1 := "" ;
)
ELSE
(
ADDR1 := ProperCase ({DataTable1.Start_Addr1})
;
);
IF IsNull({DataTable1.Start_A
ddr2}) THEN
(
ADDR2 := "" ;
)
ELSE
(
ADDR2 := ProperCase ({DataTable1.Start_Addr2})
;
);
IF IsNull({DataTable1.Start_C
ity}) THEN
( CITY := "" ; )
ELSE
( CITY := ProperCase ({DataTable1.Start_City});
);
IF IsNull({DataTable1.Start_Z
ip}) THEN
( ZIP := "" ; )
ELSE
( ZIP := {DataTable1.Start_Zip}; );
//ADDR1 + ", " + ADDR2 +', ' + CITY+', ' + ZIP
)
ELSE IF ({DataTable1.TripStatus} = "D") THEN
(
IF IsNull({DataTable1.Dest_Ad
dr1}) THEN
( ADDR1 := "" ; )
ELSE
( ADDR1 := ProperCase ({DataTable1.Dest_Addr1});
);
IF IsNull({DataTable1.Dest_Ad
dr2}) THEN
( ADDR2 := "" ; )
ELSE
( ADDR2 := ProperCase ({DataTable1.Dest_Addr2});
);
IF IsNull({DataTable1.Dest_Ci
ty}) THEN
( CITY := "" ; )
ELSE
( CITY := ProperCase ({DataTable1.Dest_City}); );
IF IsNull({DataTable1.Dest_Zi
p}) THEN
( ZIP := "" ; )
ELSE
( ZIP := {DataTable1.Dest_Zip}; );
);
ADDR1 + ", " + ADDR2 +', ' + CITY+', ' + ZIP
What is wrong with this formula?
Thanks in Advance
Answer : Crystal report: Field Name is not known
The only thing that makes any sense is that the trip status field is wrong.
Try a VERIFY DATABASE.
mlmcc
Random Solutions
ISA PPTP VPN connection not working
C# code for writing up a class file....
Reset display resolution windows 7
subnet beginner ?
asp.net page to test database connectivity
IIS 6.0 asp.net 2.0 cpu performance issue
I/O error reported on file system /oracle/P1U aix hdisk path vio
Zebra LP 2844 label printer prints the first print job successfully, subsequent print jobs after skip labels and/or print partial data on labels until computer is rebooted.
Compare 2 separate databases
Emc Networker mminfo command