Link to home
Start Free TrialLog in
Avatar of CyberUnDead
CyberUnDead

asked on

Crystal Report XI Release 2 CSS Error

I have an ASP.NET web application developed in VB.NET that contains a Master Page.  On this Master I have a Multiview control which is comprised of two different views "View1" and "View2."  On View2 I have a CrystalReportViewer control which references Crystal Reports 11.5 (aka XI Release 2).

My operating system is Vista Ultimate and I have updated Visual Studio 2005 with SP1 (KB926601) and the following updates as well KB937061, KB932232.  I have Crystal Developer Edition XI with the Release 2 update installed.

When I bind a report the CrystalReportViewer I am now receiving the following error "Error: Cannot use a leading .. to exit above the top directory"  which I am positive I did not receive until after I installed the Crystal Release XI Release 2 update.

When viewing the generated source from the webpage this line is the troublemaker:

<LINK rel="stylesheet" type="text/css" href="../../aspnet_client/System_Web/2_0_50727/crystalreportviewers115/css/default.css"><table id="ctl00_CrystalReportViewer1" cellpadding="0" cellspacing="0" style="display:inline-block;background-color:White;height:965px;width:677px;">

I have reinstalled both Visual Studio 2005 and Crystal Reports XI Developers Edition and the problem persists.  

Any ideas Experts?
Avatar of Mike McCracken
Mike McCracken

Can you change the code to use a static link to the CSS page rather than a relative link?

I suspect you are in a directory only 1 deep not 2 deep so the /../..  is trying to move above the root
mlmcc
Avatar of CyberUnDead

ASKER

mlmcc:

Please excuse my lack of understanding.  How do I change that particular line?  I did not write that code as it does not appear in my source markup but I assume is generated by VS.NET.
You could simply let Crystal/VB.Net generate it then edit it to work.

Otherwise, you need to come up with a method to ensure you are in the correct directory when you run the application.

mlmcc
Have you installed this application in an unusual spot?  The normal link should be href="/aspnet_client/System_Web/.....     That's assuming you're in a virtual directory under inetpub/wwwroot

I believe manually editing it Source view should solve this issue but I'm curious as to what caused it

frodoman
Experts:

Sorry to be so dense but where can I make this change?  The line that I added to the markup is below:

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />

The only CSS reference in my code is valid and is in the same Master page as the control above.
The markup is below:

    <link href="Style/Master.css" rel="stylesheet" type="text/css" />

If I do a Ctrl+F and search for "text/css" I only get the above reference as a hit.

frodoman:


frodoman:  

  I am receive this error on my development machine (sans IIS) and I installed VS.NET 2005 and Crystal Developer Edition XI to the default locations.  On my test server I used the Crystal 11.5 merge module to build a MSI.  This installs to root of IIS.
I should clarify that I believe the offending code is generated during the build/run process.  This is why I am uncertain what you mean by changing in it the source view.
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
frodoman:

I believe you are correct that this is tied to Crystal Reports.  As this problem still exists in Visual Studio 2008 Beta 2 with Crystal Reports XI Release 2.

To correct the "error" I changed the reference of my assemblies under my web.config and the markup Master page that references the Crystal Report Viewer control from version 11.5.3700.0 to 10.2.3600.0.

Though I am afraid now my deployment (web setup) project is broke as I now need to ensure that 10 not 11.5 is installed.

You'll have to edit your deployment project and remove the 11.5 references and replace them with the 10 merge modules for VS2005.

frodoman
I notice that the comment dates on this issue are from Oct/2007.  I too encountered this problem and a recent search of the Crystal knowledge base indicated that this is a known problem with XI Release 2 Service Pack 2. Crystal's solution was to roll back to SP1.  However, I noticed that on one server my reports work fine and that had SP3 installed.  The server with the report failures indeed had SP2.  I upgraded that server to SP3 and the problem was resolved.  For reference see Crystal Reports Knowledge base article 5861128