delphi2005的报表问题,高分求助!

yueml 2005-12-01 11:51:09
本人用delphi2005提供的水晶报表来设计web程序,发现以下问题,
1、未使用水晶报表时,程序调试、运行一切正常
2、使用水晶报表后,将references 下 其对应库 的 copy local 的值改为true后,程序出现以下错误:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30311: Value of type 'System.Exception' cannot be converted to 'exception'.

Source Error:



Line 6: Dim PageUrl as String = Request.Path
Line 7: 'Obtain the Exception Object for the Error
Line 8: Dim ErrorInfo as Exception = Server.GetLastError()
Line 9: 'Construct Error Message to Write to NT Event Log
Line 10: Dim Message As String = "Url " & PageUrl


Source File: c:\inetpub\wwwroot\loca\global.asax Line: 8



Compiler Warning Messages:
Warning: BC40004: sub 'Application_Error' conflicts with sub 'Application_Error' in the base class 'TGlobal' and so should be declared 'Shadows'.
Source Error:

c:\inetpub\wwwroot\loca\global.asax

Line 2: <%@ Import Namespace="System.Diagnostics" %>
Line 3: <script language="VB" runat=server>
Line 4: Sub Application_Error(Sender As Object, E as EventArgs)
Line 5: 'Obtain the URL of the Request
Line 6: Dim PageUrl as String = Request.Path





Show Detailed Compiler Output:


C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\infragistics.webui.shared.v5.1\5.1.20051.37__7dd5c3163f2cd0cb\infragistics.webui.shared.v5.1.dll" /R:"c:\winnt\assembly\gac\crystaldecisions.crystalreports.engine\9.1.5000.0__692fbea5521e1304\crystaldecisions.crystalreports.engine.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\borland.dbkasp\9.0.0.1__b0524c541232aae7\borland.dbkasp.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\loca\6a31ba95\9474187\assembly\dl2\b74e6a61\00507ae4_1db8c401\borland.data.web.dll" /R:"c:\winnt\assembly\gac\infragistics.ultrachart.resources.v5.1\5.1.20051.37__7dd5c3163f2cd0cb\infragistics.ultrachart.resources.v5.1.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\loca\6a31ba95\9474187\assembly\dl2\eaf2b51f\da6f7dcf_28f6c501\loca.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\loca\6a31ba95\9474187\wvx_tukp.dll" /D:DEBUG=1 /debug+ "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\loca\6a31ba95\9474187\wvx_tukp.0.vb"


Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

c:\inetpub\wwwroot\loca\global.asax(4) : warning BC40004: sub 'Application_Error' conflicts with sub 'Application_Error' in the base class 'TGlobal' and so should be declared 'Shadows'.

Sub Application_Error(Sender As Object, E as EventArgs)
~~~~~~~~~~~~~~~~~
c:\inetpub\wwwroot\loca\global.asax(8) : error BC30311: Value of type 'System.Exception' cannot be converted to 'exception'.

Dim ErrorInfo as Exception = Server.GetLastError()
~~~~~~~~~~~~~~~~~~~~~





Show Complete Compilation Source:


Line 1: '------------------------------------------------------------------------------
Line 2: ' <autogenerated>
Line 3: ' This code was generated by a tool.
Line 4: ' Runtime Version: 1.1.4322.573
Line 5: '
Line 6: ' Changes to this file may cause incorrect behavior and will be lost if
Line 7: ' the code is regenerated.
Line 8: ' </autogenerated>
Line 9: '------------------------------------------------------------------------------
Line 10:
Line 11: Option Strict Off
Line 12: Option Explicit On
Line 13:
Line 14: Imports Microsoft.VisualBasic
Line 15: Imports System
Line 16: Imports System.Collections
Line 17: Imports System.Collections.Specialized
Line 18: Imports System.Configuration
Line 19: Imports System.Diagnostics
Line 20: Imports System.Text
Line 21: Imports System.Text.RegularExpressions
Line 22: Imports System.Web
Line 23: Imports System.Web.Caching
Line 24: Imports System.Web.Security
Line 25: Imports System.Web.SessionState
Line 26: Imports System.Web.UI
Line 27: Imports System.Web.UI.HtmlControls
Line 28: Imports System.Web.UI.WebControls
Line 29:
Line 30: Namespace ASP
Line 31:
Line 32: <System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()> _
Line 33: Public Class Global_asax
Line 34: Inherits Global.TGlobal
Line 35:
Line 36: Private Shared __initialized As Boolean = false
Line 37:
Line 38:
Line 39: #ExternalSource("c:\inetpub\wwwroot\loca\global.asax",3)
Line 40:
Line 41: Sub Application_Error(Sender As Object, E as EventArgs)
Line 42: 'Obtain the URL of the Request
Line 43: Dim PageUrl as String = Request.Path
Line 44: 'Obtain the Exception Object for the Error
Line 45: Dim ErrorInfo as Exception = Server.GetLastError()
Line 46: 'Construct Error Message to Write to NT Event Log
Line 47: Dim Message As String = "Url " & PageUrl
Line 48: Message = Message & " Error: "
Line 49: Message = Message & ErrorInfo.ToString
Line 50: 'NT Event Log Name to Write Message To
Line 51: Dim LogName As String = "MyCustomLog"
Line 52: 'Create Event Log if It Doesn’t Exist
Line 53: If (Not EventLog.SourceExists(LogName)) Then
Line 54: EventLog.CreateEventSource(LogName, LogName)
Line 55: End if
Line 56: 'Fire off to Event Log
Line 57: Dim Log as New EventLog
Line 58: Log.Source = LogName
Line 59: Log.WriteEntry(Message, EventLogEntryType.Error)
Line 60: End Sub
Line 61:
Line 62: #End ExternalSource
Line 63:
Line 64: Public Sub New()
Line 65: MyBase.New
Line 66: If (ASP.Global_asax.__initialized = false) Then
Line 67: ASP.Global_asax.__initialized = true
Line 68: End If
Line 69: End Sub
Line 70: End Class
Line 71: End Namespace
Line 72:





--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

3、将copy local 选项改过false后,并将程序 bin目录下对应的库删除,程序一切正常,目前本人不知如何解决这一问题,请哪位高手帮助解决!在线等
...全文
198 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
super_kong 2005-12-28
  • 打赏
  • 举报
回复
不用设置copy local !我们项目就是没有设置,一切正常,问题不在这。
确保你的水晶报表已注册!
ywx2008 2005-12-12
  • 打赏
  • 举报
回复
看看!
leuriat 2005-12-11
  • 打赏
  • 举报
回复
学习
leuriat 2005-12-11
  • 打赏
  • 举报
回复

1,978

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧