Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null and/Blank Parameters when scheduling

Status
Not open for further replies.

jotek

MIS
Oct 9, 2001
21
US
Why does a check for IsNull(Parameter_String) or Paramater_String = '' work fine(behaves like I would expect) when developing my Crystal Report. But when I place it on the Seagate Info Server and schedule it and either check Null or leave blank on the prompt window, it does not evaluate out correctly.

I am using CR 8.5 and Seagate Info 7.5.2
 
We are using SI version 7.5.2

I have a user parameter called From_Date which is a String Data_Type.

In a Formula I have:
DateVar Use_From_Date;

If ({?From_Date}= '' or isNull({?From_Date}) or {?From_Date}= '0') Then
(
Use_From_Date := date(Year(CurrentDate),Month(CurrentDate),1);
)
Else
(
Use_From_Date := date({?From_Date});
);
Use_From_Date

------------------
The only one that allows me to get the current date as the date is if I enter '0' as the parameter when running the report from the Seagate Info Server. IF I run this directly from Crystal it works fine if I just use the NULL test. One reason I am using a string is that the Date prompts in SI are confusing to the use.(But thats a different problem) But if I do use a Date and leave it blank I get the same results anyway.
 
Do you have any default values set, or a mask for this parameter?

Otherwise nothing glaringly wrong pops out for me.

The else condition will fail if the user doesn't enter the date properly, but I'm sure you know that. Some sanity checking on it's format might be in order.

Create another formula and place {?From_Date} in it to see what SI is returning, perhaps another to check length, etc.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top