Link to home
Start Free TrialLog in
Avatar of regsamp
regsamp

asked on

Parser Error on Intranet

We are getting the following Parser Error message when trying to run a report on our Intranet. Any assistance offered would be greatly appreciated.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'DAWNNet.PermitRpt'.

Source Error:


Line 1:  <%@ Register TagPrefix="uc1" TagName="Header" Src="../Header.ascx" %>
Line 2:  <%@ Page Language="vb" AutoEventWireup="false" Codebehind="PermitStatusRpt.aspx.vb" Inherits="DAWNNet.PermitRpt" %>
Line 3:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 4:  <HTML >
 

Source File: /PermitStatus/PermitStatusRpt.aspx    Line: 2


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1022
Avatar of Big Monty
Big Monty
Flag of United States of America image

it would help to see the code for PermitStatusRpt.aspx.vb
Avatar of regsamp
regsamp

ASKER

Posting now:
Imports System.Data
Imports System.Data.SqlClient

Public Class PermitRpt
    Inherits System.Web.UI.Page
    Protected WithEvents dgrdClients As System.Web.UI.WebControls.DataGrid
    Protected SDASearch As SqlDataAdapter
    Protected DSSearch As DataSet
    Protected dtItems As DataTable
    Protected SQLConn As SqlConnection
    Protected dRow As DataRow

    Protected sPermitType As String
    Protected sErr As String

    Private oSvrFunc As New SvrFunctions
    Protected sPJNameID As String = ""
    Protected sProjectName As String = ""
    Protected sProjNum As String = ""
    Protected sPSJobNum As String = ""
    Protected sJobName As String = ""
    Protected sProjectDesc As String = ""
    Protected sNotes As String = ""
    Protected sCustCopy As String = ""

    Protected nRowsPerPage As Int16 = 14
    Protected nRowsThisPage As Int16 = 0
    Protected i As Int32

    Protected nCurRow As Int16 = 0

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim DWMA As New DWMAGlobals()
        Dim Usuario As New DWMAUser()
        SQLConn = New SqlConnection(DWMA.ConnectionString)

        If Not IsPostBack Then
            Usuario.PullUserInfo(Page.User.Identity.Name)
            If Usuario.AccessViewPermits Or Usuario.AccessGod Then
                sPJNameID = oSvrFunc.GetRqFldVal(Me, "PJNameID")
                sProjNum = oSvrFunc.GetRqFldVal(Me, "ProjNum")
                sPSJobNum = oSvrFunc.GetRqFldVal(Me, "PSJobNum")
                sProjectDesc = oSvrFunc.GetRqFldVal(Me, "ProjectDesc")
                sCustCopy = oSvrFunc.GetRqFldVal(Me, "CustCopy")

                GetData()
            Else
                Response.Redirect("../../Error.aspx?page=/PermitStatus/PermitStatusRpt.aspx&type=access")
            End If
        End If

    End Sub

    Private Sub GetData()
        Dim strSQL As String
        Dim oPJName As New daProjectName
        Dim dtPJName As DataTable, drPJName As DataRow
        Dim sAND As String = " WHERE"

        If sPJNameID <> "" Then
            dtPJName = oPJName.GetProject(sPJNameID)
            drPJName = dtPJName.Rows(0)
            sProjectName = drPJName("Name").ToString()
        End If

        strSQL = "Select PermitStatus.ID " & _
        ", PermitStatus.Active" & _
        ", PermitStatus.PM" & _
        ", PermitStatus.PM_ID" & _
        ", PermitStatus.PMA_ID" & _
        ", PermitStatus.ProjectID" & _
        ", PermitStatus.ProjNum" & _
        ", PermitStatus.ItemTypeID" & _
        ", PermitItemTypesMstr.Name AS ItemType" & _
        ", PermitStatus.AgencyTypeID" & _
        ", PermitOrgTypesMstr.Name As AgencyType" & _
        ", PermitStatus.Agency" & _
        ", PermitStatus.Principal" & _
        ", PermitStatus.Prin_ID" & _
        ", PermitStatus.Permittee" & _
        ", PermitStatus.Project" & _
        ", PermitStatus.ProjectDesc" & _
        ", PermitStatus.PermitType" & _
        ", PermitStatus.ApplicationNum" & _
        ", PermitStatus.PermitNum" & _
        ", PermitStatus.Submitted" & _
        ", PermitStatus.Issued" & _
        ", PermitStatus.Expires" & _
        ", PermitStatus.RAIReceived" & _
        ", PermitStatus.RAIResubmitted" & _
        ", PermitStatus.DWMACertified" & _
        ", PermitStatus.PreAppDate" & _
        ", PermitStatus.PreConDate" & _
        ", PermitStatus.Notes" & _
        ", PermitStatus.PartialCert1" & _
        ", PermitStatus.PartialCert2" & _
        ", PermitStatus.PartialCert3" & _
        ", PermitStatus.PartialCert4" & _
        ", PermitStatus.FullCert" & _
        ", PermitStatus.Certified" & _
        ", PermitStatus.PBO" & _
        ", PermitStatus.NPR" & _
        ", PermitStatus.CertAgency" & _
        ", PermitStatus.AgencyRelease" & _
        ", PermitStatus.Revised" & _
        ", PermitStatus.Comments" & _
        ", PermitStatus.CertNotes" & _
        ", PermitStatus.PSJobNum" & _
        ", PermitStatus.PJNameID"

        strSQL = strSQL & " From ((PermitStatus LEFT JOIN PermitItemTypesMstr ON PermitStatus.ItemTypeID = PermitItemTypesMstr.ID)" & _
        " LEFT JOIN PermitOrgTypesMstr ON PermitStatus.AgencyTypeID = PermitOrgTypesMstr.ID)"

        If sPJNameID <> "" Then
            strSQL = strSQL & sAND & " PJNameID = " & sPJNameID
            sAND = " AND"
        End If

        If sProjNum <> "" Then
            strSQL = strSQL & sAND & " ProjNum = '" & sProjNum & "'"
            sAND = " AND"
        End If

        If sPSJobNum <> "" Then
            strSQL = strSQL & sAND & " PSJobNum = '" & sPSJobNum & "'"
            sAND = " AND"
        End If

        If sProjectDesc <> "" Then
            strSQL = strSQL & sAND & " ProjectDesc = '" & sProjectDesc & "'"
            sAND = " AND"
        End If

        strSQL = strSQL & " ORDER BY Project, ProjectDesc, DateCreated"

        Try
            SDASearch = New SqlDataAdapter(strSQL, SQLConn)
            DSSearch = New DataSet
            dtItems = New DataTable
            SDASearch.Fill(DSSearch)
            dtItems = DSSearch.Tables(0)
            If dtItems.Rows.Count > 0 Then
                dRow = dtItems.Rows(0)
                sJobName = dRow("Project").ToString()
            End If
            strSQL = ""

            'If dgrdClients.Items.Count < 1 Then
            'Response.Redirect("../../Error.aspx?page=/Accounting/Clients/Clients.aspx&problem=No+records+found")
            'End If
        Catch e As SqlException
            sErr = "Error Getting Permit Status Report: " & e.Message
            'Response.Redirect("../../Error.aspx?page=/Accounting/Clients/Clients.aspx?problem=" & e.Message)
        End Try
    End Sub

    Protected Function GetFldVal(ByVal dRow As DataRow, ByVal sField As String, ByVal sType As String) As String
        Dim sVal As String

        If sField = "PermitType" Then
            sVal = dRow("ItemType").ToString()
            If sVal <> "" Then
                GetFldVal = dRow("ItemType")
            Else
                GetFldVal = dRow("PermitType")
            End If
        ElseIf sField = "AgencyType" Then
            sVal = dRow("AgencyType").ToString()
            If sVal <> "" Then
                GetFldVal = dRow("AgencyType")
            Else
                GetFldVal = "&nbsp;"
            End If
        Else
            sVal = oSvrFunc.GetFld(dRow, sField, sType)
            If sVal = "" Then
                sVal = "&nbsp;"
            End If
            GetFldVal = sVal
        End If
    End Function


    Function FixSQLStr(ByVal sVal As String)
        Dim Pos1 As Integer
        Pos1 = InStr(sVal, "'")
        Do Until Pos1 = 0
            sVal = Left(sVal, Pos1) & "'" & Mid(sVal, Pos1 + 1)
            Pos1 = InStr(Pos1 + 2, sVal, "'")
        Loop
        FixSQLStr = sVal
    End Function
End Class

Open in new window

SOLUTION
Avatar of Big Monty
Big Monty
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
Avatar of regsamp

ASKER

Okay, thank you.
ASKER CERTIFIED SOLUTION
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