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

URL Parameters

Status
Not open for further replies.

ssudha

Technical User
Oct 14, 2002
62
IN
How to pass negative values as parameters in URL reporting of Crystal Enterprise 8.0?
 
You can ToText your values in your URL to pass negative values.
 
Thanks for the reply.
If i am passing a negative value with help of ToText function the negative value is getting truncated to 0 instead i want it to be same negative value.
Ex: I am calling a report that uses a stored procedure with amount as a parameter.Its datatype is number. Negative values can also be passed here. Your solution worked but the ToText made my negative parameter as 0. Please help !
 
Can you verify that the format of your ToText is like (ToText{Field}) with no other formatting?

Also, can you see if the URL is being populated with 0 as well, or is it retaining the negative value?

Thanks,

Naith
 
Hi Naith,
I have verified as you said. The URL is sent as:

The above URL is generated from a JSP page that will request the required report based on the selected user values. The form will contain a text field to enter the amount. The user can enter -ve values also. ToText didnot give any syntax errors but the amount is read as 0 at the Report. The report is published in CE 8.0 standard. I am using CR8.5 Developer to design the reports.

Thanks in advance,

Sudha
 
I can see the value is populating the URL appropriately. If you cut this URL out, and paste it into a new browser window so that it directly calls the report, do you have the same or different behaviour?

If the behaviour is the same, in the URL address window, delete "ToText(-10000)" and replace it with "-10000" with and without quotes. Press enter and report the [in]consistency.

If all variations return zero values, execute the SQL with the -10000 value directly on the database - skipping Crystal entirely. Do you get negative values or zeroes now?

Naith

 
Thanks Naith,
It worked with "-10000". I converted the previously int datatype on amount to String now in the JSP page and generated the URL leaving the number datatype in the stored procedure as is. The report is working fine now. Once again thanks for the patience. Your idea really worked.

Regards,

Sudha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top