Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: variables don't seem to be working Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 31 Jul 2013 at 4:14am
so when i move the group footer into the details field to see all of the data it looks like all of my formulas work and all of the data is there it's just not all on one line. when i put it back into the footer field it's all on one line but the data isn't correct.

this one has me scratching my head. i feel like it's gotta be something stupid somewhere that i may be over looking.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 4:44am
you should not need to move your formula to the detail section.
Did you use the 3 shared stringvar formulas I gave you or are you still doing some other calulations var1 + var2...?
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 31 Jul 2013 at 4:51am
switched from var1 style to the straight formula in the detail section 
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 31 Jul 2013 at 4:55am
however, it does also throw this error "string length less than 0 or not an integer" based on this

//footer
shared stringvar x;
x := left(x,len(x)-2)

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 4:55am

So you

1 -placed 1 formula on the group header to set the value to ""
2- placed a formula on the detail section to evaluate and add to the string for each row in your dataset
3 - placed a display formula in the group footer
 
correct?


Edited by DBlank - 31 Jul 2013 at 4:55am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 4:56am
ahh -
what do you want to do for groups with no values?
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 31 Jul 2013 at 4:58am
//group header
Shared StringVar Fica := "";

//detail
Fica := Fica + (If {ETax.tcode} In ["MED", "SS"] Then "Y" else "N");

// group footer
Shared StringVar Fica := Left(Fica,len(Fica)-2);
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 31 Jul 2013 at 4:59am
that's just it though, every single employee has Fica tax so everyone should either be a Y or N. it's weird. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 5:02am

so for groups with no values youwill get the error

change your group fotoer to handle this as
Shared StringVar Fica := if Fica=0 then "Whatever you want here" else Left(Fica,len(Fica)-2);
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 5:04am

also if you have nulls you need evalaute to "N" make sure the detail section  formula is set to 'use default values for nulls'

IP IP Logged
<< Prev Page  of 3 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.012 seconds.