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!

URL Parameter

Status
Not open for further replies.
Jan 27, 2005
76
US
I am calling a report from within my application. I am also passing two parameters, CustomerID and City. This works great, if both values are passed.

If the City is empty, it opens a page asking for the City parameter. I want it to recognize an Empty parameter value and use that within the report Select Expert, effectively making it, {customerID} = '1234' and {city} = '' . This is a valid statement to return a dataset.

How can I bypass the parameter page for an empty parameter?

Thanks!
 
When you say it's empty, does that mean you are passing it as an empty string or not passing it at all?
 
Have you tried setting the parameter's minimum length limit to zero in the parameter setup? If you edit the parameter, it's under "Default Values", minimum length. I don't know if this will work but it's what I would try first.
 
Thanks for the suggestions! Since the URL is in an application that uses the current record information as the parameters, it could be a moving target. I made the URL:


Within the report, the select is:
{table.customerid} = {?custno} and
{table.city} = replace({?city}, 'removetext', '').

Seems a bit dirty, but the only way I could get it working.

Thanks again!
 
Hello,

I have this method that calls the report and (should) pass the parameter... but, CE still asks me for the paramters....any ideas?? I just inherited this code and i am pretty new to CE and asp...



Sub ShowReport()
Dim ReportID
Dim sReportLink

ReportID = Session("ReportID")

If ReportID > "" Then
sReportLink = "viewrpt.cwr?id=" & ReportID & "&apstoken=" & crToken & "&init=html_frame:connect"
End If
For Each oSessionParam In Session.Contents
If Left(LCase(oSessionParam), 9) = "promptex-" Then
sReportLink = sReportLink & "&" & oSessionParam & "=" & Session.Contents.Item(oSessionParam)
End If
Next
Call GarbageCollect()
Response.Redirect(sReportLink)
End If

Thank you so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top