cancel
Showing results for 
Search instead for 
Did you mean: 

Calender at prompt is causing an error

Former Member
0 Kudos

Crystal V.11

Executing the report through a 3rd party application using crystal's runtime. Any report that uses the calender function to choose a start and end date at the prompt receives the error:

An error has occurred in the script on this page.

Line: 95

Char: 1

Error: Objected expected

Code: 0

URL file:// -path leads to a local user directory-

When I run the report either through the 3rd party app or through crystal I have no issues on my end. This is only occurring at a client site and the error is effecting multiple users on different workstations.

Any assistance would be very helpful. Thanks-Gary

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

I had this problem a while back and I believe it was a result of a missing function in a .js file.

If memory serves me, the file was promptengine_calendar.js

This file is located by default in the following location:

\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\prompting\js

Unfortunately, I do not recall which function it was.

Here is a list of functions from that file. Maybe you can simply compare and see if one is missing.

function setDateField(formName, dateField)

function setInitialDate()

function buildTopCalFrame()

function buildBottomCalFrame()

function writeCalendar

function setToday()

function setYear()

function setCurrentMonth()

function setPreviousYear()

function setPreviousMonth()

function setNextMonth()

function setNextYear()

function getDaysInMonth()

function isLeapYear (Year)

function isFourDigitYear(year)

function getMonthSelect()

function createWeekdayList()

function buildCalParts()

function jsReplace(inString, find, replace)

function doNothing()

function makeTwoDigit(inValue)

function returnDate(inDay)

function ParseDateTimePrompt(inDate)

function ParseDatePrompt(inDate)

function INCreateCalendar(titleImagePath, closeImagePath)

function INwriteCalendar(event, Iwidth, Iheight,IscreenX,IscreenY)

function INcloseWin()

function dragStart(event, id)

function dragBegin(event)

function dragEnd(event)

function clickit()

function INnoClose()

function INopenDocumentKey()

The 2 functions in bold above ring a bell.

Regards,

Ray

Former Member
0 Kudos

FYI,

The Crystal date prompts on my workstation do not produce the error. A coworker that has just upgraded to IE8, does get the same script error. We both have the same version of CRXIR2 but I still have IE7. I'm guessing it may be some IE8 settings causing the error in his case. As was mentioned, entering the dates manually allow the report to run successfully. We haven't tried any of the suggested fixes yet. I'll have to find a test workstation with both Crystal and IE8 installed to experiment with.

Former Member
0 Kudos

So is there any response from SAP on this issue?

Former Member
0 Kudos

I copied the whole 3.5 directory from a working workstation and that fixed my issue.

Former Member
0 Kudos

This issue was fixed in Sevice Pack 6. [Crystal 11 R2 Service Packs|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm]

Edited by: Nathan Shaw on Mar 24, 2010 6:01 PM

Former Member
0 Kudos

Negative. I had service pack 5 installed at the calendar was working fine. I was having issues with Crystal randomly crashing without an error frequently so I uninstalled and re-installed Crystal. After installing up to SP6, my calendar now gives me this error.

Edited by: jeremysf on Jun 24, 2010 7:58 PM

Former Member
0 Kudos

Thank you your solution helps me

0 Kudos

Hi Guys, If this is still an issue please re-post. I found the article but it's for an older product and not this version. Likely it's a permission issue or a missing dependency. Run Process Monitor from www.sysinternals.com ( Microsoft ) and follow the files being loaded on a working PC and compare that to a non working one.

Former Member
0 Kudos

We are a Sage Reseller and recently upgraded our own MAS 200 to version 4.40 which comes bundled with Crystal version 11.5.8.826. We are receiving this same error on all machines in our office. My concern is upgrading our clients with this issue unresolved can be a real problem for custom reports. I did try the resolution provided in this thread but the issue continues to occur. And I can confirm this is not a rights issue as we all have admin rights through our network and local workstation.

Former Member
0 Kudos

Yes. Just upgraded from Crystal Reports R1 to R2. I am now experiencing problems with the calendar widget. If anyone knows of a hotfix please let me know...

Former Member
0 Kudos

I'm also having this exact issue, and it's sporadic. I will get the error then after a time it will work fine on the same machine.

Former Member
0 Kudos

Following SAP note might help.Note number is 1296625.

Business Objects Notes Get Help | Close

1296625 - Script error when clicked on Calender Icon in Crystal Reports Designer.

Language English Version 1 Validity: 20.01.2009 - active

Edit Print View Show change log

Content: Summary | Header Data | References

Symptom

Crystal Report which has Date Parameter, gives below eror while clicking on Calendar Icon as:

An error has occurred in the script on this page.

Line 79

Char 1

Error Object expected

Code 0

URL: file//C: \documentsandsettings\u702121

\local\settings\temp\prompting1.html

do you want to continue running scripts on this page?

Reproducing the Issue

Crystal Report Xi R2 Sp2

Windows server 2003

ODBC connection.

Resolution

Give full rights on temp folder. To do it follow the below steps.

Click on Start-> Run and type in %temp%.

Then click on UP button it will take you actual Temp folder.

Right click on the temp folder and then click on Security tab.

Then click on Add button one window will come up.

Click on Object Types and check the box for Computers and click on OK.

Then click on Locations and select the first option which is your machine name and click on OK

In "Enter the object names to select" text box type in NETWORK and click on "Check Names"

One window will come up, select "NETWORK SERVICE" and then click on "OK".

Again click on "OK" and select NETWORK SERVICE and give full control.

Again click on Add and in "Enter the object names to select" type in "LOCAL" and click on check names.

This will add LOCAL SERVICE in the text box, and then click on "OK".

Select LOCAL SERVICE and give full control.

Click on Apply and click on OK.

Rename the Prompting folder from non-working machine.

Copy and paste the Prompting folder from the server or from any other working machine which has the same version of Crystal Report installed on it to "C:\Program Files\Business Objects\Common\3.5\crystalreportviewer115 "

2. Clear the temp folder as much as possible.

Keywords

script error calender icon crystal reports temp folder

Header Data

Current Release Status Technical Review

Target Release Status Released Internally

Responsible Sumit Kanhe ( C5108743 )

Category Problem

Application Area BOJ-ERQ-CR

Product Version CRYSTAL REPORTS XI R2

Operating System WIN XP

References

Type Category ID Title

Business Objects Incident Document Source 012002523100009057792008 An error has occurred in the script

Former Member
0 Kudos

I really appreciate the response but unfortunately it did not resolve the issue. The reports will work fine if the dates are entered in manually it's just the calendar that causes the script error. We've attempted to run it on a server logged in as admin along with other workstations. It does not seem to be a permission type issue on the user level. Has anyone else have problem with it?

Former Member
0 Kudos

I am also having the same error when I try and use the calender pop-up. I also don't think it's user rights, as I am logged on as administrator. I believe it is a corrupt file.

I found a knowledge base article that discusses this error and provides a solution. Unfortunatetly, I can't find KB2184555 on the SAP support portal. The information in the article suggests that there has been a hotfix made for this problem.

Can anyone find the knowledge base article, or knows if a fix has been released?

Former Member
0 Kudos

I've tested this on 3 different machines at this site and all have this issue. Doesn't matter if were logged in as admin or not and it's only the calender functionality. Other features like exporting and other prompt types work fine.