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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Parameters

Status
Not open for further replies.

mickyd

Programmer
May 4, 2001
29
0
0
CA
I have several parameters for one report which can be null. I have been unable to pass null parameters across the web. How can I do this?
 
Have you tried setting the checking the box convert null value to default ? ( its loacted under -> file ->options(then under reporting tab). Or you can create a formula using the isnull(value) function in the formula,this returns a bolean then set the value to 0 or whatever.
Hope this helps,
John
 
The parameters automatically come in from my stored procedure. I did set the default to null and I'm trying to pass parameters through a link.

http://servername/reports/Incident_Report.rpt?prompt0=800,prompt1=0,prompt2=0'

I want to pass the values through the link so that the user is not prompted when viewing the report on the web.

I also tried passing NULL, and also empty quotes, for prompt1 and prompt2 but I get prompted for the second two values every time. It will accept the first parameter that I pass.
 
Hi,
I would have thought this should easily be fixed by using a string parameter as apposed to the field itself.

It is then a simple matter of

if {?param} = "NULL" then isnull({field}
else {field} = {?param}

You will need to do extra bits to cater for dates/numbers.


Hope this is helpful,
Geoff
 
I don't know if it will be that easy. the parameters that can be null are not actual fields in my report. Rather, they are retrieval arguements in the stored procedure. I can either retrieve data based on a specific report number or by a range of report numbers. If the report number passed to the report is not null, then the two range numbers have to be null. Of course this means that if the user specifies a range of report numbers, the specific report number will have to be NULL.
 
Hi,
why can you not use just one parameter?

It is easy enough to split a parameter value into two parts
eg.
stringvar from_no;
stringvar to_no;
numbervar p1 = instr ({field},"-");
if p1 = 0 then
(from_no := {field}; to_no := "")
else
(from_no := left({field},p1-1);
to_no := mid({field},p1+1);

You then specify for example values of;-
0004 for a specific report
0004-0008 for a range of reports

Geoff
 
good idea. I'll give it a try.

Thanks for the help!
 
I have the same problem (report based on stored procedure) and would like to know if there is a solution in the url.

Regards, Tomaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top