on 07-10-2009 2:54 PM
Hello,
I'm using the crystalreportviewer to display a report in our web application. On most environments we've been using (for development and testing) it's all working fine.
However, on my development machine and now on one of our testing environments, we get the javascript error once the report had loaded in the viewer. It renders the buttons (print, export, paging. etc) useless.
Has anyone seen this before and know how to fix it?
We're using Crystal Reports Server Embedded 2008, .net 3.5 and the crystalreportviewers12 virtual directory is a sub-directory of the website virtual directory.
The testing machine is a clean build of Windows 2003. I'm running Windows XP on my machine. Other machines with these configurations appear to be OK.
Any ideas?
Many thanks,
Nicola
Some further information:
When I look at the source code for the page, I can see that the following code has been added by the viewer:
var theForm = document.forms['RunCrystalReport'];
if (!theForm) {
theForm = document.RunCrystalReport;
}
// and a post back function which i don't seem to be able to post here!
However, somehow it doesn't find this. If i copy this into my aspx file (in the <head>) then the page renders correctly, with no error.
On most of out machines this isn't necessary. What could be the difference in the configurations? What do I need to do so I don't have to manually add this code?
Thanks,
Nicola
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Nicola;
Try the resolution from this note:
[Undefined|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233383331333133303331%7D.do]
Regards,
Jonathan
Hi Jonathan,
We already have that line in the web.config - the viewer draws correctly, but just with the javascript error.
Also the error in the symptons of the note is different from our error. We don't get the error on all environments, just some, but as far as I can tell, they are all configured the same. (apart from being different operating systems.
Thanks.
Nicola
Looks like I've been able to solve this problem.
It's because I had another javascript include file declared in the header (we use it to display messages if theres an error or some other problem displaying the report). If I remove it, then the report displays correctly and the javascript error does NOT occur.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.