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!

An error has occured in the script on this page

Status
Not open for further replies.

reacha

Programmer
Jun 9, 2010
83
US
{AUDIT.PROCESSNAME} = "Auth" and
{AUDIT.AUDITMSG} = "Event completed by user"
and
(if {?TimePeriod} = 'DateRange' then Date({AUDIT.AUDITSTAMP}) >= {?StartDate} and date({AUDIT.AUDITSTAMP}) <={?EndDate} )

when i was trying to select enter the parameter values

like on the calendar option i was getting an error has occured in the script on this page

Line: 160
Char: 1
Error:Object expected
Code:0

URL: file:///C:/Documents%20and%20Settings/m084022/Local%20Settings/Temp/prompting6.html

Do you want to continue running scripts on this page

yes or not


i dont know why i am getting this message.

please help me!!

Thanks,
reacha
 
Crystal expects if... then... and your line-4 statement lacks a 'then'.

Also you are mixing them with 'boolians', tests without an if... then....

Try creating two formula fields:
Code:
{AUDIT.PROCESSNAME} = "Auth" and
{AUDIT.AUDITMSG} = "Event completed by user"
Code:
{?TimePeriod} <> 'DateRange' or
(Date({AUDIT.AUDITSTAMP}) >= {?StartDate} and 
 date({AUDIT.AUDITSTAMP}) <={?EndDate})
First display these with unselected data, to confirm you get 'True' or 'False' as expected. (Blank means you have hit a null and need to check using IsNull before doing other tests.)

Once you have it working, put @test1 and @test2 in your record selection.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
i am getting the same message...
actually i have created parameter timeperiod which is string

In that i have last4weeks and daterange

{AUDIT.PROCESSNAME} = "MCR Auth" and
{AUDIT.AUDITMSG} = "Event completed by user"
and
(if {?TimePeriod} = 'DateRange' then Date({AUDIT.AUDITSTAMP}) >= {?StartDate} and date({AUDIT.AUDITSTAMP}) <={?EndDate}
else if {?TimePeriod} = 'Last4Weeks' then {AUDIT.AUDITSTAMP} = Last4WeeksToSun)

when i try to choose date
still getting the same message

Thanks,
Reacha
 
So why not try following my suggestion?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
i tried that but still the same error



Thanks,
reacha
 
Then I'm baffled. Can anyone else help?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
reacha,

Just an idea, as the following struck me as odd:
reacha said:
like on the calendar option i was getting an error has occured in the script on this page
Line: 160
Char: 1
Error: Object expected
Code:0
URL: file:///C:/Documents%20and%20Settings/m084022/Local%20Settings/Temp/prompting6.html

Do you want to continue running scripts on this page yes or not

Are you trying to run this report from a webpage? I think this error looks like a Internet Explorer error and refers to the coding on the webpage (prompting6.html). I have seen similar errors in "Cold Fusion" for our own webpages.

If a Crystal Reports error, I'm with Madawc and quite baffled.

Hope this helps!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
It was also wierd for me..
but i got the error in crystal reports when trying to choose date from the calendar... but when i enter the date manually the report was running fine.

The calendar option is not working for me..

I am assuming that there might be some file missing in from the installation files




Thanks,
reacha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top