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!

Empty ASP Form values cause errors when posting to a CE 8 URL

Status
Not open for further replies.

PeteytheSnake

Programmer
Mar 13, 2002
16
0
0
US
I am using ASP/CSP pages to generate web bages for the users to enter parameters for the report and submit the parameter values to CE.

Everything works fine until the user leaves one or more parameters blank. The following error message is displayed :"The syntax of the value for prompt '@paramname' is incorrect near ''. Please correct the syntax and try again. [On Web Component Server: WCS02]"

The parameter information is not directly in the URL, it is in the page post payload. I have tried using spaces to denote an empty value but nothing seems to work.

Is this some kind of weird bug where the server will not handle empty strings? Anyone know of a fix or really nice work around?

 
I found some documentation on the crystal site that says the promptex-paramname syntax for URL reporting uses quotes to denote parameter values. It seems that not supplying the quotes works in every case except when no value is supplied. The URL supplied to the WCS becomes invalid if no value is on the form. However, supplying a value of "" in the form displys properly.

Anyone ever run into this before? This is huge because it will keep me from submitting partially completed forms directly to CE, I will have to generate the URL manually before redirecting to CE. Yuk.
 
OK,

So I fixed this a long time ago and I figured I'd post my solution for posterity:

I placed a page between the parameter gathering page and the report to generate the URL. On this page I tested each parameter for a value, those without values were added to the url with a value = NULL (yes the word null: ...&promptex-emptyparam=NULL&... ) For the parameters with values I simply copied this to the URL. Now it works like a charm. ( ...&promptex-goodparam="myval"&... )

Hope this is helpful...
PTS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top