on 10-02-2008 9:53 PM
Hi everybody,
I'm trying to learn manage this tool (crystal report) I use visual basic 2005 with the crystal for visual basic. Actually I've a problem with some formula fields. My report has several summarize columns (I sum the values) , not all the columns have values so not all the result fields has values. The problem becomes because I have to sum the result fields, and if i do a formula with this:
+ {@horasTinsitu} + {@ConvertirEnSegundosTreal} + {@ConvertirEnSegundosTtaller}
But only works if the three formulas has values, if one formula is empty the result looks empty, I think the problem was in the value of the formulas and I tried to evaluate with u201Cisnullu201D but neither.
Please, somebody has an idea.
Thanks everybody
Well my English it's bad but I think it's possible understand it.
Hi Daniel,
Go in each formula and add the following :
If isnull(DatabaseField) Then 0
Else
........Continue your formula steps.
Now you try to add up all formulas and check.
Regards,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I finally do it, this is the code
local numbervar InSitu;
local numbervar Remote;
local numbervar Taller;
local numbervar Phone;
if isnull({@T_insitu}) then //{@T_insitu} is the formula to summarize details and add their values...
InSitu:= 0
else
InSitu:= {@T_insitu};
if isnull({@T_remoto}) then
Remote:= 0
else
Remote:={@T_remoto} ;
if isnull({@T_taller}) then
Taller:= 0
else
Taller:= {@T_taller};
if isnull({@T_telefono}) then
Phone:= 0
else
Phone:={@T_telefono} ;
InSituRemoteTallerPhone;
Now looks easy but it's very diferent of the visual code I usually do.
well THANK YOU VERY MUCH EVERY BODY...
Dani
I don't know if you have the option in VS 2005 environment, but ...
In the full Crystal reports designer you have the option to select between Exceptions for Nulls and Default values for Nulls. Selecting the latter would solve your issue...
Edited by: Poul Jorgensen on Oct 2, 2008 11:08 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everybody. Iu2019m sorry i donu2019t fiend where to put u201CDefault Values For Nullsu201D,.
Mohamed, in my formula editor just right of the combo box (for select basic or crystal syntax) I have a button with two slash just fort comment the line. In the first row of the toolbar I have a button called u201Cenabled/disabled the properties presentationu201D but if I push doesnu2019t work. This button has an icon like a hand holding a paper.
Maybe, my Crystal report for visual studio 2005 hasnu2019t this characteristic?
Thanks again.
Dani
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.