locked
JavaScript error (Crystal Reports 2008 SP3, Visual Studio 2010) RRS feed

  • Question

  • User-1542763163 posted

    Hi everybody,
    I just migrated to Visual Studio 2010 and .NET Framework 4.0 (under Windows Server 2008).
     
    The old reports still open correctly in the browser, and I can scroll through the pages.
    Unfortunately, a JavaScript error appears (Expected ";"), and it doesn't allow me to print or export. This is a big limitation that I need to fix.

    Please notice that I use Crystal Reports 2008 SP3, and with .NET Framework 1.1 (under the same server) this JS error didn't show up.

    I checked the generated HTML source, I searched for the line of the error, and that's it:

    var __CRYSTALREPORTVIEWERONSUBMIT12=__doPostBack;__doPostBack=function(t,a){bobj.event.publish('saveViewState');__CRYSTALREPORTVIEWERONSUBMIT12(t,a);}function WebForm_OnSubmit() {
    bobj.event.publish('saveViewState');
    return true;
    }

    But the Crystalreportviewer12 directory is already set as virtual directory in IIS.

    And when I click on "print" or "export", the line of the error is the following:
    <form method="post" action="myPage.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">

    Any hint is appreciated...
    Thank you very much

    Monday, May 14, 2012 3:36 AM

Answers

  • User-1542763163 posted

    Hi Mark,
    I found out that Crystal Reports 2008 is not supposed to work with Visual Studio 2010.

    I eventually downloaded Crystal Reports for VS 2010 (available as free download from the SAP website), changed the references with the new DLLs and now everything work fine.

    Thank you for your assistance

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 15, 2012 5:48 AM

All replies

  • User-1640612721 posted

    Do the reports that are having problems have any date parameters?

    I had a problem a while ago as crystal was not encoding them correctly - I ended up working round this by reworking the sprocs that the reports were based on to take a string input (e.g. "20120514 14:46") - it's hacky but it was the only way I found that worked.

    Monday, May 14, 2012 9:46 AM
  • User-1542763163 posted

    Hi Mark,
    I found out that Crystal Reports 2008 is not supposed to work with Visual Studio 2010.

    I eventually downloaded Crystal Reports for VS 2010 (available as free download from the SAP website), changed the references with the new DLLs and now everything work fine.

    Thank you for your assistance

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 15, 2012 5:48 AM