Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selection expert

Status
Not open for further replies.

JeroenVV

Technical User
Jan 15, 2004
4
BE
CR 9
I would like to make a selection based on a value in a formula field.
However I can not chose the formula field in the selection expert.

The formula field contains a value like this: 2,3,4 (made a string value to concatenate the numbers)

The purpose is then to select only the records where the formula field is in (2,3,4)

How can I do this? Any suggestions are welcome. Thanks in advance.

Kind regards

Jeroen
 
Post your formula.

It's probably because you have the evaluation time set to WhilePrintingRecords or you are grouping data together.

Post the formula for futher help....

Reebo
UK

"Before you judge a man, walk a mile in his shoes. After that, who cares? ...He's a mile away and you've got his shoes." - Billy Connolly
 
This is my formula

WhilePrintingRecords;

global stringvar Amount;
if len(Amount)>0 then
Amount := Amount+','+left(totext(val(totext({CSPRpt.N13}))),instr(totext(val(totext({CSPRpt.N13}))),',')-1)
else
Amount := left(totext(val(totext({CSPRpt.N13}))),instr(totext(val(totext({CSPRpt.N13}))),',')-1);

So what you are saying is that I have to change the evaluation type of my formula? To what?

I am not grouping data.

regards

Jeroen
 
I'm trying to understand your formula, and it looks like a running total?

Unfortunately , you can't do a selection based on a running total as the running total is only calculated once all the records have been brought into the report.

I would suggest suppressing sections based on the value of your formula.

If this is unacceptable, it might be worth posting exactly what you are trying to do and someone might suggest another way of doing it.

Your formula should work the same like this:

StringVar Amount;
Amount := Amount+','+left(totext({CSPRpt.N13}),instr(totext({CSPRpt.N13}),',')-1);
Mid(Amount,2);


Reebo
UK

"Before you judge a man, walk a mile in his shoes. After that, who cares? ...He's a mile away and you've got his shoes." - Billy Connolly
 


It is acceptable to suppress my section. I only have 1 detail section, and I only want those records where the value is in my formula.

How can I suppress the section then based on the values of my formula?

In other words, how should the suppress formula look like?

Thanks

Jeroen

 
Something like :

Not({@formula} like "2,3,4*")

should work.

Reebo
UK

"Before you judge a man, walk a mile in his shoes. After that, who cares? ...He's a mile away and you've got his shoes." - Billy Connolly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top