Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Using a formula as a parameter Post Reply Post New Topic
Author Message
skinfreak
Newbie
Newbie
Avatar

Joined: 29 Jan 2009
Online Status: Offline
Posts: 18
Quote skinfreak Replybullet Topic: Using a formula as a parameter
     Posted: 25 Apr 2012 at 3:33am
Hi there,
I have read that you cannot have a forumal as a paramter so I wondered what a work aroudn would be. I have a field that is featured in two tables;

1. {vwSPPlannedSession.ConsultantCode}
2. {vwSPActualSession.ConsultantCode}

Sometimes the Actual code is not completed and in this case I need to seek out the Planned code. If Actual code exists then it is fine to use that.

In a formula this is easy:

IF ISNULL({vwSPActualSession.ConsultantCode}) THEN {vwSPPlannedSession.ConsultantCode} 

ELSE {vwSPActualSession.ConsultantCode}


But how do I put this logic into a report to query this as a parameter?



Edited by skinfreak - 25 Apr 2012 at 3:33am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Apr 2012 at 4:21am

((ISNULL({vwSPActualSession.ConsultantCode}) and {?param}={vwSPPlannedSession.ConsultantCode}) 
or
{?param}={vwSPActualSession.ConsultantCode})

 
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