Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Selecting records by either ID number or surname. Post Reply Post New Topic
Author Message
ceboww
Newbie
Newbie


Joined: 25 Jul 2010
Online Status: Offline
Posts: 7
Quote ceboww Replybullet Topic: Selecting records by either ID number or surname.
    Posted: 01 Aug 2010 at 10:57pm
I am trying to make my report so that when the user opens it they are prompted for both the ID number and surname, but are told to only enter one. The formula for the select expert should then be able to check which value is null and then filter records by the parameter that isnt. Before now I have only programmed in java but I gave it a go and this is what I have so far.

if ({clientmaster.SURNAME} = "") then
{clientmaster.ID} = {?Client ID}
else if isnull({clientmaster.ID}) = true
then {clientmaster.SURNAME} = {?SURNAME}


Any help you can give would be appreciated, thank you.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Aug 2010 at 3:32am
Not sure what version you are using or what interface for deploying but in most cases you cannot leave parameters blank therefore you will need to account users to enter something in both.
From there you should avoid using if-then in a select statement and just do one OR statement
Param1=id
or
param2=name


Edited by DBlank - 02 Aug 2010 at 3:33am
IP IP Logged
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.016 seconds.