> 
> Try:
> 
>   eval %N (return (" \n");); add context $0; add
> context %N
> 
> if the " \n" is changed to "\n" then it's as though the
> add
> is ignored. No empty line is inserted. I claim this is a
> bug.
> 
> Risto care to chime in?
> 

Here the problem is that 'add' splits the value first by calling Perl's 
split(/\n/, $value), and then pushes the resulting list of values into the 
context event buffer. Unfortunately, when all value fields are empty, a list 
with size 0 is produced, and nothing get pushed into the context event store. 
The issue of adding a newline to context event buffer is slightly tricky. 
Actually, you can never add a newline as such, because it acts as a delimiter 
and can thus never end up in event buffer. Therefore, the task could be better 
worded as adding an empty string (or whitespace) to the event buffer. It is 
obvious how to add a whitespace string (just assign " " to %N), but handling 
empty string(s) with split() is not that obvious (I have tried to rewrite /\n/ 
partitioning regular expression in several ways and play with these versions, 
but currently have no clue what's the best solution).
kind regards,
risto



      

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to