Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: leaving date range blank Post Reply Post New Topic
Author Message
nettfrnd
Newbie
Newbie


Joined: 26 Aug 2012
Location: Pakistan
Online Status: Offline
Posts: 1
Quote nettfrnd Replybullet Topic: leaving date range blank
    Posted: 26 Aug 2012 at 6:26am

Formula Fields:

1) @Username_Formula (has string db column as {Command.Username})
2) @Date_Formula (has date db column as Date({Command.DT}))
3) @Time_Formula (has string db column as TimeValue ({Command.TM}))

Parameter Fields:

1) {?Username_Parameter} (string data type)
2) {?Date_Parameter} (date data type with range values)
3) {?Time_Parameter}(time data type with range values)

Record Selection:

if {?Username_Parameter} = "" then

{@Date_Forumula} = {?Date_Parameter} and
{@Time_Forumula} = {?Time_Parameter}

else if totext(@Date_Formula)= "" then

{@Time_Forumula} = {?Time_Parameter} and
{@Username_Formula}={?Username_Parameter}


--------------------------------------------------------------------------------------

I want to leave both dates blank in range. Please help.

Thanks,
 

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Aug 2012 at 4:20am

i believe optional parameters were introduced in v 2008. If you have an earlier version you will not be able to leave them blank.

If you have 2008 then you can use the hasvalue() function to manage select statement.
 
If you do not have 2008 then you have to have the users enter a value that you write to equate to empty in you select statement.
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.031 seconds.