Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Formula with Select Statement Post Reply Post New Topic
<< Prev Page  of 2
Author Message
kurt
Newbie
Newbie


Joined: 08 Sep 2014
Online Status: Offline
Posts: 22
Quote kurt Replybullet Posted: 01 Jun 2015 at 10:19am
I will give it a shot tomorrow, thanks so much.

Regards,
Kurt
IP IP Logged
Erik
Groupie
Groupie
Avatar

Joined: 05 Dec 2013
Online Status: Offline
Posts: 50
Quote Erik Replybullet Posted: 05 Jun 2015 at 1:28pm
Originally posted by kurt

That helps, but I need to also specify which record to use. Each record will match like 10 categories in the view. I need to select the category which matches "xxx".

if
(
If table.category matches "xxx"
then select table.field
)
then chr(252)
else chr(168)

What if you Group By the record, and instead of displaying the Category you use a Formula where some sort of calculation occurs.

Formula 1: if Category = "xxx" set someGlobalVariable = true

Formula 2 (to replace Category in the report display): if someGlobalVarialbe = true then table.field + chr(252) else chr(168)

The part that eludes me at the moment is how to set the variable back to false for each iteration, or else somehow have the variable unique to the specific record grouping. This may be a pipe dream but I've done similar things before.
IP IP Logged
<< Prev Page  of 2
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.015 seconds.