cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal 11 - Parameter Field - Set to Null

Former Member
0 Kudos

Post Author: peachpx

CA Forum: General

Hi,

Can anyone tell me how to add Set to Null check box option in the parameter prompt?

My report is asking to choose Begin Date and End Date u2013 with date calendar pick. Next to the prompt field I have to have Set to Null check box. How do I solve this? Report is using a SQL query to get the data in ether one of these this formats:

At the begining of the query:

declare @begin_date datetime;

declare @end_date datetime;

declare @plant_id numeric;

SET @BEGIN_DATE = CAST(CONVERT(VARCHAR,ISNULL({?Begin Date},GETDATE() - 7.0),1) + ' 06:30 AM' AS DATETIME)

SET @END_DATE = CAST(CONVERT(VARCHAR,ISNULL({?End Date},GETDATE()),1) + ' 06:30 AM' AS DATETIME)

SET @plant_id = ISNULL({?Plant},1)

OR in the end:

WHERE PR.Plant_id = isnull({?Plant},1) and

re.INSP_DATETIME >= cast(convert(varchar,isnull({?Begin Date},getdate() - 7.0),1) + ' 06:30 AM' as datetime) and

re.INSP_DATETIME < cast(convert(varchar,isnull({?End Date},getdate()),1) + ' 06:30 AM' as datetime)

Some older reports do have Set to Null option, but I don't know how to add it to mine. Set to null ether defaults it to the current date or two weeks ago.

Please help!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Post Author: peachpx

CA Forum: General

The parameter (date prompt) doesn't need to be Null, I just need a check box next to the calendar pick which would set date parameter to ether current date (for begin date parameter) or a week ago (for end date parameter). CR somehow must be doing it automaticaly - because I saw it display on the prompt page. I just not sure what I need to do in order to get a check box.

thanks!

Former Member
0 Kudos

Post Author: cnyewei

CA Forum: General

How is this going?

I donnot know how to set the parameter value to null in code.