Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help with syntax Post Reply Post New Topic
Author Message
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Topic: Help with syntax
     Posted: 05 Jun 2012 at 3:34am
if you group by employee, then, you can create a shared variable. reset it in the group header, then in the detail section you can append the attendance code to it, then in the group footer, you can check if any of those codes are in the string...since there is alot of them, it won't be pretty but something like this:
header:
shared stringvar x:="";
""//hides output
 
detail:
shared stringvar x;
x := x + "," + {table.field};
 
or even simpler:
header:
shared booleanvar x := false;
 
detail:
shared booleanvar x;
 
if not x then   //once it is a yes, you never want to change it back to a no...i'm assuming
  x := (instr("s,c,i,d,l,o,q,r,t,u", {table.field}) > 0);
 
now whenever/where ever you want to check the value, just ask x
shared booleanvar x;
if x then ...
 
 
HTH
IP IP Logged
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