Updating/Saving changes to table

Posted by: lg_sony_27 on 8 September 2017, 1:14 pm EST

  • Posted 8 September 2017, 1:14 pm EST

    hi! how do i update my table with any changes the user type in my spreadsheet! I have this on formload in vb2005.


    Private Sub frmGrade_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    cnn.ConnectionString = "Data Source=.\sqlexpress;Initial Catalog=FarPoint;Integrated Security=True"


    If cnn.State = ConnectionState.Closed Then cnn.Open()


    cmd = cnn.CreateCommand


    cmd.CommandText = "SELECT LastName + ', ' + FirstName + ' ' + MiddleName as StudentName, " & _


    "Q1, Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10,TQ FROM tbl1stG"


    da.SelectCommand = cmd


    da.Fill(ds, "tblMaster")


    cnn.Close()


    'bind fpspread1 to datasource


    FpSpread1.DataSource = ds.Tables("tblMaster")


    ' Set the number of rows in the headers.


    FpSpread1.Sheets(0).ColumnHeaderRowCount = 7


    'set column width to 200 pixels.


    FpSpread1.Sheets(0).Columns(0).Width = 200


    FpSpread1.Sheets(0).Columns(1).Width = 25


    FpSpread1.Sheets(0).Columns(2).Width = 25


    FpSpread1.Sheets(0).Columns(3).Width = 25


    FpSpread1.Sheets(0).Columns(4).Width = 25


    FpSpread1.Sheets(0).Columns(5).Width = 25


    FpSpread1.Sheets(0).Columns(6).Width = 25


    FpSpread1.Sheets(0).Columns(7).Width = 25


    FpSpread1.Sheets(0).Columns(8).Width = 25


    FpSpread1.Sheets(0).Columns(9).Width = 25


    FpSpread1.Sheets(0).Columns(10).Width = 26


    FpSpread1.Sheets(0).Columns(11).Width = 28


    ' Span the header cells as needed.


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(0, 0, 1, 1)


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(1, 0, 1, 1)


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(2, 0, 1, 1)


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(3, 0, 1, 1)


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(4, 0, 1, 10)


    FpSpread1.Sheets(0).AddRowHeaderSpanCell(6, 0, 2, 2)


     


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(0, 5, 1, 3)


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(1, 5, 1, 3)


    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(2, 5, 1, 3)


    End Sub


    I have button to save/update any changes made in my spreadsheet (fpspread1). I tried an sql command to update my table but im not seeing any update in my table. this is what i have so far in my save button.


    I tried this but its not working.


    If cnn.State = ConnectionState.Closed Then cnn.Open()


    cmd = cnn.CreateCommand


    cmd.CommandText = "UPDATE tbl1stG SET Q1=Q1"


    da.UpdateCommand = cmd


    da.UpdateCommand.ExecuteNonQuery()


    ds.AcceptChanges()


    cnn.Close()


     


    This one also.


    Try


    da.Update(ds, "tbl1stG")


    ds.AcceptChanges()


    FpSpread1.ActiveSheet.GetDataView(True)


    Catch ex As Exception


    End Try


    Help please??

  • Replied 8 September 2017, 1:14 pm EST

    Im using sql sever 2005 express. can you give example on how to do it using sql?


    thanks

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    In the following code you are binding the Spread to a DataTable object.

     
    FpSpread1.DataSource = ds.Tables("tblMaster")

     You either need to bind to a DataSet object:

     
    FpSpread1.DataSource = ds
    FpSpread1.DataMember = "tblMaster"

     Or, get the DataTable object out of the DataSource property instead of a DataSet object.

     
    ds = CType(FpSpread1.Sheets(0).DataSource, System.Data.DataTable)
     
  • Replied 8 September 2017, 1:14 pm EST

    hello scotts. Can yo give me some code on how to do it? I've been solving this for more than a week now. The error points to this line of code

    ds = CType(FpSpread1.Sheets(0).DataSource, System.Data.DataSet)

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Since you are binding the Spread to a DataTable object, when you query the DataSource of the Spread, you need to assign this to a DataTable object.

  • Replied 8 September 2017, 1:14 pm EST

    im getting this error after clicking button2.  
    Unable to cast object of type 'System.Data.DataTable' to type 'System.Data.DataSet'.
    so far this is what i have.

    Imports System.Data.SqlClient

    Public Class frmGrade

    Dim cnn As New SqlConnection

    Dim cmd As New SqlCommand

    Dim da As New SqlDataAdapter

    Dim ds As New DataSet

    Dim c As Integer

    Private Sub frmGrade_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    cnn.ConnectionString = "Data Source=.\sqlexpress;Initial Catalog=FarPoint;Integrated Security=True"

    If cnn.State = ConnectionState.Closed Then cnn.Open()

    cmd = cnn.CreateCommand

    cmd.CommandText = "SELECT LastName + ', ' + FirstName + ' ' + MiddleName as StudentName, " & _

    "Q1, Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10,TQ FROM tbl1stG"

    da.SelectCommand = cmd

    da.Fill(ds, "tbl1stG")

    cnn.Close()

    'bind fpspread1 to datasource

    FpSpread1.DataSource = ds.Tables("tbl1stG")

    ' Set the number of rows in the headers.

    FpSpread1.Sheets(0).ColumnHeaderRowCount = 7

    'set column width to 200 pixels.

    FpSpread1.Sheets(0).Columns(0).Width = 200

    FpSpread1.Sheets(0).Columns(1).Width = 25

    FpSpread1.Sheets(0).Columns(2).Width = 25

    FpSpread1.Sheets(0).Columns(3).Width = 25

    FpSpread1.Sheets(0).Columns(4).Width = 25

    FpSpread1.Sheets(0).Columns(5).Width = 25

    FpSpread1.Sheets(0).Columns(6).Width = 25

    FpSpread1.Sheets(0).Columns(7).Width = 25

    FpSpread1.Sheets(0).Columns(8).Width = 25

    FpSpread1.Sheets(0).Columns(9).Width = 25

    FpSpread1.Sheets(0).Columns(10).Width = 26

    FpSpread1.Sheets(0).Columns(11).Width = 28

    ' Span the header cells as needed.

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(0, 0, 1, 1)

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(1, 0, 1, 1)

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(2, 0, 1, 1)

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(3, 0, 1, 1)

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(4, 0, 1, 10)

    FpSpread1.Sheets(0).AddRowHeaderSpanCell(6, 0, 2, 2)

     

     

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(0, 5, 1, 3)

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(1, 5, 1, 3)

    FpSpread1.Sheets(0).AddColumnHeaderSpanCell(2, 5, 1, 3)

     

    ' Set the labels as needed -- using the Label property or

    ' the cell Text property.

    FpSpread1.Sheets(0).ColumnHeader.Cells(0, 0).Text = "Test Header"

    FpSpread1.Sheets(0).ColumnHeader.Cells(1, 0).Text = "Test Header"

    FpSpread1.Sheets(0).ColumnHeader.Cells(2, 0).Text = "Test Header"

    FpSpread1.Sheets(0).ColumnHeader.Cells(4, 0).Text = "Test Header"

    FpSpread1.Sheets(0).ColumnHeader.Cells(0, 5).Text = "Test Header: "

    FpSpread1.Sheets(0).ColumnHeader.Cells(1, 5).Text = "Test Header: "

    FpSpread1.Sheets(0).ColumnHeader.Cells(2, 5).Text = "Test Header: "

    End Sub

     

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    'Get the data from Spread

    Dim ds As System.Data.DataSet

    ds = CType(FpSpread1.Sheets(0).DataSource, System.Data.DataSet)

    'Save the changes back to the database

    Try

    da.Update(ds, "tbl1stG")

    ds.AcceptChanges()

    FpSpread1.ActiveSheet.GetDataView(True)

    Catch

    End Try

    End Sub

     
  • Replied 8 September 2017, 1:14 pm EST

    You need to get the data from the spread first...

    Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
          'Get the data from Spread
          Dim ds As System.Data.DataSet
          ds = CType(fpSpread1.Sheets(0).DataSource, System.Data.DataSet)
          'Save the changes back to the database
          Try
            oleDbDataAdapter1.Update(ds, "Customers")
            ds.AcceptChanges()
            fpSpread1.ActiveSheet.GetDataView(True)
          Catch
          End Try
        End Sub
  • Replied 8 September 2017, 1:14 pm EST

    I removed other codes from my project to make it more clearer and here is my current code now. I am not getting any error messages right now but then when I checked my table, its not saving/updating anything. is it possible if you can zip a sample prog and attached it here?


    Imports System.Data.SqlClient


    Public Class frmGrade


    Dim cnn As New SqlConnection


    Dim cmd As New SqlCommand


    Dim da As New SqlDataAdapter


    Dim ds As New DataSet


    Private Sub frmGrade_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    cnn.ConnectionString = "Data Source=.\sqlexpress;Initial Catalog=FarPoint;Integrated Security=True"


    If cnn.State = ConnectionState.Closed Then cnn.Open()


    cmd = cnn.CreateCommand


    cmd.CommandText = "SELECT * FROM tbl1stG"


    da.SelectCommand = cmd


    da.Fill(ds, "tbl1stG")


    dg.DataSource = ds.Tables("tbl1stG")


    cnn.Close()


    'bind fpspread1 to datasource


    'FpSpread2.DataSource = ds.Tables("tbl1stG")


    FpSpread2.DataSource = ds


    FpSpread2.DataMember = "tbl1stG"


    End Sub


     


    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click


    'Get the data from Spread


    ds = CType(FpSpread2.Sheets(0).DataSource, System.Data.DataSet)


    'Save the changes back to the database


    Try


    ds.AcceptChanges()


    da.Update(ds.Tables("tbl1stG")


    FpSpread2.ActiveSheet.GetDataView(True)


    Catch


    End Try


    End Sub


    End Class

  • Replied 8 September 2017, 1:14 pm EST

    I'm having this same problem and I added this code:


    ds.AcceptChanges()


    da.Update(ds)


    To my save button but it doesn't have any effect.  And I do have my UpdateCommand properly created on my dataadapter.  I added a messagebox to display if ds.HasChanges returns true and it doesn't.  So for whatever reason if you type data into the FPSpread cells, they don't register as changes for the dataset that is currently the datasource for the spread.

  • Replied 8 September 2017, 1:14 pm EST

    got it working already! Thanks!
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    This code is done in the DataAdapter. When you call the Update method of the DataAdapter, all updated rows are sent thru the SQL command set to the UpdateCommand property to update the database. Since, you have not set this up, nothing is being saved. You may want to look at creating your SQLDataAdapter at design time, so you can let Visual Studio set up all the properties that need to be set up for binding to a database.

  • Replied 8 September 2017, 1:14 pm EST

    what do you mean by "Have you set up the UpdateCommand property of your DataAdapter?". How do I set it up? The code i posted are the only thing i did and what i have in my project now. I have also switch the da.update and ds.acceptchanges already but nothing is happening still 
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    I do not have a sample to send to you, but we do have a Training Video on our web site entitled Getting Started with Spread for Windows Forms. It shows how to handle databinding in the Spread. For your code in this code block, you need to switch the first two lines of code and you do not need the third line of code.

     
    ds.AcceptChanges() 'switch with the line below

    da.Update(ds.Tables("tbl1stG")
    FpSpread2.ActiveSheet.GetDataView(True) 'not needed



     Have you set up the UpdateCommand property of your DataAdapter? If you have not, then the Update method will not do anything.
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    FarPoint was on holiday yesterday and thus the reason this was not answered yesterday. The bound DataSource to Spread (DataSet/DataTable) has an EndEdit method you would need to call to update the DataRow RowState.

     
    	Dim dt As DataTable = FpSpread1.Sheets(0).DataSource
    dt.Rows(FpSpread1.Sheets(0).GetModelRowFromViewRow(FpSpread1.Sheets(0).ActiveRowIndex)).EndEdit()
     
  • Replied 8 September 2017, 1:14 pm EST

    Hello?  Anybody there?


    Yes, I cannot require the user to click off the editted row.  That simply will not be acceptable.

  • Replied 8 September 2017, 1:14 pm EST

    I'm pretty new to this.  How do I call EndEdit on the bound datarow?

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    You need to call the AcceptChanges method after updating the DataAdapter with the changes. Switch those two lines of code and it should work. Calling AcceptChanges resets the RowState of all DataRows to Unchanged. You will need to click off the row with the last change to a new row to have the EndEdit of the bound DataRow called to update the RowState to Modified. Or you can programatically call the EndEdit method on the bound DataROw if you do not want to require your user to click off the row.

  • Replied 8 September 2017, 1:14 pm EST

    Alright, that works now.  Thanks for the help.  Changes to the spread now successfully modify existing records.  But now I need to know how to add and delete records.
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Just as you added an UpdateCommand property to your data adapter, you can add the InsertCommand and DeleteCommand property to handle the adding/inserting and deleting records.

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Is your UpdateCommand statement using the primary key for updating?


    I am not sure of any way to make fetching and saving data from/to a database and DataAdapter any faster.

  • Replied 8 September 2017, 1:14 pm EST

    I am using a primary key in my table.


    I have another question regarding saving. Is there any other way to make the fetching and saving of data faster?

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    I would suggest reading the following article from MSDN online about handling concurrency issues. My guess from what I read in the article is that your UpdateCommand statement is not using the PrimaryKeys in your table (if you have any promary keys set) correctly.

  • Replied 8 September 2017, 1:14 pm EST

    Recently I got this problem whenever I click my save button. I got ConcurrencyException. I've  attached the error message here.


    Steps to reproduce the error


    1. run the program


    2. enter records


    3. click save button


    4. enter records


    5. click save button


    on the second time the save button is clicked the error will display.


    my code in save button does not include the code you have here.


    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click


    SuspendLayout()


    'Get the data from Spread


    dsGrade = CType(FpSpread1.ActiveSheet.DataSource, System.Data.DataSet)


    'Save the changes back to the database


    Try


    daGrade.Update(dsGrade.Tables("tblEnrol"))


    dsGrade.AcceptChanges()


    FormatSpread()


    FormatSpread1()


    formatspread2()


    FormatSpread3()


    formatspread4()


    FormatSpread5()


    formatspread7()


    formatspread12()


    FormatSpread17()


    MessageBox.Show("Changes are comitted to the database")


    Catch ex As Exception

    MessageBox.Show(ex.ToString)


    End Try


    ResumeLayout()


    End Sub


     


    Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click


    SuspendLayout()


    btnDisplay.Enabled = False


    FpSpread1.DataSource = Nothing


    FpSpread1.Reset()


    myformat()


    cnn.ConnectionString = "Data Source=.\sqlexpress;Initial Catalog=MYDB;Integrated Security=True"


    If cnn.State = ConnectionState.Closed Then cnn.Open()


    cmdGrade = cnn.CreateCommand


    cmdGrade.CommandText = "SELECT DISTINCT * FROM tblEnrol WHERE SectionName = '" & cboSection.Text & "' AND SubjectName = '" & cboSubjectName.Text & "' AND YearLevel = '" & cboYearLevel.Text & "'"


    daGrade.MissingSchemaAction = MissingSchemaAction.AddWithKey


    dsGrade.Clear()


    daGrade.SelectCommand = cmdGrade

    daGrade.Fill(dsGrade, "tblEnrol")


    cnn.Close()


    Dim mysort() As FarPoint.Win.Spread.SortInfo = New FarPoint.Win.Spread.SortInfo() {New FarPoint.Win.Spread.SortInfo(5, False), New FarPoint.Win.Spread.SortInfo(2, True), New FarPoint.Win.Spread.SortInfo(3, True)}


              more codes here....


    ResumeLayout()


    End Sub



  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Your DataAdapter control has an UpdateCommand property that is the SQL command for updating te rows in the bound DataSource. I wanted to make sure in the WHERE clause you were using the primary key object.


    adapter.UpdateCommand = New SqlCommand( _
            "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = " & _
            "@CompanyName WHERE CustomerID = @oldCustomerID", connection)


    I understand what you mean by fetching and saving. There is the time to fill the bound DataSet from the database through the DataAdapter (which is probably taking the most time). Then there is the time to bind the DataSource to the Spread, which should not take much time at all. Which step is taking the long time that you want to make faster? My guess is the first, and my answer before was I do not have a way to make the fetching of records to fill the bound DataSource faster.

  • Replied 8 September 2017, 1:14 pm EST

    I am not sure what you mean by "Is your UpdateCommand statement using the primary key for updating?" My save button is like this


    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click


    'SuspendLayout()


    'Get the data from Spread


    ''dsGrade = CType(FpSpread1.Sheets(0).DataSource, System.Data.DataSet)


    dsGrade = CType(FpSpread1.ActiveSheet.DataSource, System.Data.DataSet)


    'Dim ds As DataSet = FpSpread1.ActiveSheet.DataSource


    'Save the changes back to the database


    Try


    daGrade.Update(dsGrade.Tables("tblEnrol"))


    dsGrade.AcceptChanges()


    FormatSpread()


    FormatSpread1()


    formatspread2()


    FormatSpread3()


    formatspread4()


    FormatSpread5()


    formatspread7()


    formatspread11()


    MessageBox.Show("Changes are comitted to the database")


    Catch ex As Exception


    MessageBox.Show(ex.ToString)


    End Try


    ' ResumeLayout()


    End Sub


     


    What I mean by fetching is when I get the record from the table and display it in spread and then save back any changes. 


    SuspendLayout()


    cnn.ConnectionString = "Data Source=.\sqlexpress;Initial Catalog=NDDU-IBED;Integrated Security=True"


    If cnn.State = ConnectionState.Closed Then cnn.Open()


     


    cmdGrade = cnn.CreateCommand


    cmdGrade.CommandText = "SELECT DISTINCT * FROM tblEnrol WHERE SectionName = '" & cboSection.Text & "' AND SubjectName = '" & cboSubjectName.Text & "' AND YearLevel = '" & cboYearLevel.Text & "'"


    daGrade.MissingSchemaAction = MissingSchemaAction.AddWithKey


    dsGrade.Clear()


    'dsSection.Clear()


    'dsSubject.Clear()


    daGrade.SelectCommand = cmdGrade


    daGrade.Fill(dsGrade, "tblEnrol")


    cnn.Close()


     


     


    Dim si() As FarPoint.Win.Spread.SortInfo = New FarPoint.Win.Spread.SortInfo() {New FarPoint.Win.Spread.SortInfo(1, True), New FarPoint.Win.Spread.SortInfo(2, True)}


    ''HideSheets()


    'bind fpspread1 to datasource


    '1st Grading


    FpSpread1.Sheets(0).DataSource = dsGrade


    FpSpread1.Sheets(0).DataMember = "tblEnrol"

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    And UKey is the only key you have set in this table? You may want to try binding the DataSource to the DataGrid to see if it throws a more descriptive error.


    Yes. This code is what I was talking about to fill the dsGrade DataSet. See how long that takes and then how long it takes to set FpSpread1.Sheets(0).DataSource = dsGrade is. Then see how long it takes to format the SheetView. Then, you can have an idea of where the time is taking.

  • Replied 8 September 2017, 1:14 pm EST

    Yes, I have seen my .xsd and here is what it contains. It is very long. UPDATE [dbo].[tblEnrol] SET [IDNo] = @IDNo, [LastName] = @LastName, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [Gender] = @Gender, [Address] = @Address, [YearLevel] = @YearLevel, [SubjectName] = @SubjectName, [Time] = @Time, [SectionName] = @SectionName, [Teacher] = @Teacher, [ItemA1_1] = @ItemA1_1, [A1_1] = @A1_1, [ItemA2_1] = @ItemA2_1, [A2_1] = @A2_1, [ItemA3_1] = @ItemA3_1, [A3_1] = @A3_1, [ItemA4_1] = @ItemA4_1, [A4_1] = @A4_1, [ItemA5_1] = @ItemA5_1, [A5_1] = @A5_1, [ItemA6_1] = @ItemA6_1, [A6_1] = @A6_1, [ItemA7_1] = @ItemA7_1, [A7_1] = @A7_1, [ItemA8_1] = @ItemA8_1, [A8_1] = @A8_1, [ItemA9_1] = @ItemA9_1, [A9_1] = @A9_1, [ItemA10_1] = @ItemA10_1, [A10_1] = @A10_1, [ItemQ1_1] = @ItemQ1_1, [Q1_1] = @Q1_1, [ItemQ2_1] = @ItemQ2_1, [Q2_1] = @Q2_1, [ItemQ3_1] = @ItemQ3_1, [Q3_1] = @Q3_1, [ItemQ4_1] = @ItemQ4_1, [Q4_1] = @Q4_1, [ItemQ5_1] = @ItemQ5_1, [Q5_1] = @Q5_1, [ItemQ6_1] = @ItemQ6_1, [Q6_1] = @Q6_1, [ItemQ7_1] = @ItemQ7_1, [Q7_1] = @Q7_1, [ItemQ8_1] = @ItemQ8_1, [Q8_1] = @Q8_1, [ItemQ9_1] = @ItemQ9_1, [Q9_1] = @Q9_1, [ItemQ10_1] = @ItemQ10_1, [Q10_1] = @Q10_1, [ItemR1_1] = @ItemR1_1, [R1_1] = @R1_1, [ItemR2_1] = @ItemR2_1, [R2_1] = @R2_1, [ItemR3_1] = @ItemR3_1, [R3_1] = @R3_1, [ItemR4_1] = @ItemR4_1, [R4_1] = @R4_1, [ItemR5_1] = @ItemR5_1, [R5_1] = @R5_1, [ItemR6_1] = @ItemR6_1, [R6_1] = @R6_1, [ItemR7_1] = @ItemR7_1, [R7_1] = @R7_1, [ItemR8_1] = @ItemR8_1, [R8_1] = @R8_1, [ItemR9_1] = @ItemR9_1, [R9_1] = @R9_1, [ItemR10_1] = @ItemR10_1, [R10_1] = @R10_1, [ItemPrj1] = @ItemPrj1, [Prj1] = @Prj1, [ItemSP1] = @ItemSP1, [SP1] = @SP1, [ItemRDG1] = @ItemRDG1, [RDG1] = @RDG1, [ItemExam1] = @ItemExam1, [Exam1] = @Exam1, [TotA1] = @TotA1, [TotA1skor] = @TotA1skor, [A1Percent] = @A1Percent, [A1Result] = @A1Result, [TotQ1] = @TotQ1, [TotQ1skor] = @TotQ1skor, [Q1Percent] = @Q1Percent, [Q1Result] = @Q1Result, [TotR1] = @TotR1, [TotR1skor] = @TotR1skor, [R1Percent] = @R1Percent, [R1Result] = @R1Result, [TotPrj1] = @TotPrj1, [TotPrj1skor] = @TotPrj1skor, [Prj1Percent] = @Prj1Percent, [Prj1Result] = @Prj1Result, [TotSP1] = @TotSP1, [TotSP1skor] = @TotSP1skor, [SP1Percent] = @SP1Percent, [SP1Result] = @SP1Result, [TotRDG1] = @TotRDG1, [ToRDG1skor] = @ToRDG1skor, [RDG1Percent] = @RDG1Percent, [RDG1Result] = @RDG1Result, [TotExam1] = @TotExam1, [TotExam1skor] = @TotExam1skor, [Exam1Percent] = @Exam1Percent, [Exam1Result] = @Exam1Result, [TG1] = @TG1, [FG1] = @FG1, [Rem1] = @Rem1, [CPC1] = @CPC1, [ST1] = @ST1, [CFG1] = @CFG1, [CLG1] = @CLG1, [WO1Item] = @WO1Item, [WO1] = @WO1, [WO1Percent] = @WO1Percent, [WO1Result] = @WO1Result, [Att1Item] = @Att1Item, [Att1] = @Att1, [Att1Percent] = @Att1Percent, [Att1Result] = @Att1Result, [Punc1Item] = @Punc1Item, [Punc1] = @Punc1, [Punc1Percent] = @Punc1Percent, [Punc1Result] = @Punc1Result, [Involve1Item] = @Involve1Item, [Involve1] = @Involve1, [Involve1Percent] = @Involve1Percent, [Invlove1Result] = @Invlove1Result, [HTG1] = @HTG1, [HFG1] = @HFG1, [HRem1] = @HRem1, [Club1] = @Club1, [ItemA1_2] = @ItemA1_2, [A1_2] = @A1_2, [ItemA2_2] = @ItemA2_2, [A2_2] = @A2_2, [ItemA3_2] = @ItemA3_2, [A3_2] = @A3_2, [ItemA4_2] = @ItemA4_2, [A4_2] = @A4_2, [ItemA5_2] = @ItemA5_2, [A5_2] = @A5_2, [ItemA6_2] = @ItemA6_2, [A6_2] = @A6_2, [ItemA7_2] = @ItemA7_2, [A7_2] = @A7_2, [ItemA8_2] = @ItemA8_2, [A8_2] = @A8_2, [ItemA9_2] = @ItemA9_2, [A9_2] = @A9_2, [ItemA10_2] = @ItemA10_2, [A10_2] = @A10_2, [ItemQ1_2] = @ItemQ1_2, [Q1_2] = @Q1_2, [ItemQ2_2] = @ItemQ2_2, [Q2_2] = @Q2_2, [ItemQ3_2] = @ItemQ3_2, [Q3_2] = @Q3_2, [ItemQ4_2] = @ItemQ4_2, [Q4_2] = @Q4_2, [ItemQ5_2] = @ItemQ5_2, [Q5_2] = @Q5_2, [ItemQ6_2] = @ItemQ6_2, [Q6_2] = @Q6_2, [ItemQ7_2] = @ItemQ7_2, [Q7_2] = @Q7_2, [ItemQ8_2] = @ItemQ8_2, [Q8_2] = @Q8_2, [ItemQ9_2] = @ItemQ9_2, [Q9_2] = @Q9_2, [ItemQ10_2] = @ItemQ10_2, [Q10_2] = @Q10_2, [ItemR1_2] = @ItemR1_2, [R1_2] = @R1_2, [ItemR2_2] = @ItemR2_2, [R2_2] = @R2_2, [ItemR3_2] = @ItemR3_2, [R3_2] = @R3_2, [ItemR4_2] = @ItemR4_2, [R4_2] = @R4_2, [ItemR5_2] = @ItemR5_2, [R5_2] = @R5_2, [ItemR6_2] = @ItemR6_2, [R6_2] = @R6_2, [ItemR7_2] = @ItemR7_2, [R7_2] = @R7_2, [ItemR8_2] = @ItemR8_2, [R8_2] = @R8_2, [ItemR9_2] = @ItemR9_2, [R9_2] = @R9_2, [ItemR10_2] = @ItemR10_2, [R10_2] = @R10_2, [ItemPrj2] = @ItemPrj2, [Prj2] = @Prj2, [ItemSP2] = @ItemSP2, [SP2] = @SP2, [ItemRDG2] = @ItemRDG2, [RDG2] = @RDG2, [ItemExam2] = @ItemExam2, [Exam2] = @Exam2, [TotA2] = @TotA2, [TotA2skor] = @TotA2skor, [A2Percent] = @A2Percent, [A2Result] = @A2Result, [TotQ2] = @TotQ2, [TotQ2skor] = @TotQ2skor, [Q2Percent] = @Q2Percent, [Q2Result] = @Q2Result, [TotR2] = @TotR2, [TotR2skor] = @TotR2skor, [R2Percent] = @R2Percent, [R2Result] = @R2Result, [TotPrj2] = @TotPrj2, [TotPrj2skor] = @TotPrj2skor, [Prj2Percent] = @Prj2Percent, [Prj2Result] = @Prj2Result, [TotSP2] = @TotSP2, [TotSP2skor] = @TotSP2skor, [SP2Percent] = @SP2Percent, [SP2Result] = @SP2Result, [TotRDG2] = @TotRDG2, [ToRDG2skor] = @ToRDG2skor, [RDG2Percent] = @RDG2Percent, [RDG2Result] = @RDG2Result, [TotExam2] = @TotExam2, [TotExam2skor] = @TotExam2skor, [Exam2Percent] = @Exam2Percent, [Exam2Result] = @Exam2Result, [TG2] = @TG2, [FG2] = @FG2, [Rem2] = @Rem2, [CPC2] = @CPC2, [ST2] = @ST2, [CFG2] = @CFG2, [CLG2] = @CLG2, [WO2Item] = @WO2Item, [WO2] = @WO2, [WO2Percent] = @WO2Percent, [WO2Result] = @WO2Result, [Att2Item] = @Att2Item, [Att2] = @Att2, [Att2Percent] = @Att2Percent, [Att2Result] = @Att2Result, [Punc2Item] = @Punc2Item, [Punc2] = @Punc2, [Punc2Percent] = @Punc2Percent, [Punc2Result] = @Punc2Result, [Involve2Item] = @Involve2Item, [Involve2] = @Involve2, [Involve2Percent] = @Involve2Percent, [Invlove2Result] = @Invlove2Result, [HTG2] = @HTG2, [HFG2] = @HFG2, [HRem2] = @HRem2, [Club2] = @Club2, [Deliber1_2Ave] = @Deliber1_2Ave, [Deliber1_2Rem] = @Deliber1_2Rem, [ItemA1_3] = @ItemA1_3, [A1_3] = @A1_3, [ItemA2_3] = @ItemA2_3, [A2_3] = @A2_3, [ItemA3_3] = @ItemA3_3, [A3_3] = @A3_3, [ItemA4_3] = @ItemA4_3, [A4_3] = @A4_3, [ItemA5_3] = @ItemA5_3, [A5_3] = @A5_3, [ItemA6_3] = @ItemA6_3, [A6_3] = @A6_3, [ItemA7_3] = @ItemA7_3, [A7_3] = @A7_3, [ItemA8_3] = @ItemA8_3, [A8_3] = @A8_3, [ItemA9_3] = @ItemA9_3, [A9_3] = @A9_3, [ItemA10_3] = @ItemA10_3, [A10_3] = @A10_3, [ItemQ1_3] = @ItemQ1_3, [Q1_3] = @Q1_3, [ItemQ2_3] = @ItemQ2_3, [Q2_3] = @Q2_3, [ItemQ3_3] = @ItemQ3_3, [Q3_3] = @Q3_3, [ItemQ4_3] = @ItemQ4_3, [Q4_3] = @Q4_3, [ItemQ5_3] = @ItemQ5_3, [Q5_3] = @Q5_3, [ItemQ6_3] = @ItemQ6_3, [Q6_3] = @Q6_3, [ItemQ7_3] = @ItemQ7_3, [Q7_3] = @Q7_3, [ItemQ8_3] = @ItemQ8_3, [Q8_3] = @Q8_3, [ItemQ9_3] = @ItemQ9_3, [Q9_3] = @Q9_3, [ItemQ10_3] = @ItemQ10_3, [Q10_3] = @Q10_3, [ItemR1_3] = @ItemR1_3, [R1_3] = @R1_3, [ItemR2_3] = @ItemR2_3, [R2_3] = @R2_3, [ItemR3_3] = @ItemR3_3, [R3_3] = @R3_3, [ItemR4_3] = @ItemR4_3, [R4_3] = @R4_3, [ItemR5_3] = @ItemR5_3, [R5_3] = @R5_3, [ItemR6_3] = @ItemR6_3, [R6_3] = @R6_3, [ItemR7_3] = @ItemR7_3, [R7_3] = @R7_3, [ItemR8_3] = @ItemR8_3, [R8_3] = @R8_3, [ItemR9_3] = @ItemR9_3, [R9_3] = @R9_3, [ItemR10_3] = @ItemR10_3, [R10_3] = @R10_3, [ItemPrj3] = @ItemPrj3, [Prj3] = @Prj3, [ItemSP3] = @ItemSP3, [SP3] = @SP3, [ItemRDG3] = @ItemRDG3, [RDG3] = @RDG3, [ItemExam3] = @ItemExam3, [Exam3] = @Exam3, [TotA3] = @TotA3, [TotA3skor] = @TotA3skor, [A3Percent] = @A3Percent, [A3Result] = @A3Result, [TotQ3] = @TotQ3, [TotQ3skor] = @TotQ3skor, [Q3Percent] = @Q3Percent, [Q3Result] = @Q3Result, [TotR3] = @TotR3, [TotR3skor] = @TotR3skor, [R3Percent] = @R3Percent, [R3Result] = @R3Result, [TotPrj3] = @TotPrj3, [TotPrj3skor] = @TotPrj3skor, [Prj3Percent] = @Prj3Percent, [Prj3Result] = @Prj3Result, [TotSP3] = @TotSP3, [TotSP3skor] = @TotSP3skor, [SP3Percent] = @SP3Percent, [SP3Result] = @SP3Result, [TotRDG3] = @TotRDG3, [ToRDG3skor] = @ToRDG3skor, [RDG3Percent] = @RDG3Percent, [RDG3Result] = @RDG3Result, [TotExam3] = @TotExam3, [TotExam3skor] = @TotExam3skor, [Exam3Percent] = @Exam3Percent, [Exam3Result] = @Exam3Result, [TG3] = @TG3, [FG3] = @FG3, [Rem3] = @Rem3, [CPC3] = @CPC3, [ST3] = @ST3, [CFG3] = @CFG3, [CLG3] = @CLG3, [WO3Item] = @WO3Item, [WO3] = @WO3, [WO3Percent] = @WO3Percent, [WO3Result] = @WO3Result, [Att3Item] = @Att3Item, [Att3] = @Att3, [Att3Percent] = @Att3Percent, [Att3Result] = @Att3Result, [Punc3Item] = @Punc3Item, [Punc3] = @Punc3, [Punc3Percent] = @Punc3Percent, [Punc3Result] = @Punc3Result, [Involve3Item] = @Involve3Item, [Involve3] = @Involve3, [Involve3Percent] = @Involve3Percent, [Involve3Result] = @Involve3Result, [HTG3] = @HTG3, [HFG3] = @HFG3, [HRem3] = @HRem3, [Club3] = @Club3, [Deliber1_3Ave] = @Deliber1_3Ave, [Deliber1_3Rem] = @Deliber1_3Rem, [ItemA1_4] = @ItemA1_4, [A1_4] = @A1_4, [ItemA2_4] = @ItemA2_4, [A2_4] = @A2_4, [ItemA3_4] = @ItemA3_4, [A3_4] = @A3_4, [ItemA4_4] = @ItemA4_4, [A4_4] = @A4_4, [ItemA5_4] = @ItemA5_4, [A5_4] = @A5_4, [ItemA6_4] = @ItemA6_4, [A6_4] = @A6_4, [ItemA7_4] = @ItemA7_4, [A7_4] = @A7_4, [ItemA8_4] = @ItemA8_4, [A8_4] = @A8_4, [ItemA9_4] = @ItemA9_4, [A9_4] = @A9_4, [ItemA10_4] = @ItemA10_4, [A10_4] = @A10_4, [ItemQ1_4] = @ItemQ1_4, [Q1_4] = @Q1_4, [ItemQ2_4] = @ItemQ2_4, [Q2_4] = @Q2_4, [ItemQ3_4] = @ItemQ3_4, [Q3_4] = @Q3_4, [ItemQ4_4] = @ItemQ4_4, [Q4_4] = @Q4_4, [ItemQ5_4] = @ItemQ5_4, [Q5_4] = @Q5_4, [ItemQ6_4] = @ItemQ6_4, [Q6_4] = @Q6_4, [ItemQ7_4] = @ItemQ7_4, [Q7_4] = @Q7_4, [ItemQ8_4] = @ItemQ8_4, [Q8_4] = @Q8_4, [ItemQ9_4] = @ItemQ9_4, [Q9_4] = @Q9_4, [ItemQ10_4] = @ItemQ10_4, [Q10_4] = @Q10_4, [ItemR1_4] = @ItemR1_4, [R1_4] = @R1_4, [ItemR2_4] = @ItemR2_4, [R2_4] = @R2_4, [ItemR3_4] = @ItemR3_4, [R3_4] = @R3_4, [ItemR4_4] = @ItemR4_4, [R4_4] = @R4_4, [ItemR5_4] = @ItemR5_4, [R5_4] = @R5_4, [ItemR6_4] = @ItemR6_4, [R6_4] = @R6_4, [ItemR7_4] = @ItemR7_4, [R7_4] = @R7_4, [ItemR8_4] = @ItemR8_4, [R8_4] = @R8_4, [ItemR9_4] = @ItemR9_4, [R9_4] = @R9_4, [ItemR10_4] = @ItemR10_4, [R10_4] = @R10_4, [ItemPrj4] = @ItemPrj4, [Prj4] = @Prj4, [ItemSP4] = @ItemSP4, [SP4] = @SP4, [ItemRDG4] = @ItemRDG4, [RDG4] = @RDG4, [ItemExam4] = @ItemExam4, [Exam4] = @Exam4, [TotA4] = @TotA4, [TotA4skor] = @TotA4skor, [A4Percent] = @A4Percent, [A4Result] = @A4Result, [TotQ4] = @TotQ4, [TotQ4skor] = @TotQ4skor, [Q4Percent] = @Q4Percent, [Q4Result] = @Q4Result, [TotR4] = @TotR4, [TotR4skor] = @TotR4skor, [R4Percent] = @R4Percent, [R4Result] = @R4Result, [TotPrj4] = @TotPrj4, [TotPrj4skor] = @TotPrj4skor, [Prj4Percent] = @Prj4Percent, [Prj4Result] = @Prj4Result, [TotSP4] = @TotSP4, [TotSP4skor] = @TotSP4skor, [SP4Percent] = @SP4Percent, [SP4Result] = @SP4Result, [TotRDG4] = @TotRDG4, [ToRDG4skor] = @ToRDG4skor, [RDG4Percent] = @RDG4Percent, [RDG4Result] = @RDG4Result, [TotExam4] = @TotExam4, [TotExam4skor] = @TotExam4skor, [Exam4Percent] = @Exam4Percent, [Exam4Result] = @Exam4Result, [TG4] = @TG4, [FG4] = @FG4, [Rem4] = @Rem4, [CPC4] = @CPC4, [ST4] = @ST4, [CFG4] = @CFG4, [CLG4] = @CLG4, [WO4Item] = @WO4Item, [WO4] = @WO4, [WO4Percent] = @WO4Percent, [WO4Result] = @WO4Result, [Att4Item] = @Att4Item, [Att4] = @Att4, [Att4Percent] = @Att4Percent, [Att4Result] = @Att4Result, [Punc4Item] = @Punc4Item, [Punc4] = @Punc4, [Punc4Percent] = @Punc4Percent, [Punc4Result] = @Punc4Result, [Involve4Item] = @Involve4Item, [Involve4] = @Involve4, [Involve4Percent] = @Involve4Percent, [Involve4Result] = @Involve4Result, [HTG4] = @HTG4, [HFG4] = @HFG4, [HRem4] = @HRem4, [Club4] = @Club4, [FinalAve] = @FinalAve, [FinalRem] = @FinalRem, [GA1_1] = @GA1_1, [GA1_2] = @GA1_2, [GA1_3] = @GA1_3, [GA1_4] = @GA1_4, [GA1_5] = @GA1_5, [GA1_6] = @GA1_6, [GA1_7] = @GA1_7, [TotGA1] = @TotGA1, [GExam1] = @GExam1, [GTG1] = @GTG1, [GFG1] = @GFG1, [GRem1] = @GRem1, [Pen1_1] = @Pen1_1, [Pen1_2] = @Pen1_2, [Pen1_3] = @Pen1_3, [Pen1_4] = @Pen1_4, [Pen1_5] = @Pen1_5, [Pen1_6] = @Pen1_6, [Pen1_7] = @Pen1_7, [Pen1_8] = @Pen1_8, [Pen1_9] = @Pen1_9, [Pen1_10] = @Pen1_10, [Pen1Tot] = @Pen1Tot, [PenTG1] = @PenTG1, [PenFG1] = @PenFG1, [PenRem1] = @PenRem1 WHERE (([Ukey] = @Original_Ukey) AND ([IDNo] = @Original_IDNo) AND ((@IsNull_LastName = 1 AND [LastName] IS NULL) OR ([LastName] = @Original_LastName)) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ((@IsNull_MiddleName = 1 AND [MiddleName] IS NULL) OR ([MiddleName] = @Original_MiddleName)) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_YearLevel = 1 AND [YearLevel] IS NULL) OR ([YearLevel] = @Original_YearLevel)) AND ((@IsNull_SubjectName = 1 AND [SubjectName] IS NULL) OR ([SubjectName] = @Original_SubjectName)) AND ((@IsNull_Time = 1 AND [Time] IS NULL) OR ([Time] = @Original_Time)) AND ((@IsNull_SectionName = 1 AND [SectionName] IS NULL) OR ([SectionName] = @Original_SectionName)) AND ((@IsNull_Teacher = 1 AND [Teacher] IS NULL) OR ([Teacher] = @Original_Teacher)) AND ((@IsNull_ItemA1_1 = 1 AND [ItemA1_1] IS NULL) OR ([ItemA1_1] = @Original_ItemA1_1)) AND ((@IsNull_A1_1 = 1 AND [A1_1] IS NULL) OR ([A1_1] = @Original_A1_1)) AND ((@IsNull_ItemA2_1 = 1 AND [ItemA2_1] IS NULL) OR ([ItemA2_1] = @Original_ItemA2_1)) AND ((@IsNull_A2_1 = 1 AND [A2_1] IS NULL) OR ([A2_1] = @Original_A2_1)) AND ((@IsNull_ItemA3_1 = 1 AND [ItemA3_1] IS NULL) OR ([ItemA3_1] = @Original_ItemA3_1)) AND ((@IsNull_A3_1 = 1 AND [A3_1] IS NULL) OR ([A3_1] = @Original_A3_1)) AND ((@IsNull_ItemA4_1 = 1 AND [ItemA4_1] IS NULL) OR ([ItemA4_1] = @Original_ItemA4_1)) AND ((@IsNull_A4_1 = 1 AND [A4_1] IS NULL) OR ([A4_1] = @Original_A4_1)) AND ((@IsNull_ItemA5_1 = 1 AND [ItemA5_1] IS NULL) OR ([ItemA5_1] = @Original_ItemA5_1)) AND ((@IsNull_A5_1 = 1 AND [A5_1] IS NULL) OR ([A5_1] = @Original_A5_1)) AND ((@IsNull_ItemA6_1 = 1 AND [ItemA6_1] IS NULL) OR ([ItemA6_1] = @Original_ItemA6_1)) AND ((@IsNull_A6_1 = 1 AND [A6_1] IS NULL) OR ([A6_1] = @Original_A6_1)) AND ((@IsNull_ItemA7_1 = 1 AND [ItemA7_1] IS NULL) OR ([ItemA7_1] = @Original_ItemA7_1)) AND ((@IsNull_A7_1 = 1 AND [A7_1] IS NULL) OR ([A7_1] = @Original_A7_1)) AND ((@IsNull_ItemA8_1 = 1 AND [ItemA8_1] IS NULL) OR ([ItemA8_1] = @Original_ItemA8_1)) AND ((@IsNull_A8_1 = 1 AND [A8_1] IS NULL) OR ([A8_1] = @Original_A8_1)) AND ((@IsNull_ItemA9_1 = 1 AND [ItemA9_1] IS NULL) OR ([ItemA9_1] = @Original_ItemA9_1)) AND ((@IsNull_A9_1 = 1 AND [A9_1] IS NULL) OR ([A9_1] = @Original_A9_1)) AND ((@IsNull_ItemA10_1 = 1 AND [ItemA10_1] IS NULL) OR ([ItemA10_1] = @Original_ItemA10_1)) AND ((@IsNull_A10_1 = 1 AND [A10_1] IS NULL) OR ([A10_1] = @Original_A10_1)) AND ((@IsNull_ItemQ1_1 = 1 AND [ItemQ1_1] IS NULL) OR ([ItemQ1_1] = @Original_ItemQ1_1)) AND ((@IsNull_Q1_1 = 1 AND [Q1_1] IS NULL) OR ([Q1_1] = @Original_Q1_1)) AND ((@IsNull_ItemQ2_1 = 1 AND [ItemQ2_1] IS NULL) OR ([ItemQ2_1] = @Original_ItemQ2_1)) AND ((@IsNull_Q2_1 = 1 AND [Q2_1] IS NULL) OR ([Q2_1] = @Original_Q2_1)) AND ((@IsNull_ItemQ3_1 = 1 AND [ItemQ3_1] IS NULL) OR ([ItemQ3_1] = @Original_ItemQ3_1)) AND ((@IsNull_Q3_1 = 1 AND [Q3_1] IS NULL) OR ([Q3_1] = @Original_Q3_1)) AND ((@IsNull_ItemQ4_1 = 1 AND [ItemQ4_1] IS NULL) OR ([ItemQ4_1] = @Original_ItemQ4_1)) AND ((@IsNull_Q4_1 = 1 AND [Q4_1] IS NULL) OR ([Q4_1] = @Original_Q4_1)) AND ((@IsNull_ItemQ5_1 = 1 AND [ItemQ5_1] IS NULL) OR ([ItemQ5_1] = @Original_ItemQ5_1)) AND ((@IsNull_Q5_1 = 1 AND [Q5_1] IS NULL) OR ([Q5_1] = @Original_Q5_1)) AND ((@IsNull_ItemQ6_1 = 1 AND [ItemQ6_1] IS NULL) OR ([ItemQ6_1] = @Original_ItemQ6_1)) AND ((@IsNull_Q6_1 = 1 AND [Q6_1] IS NULL) OR ([Q6_1] = @Original_Q6_1)) AND ((@IsNull_ItemQ7_1 = 1 AND [ItemQ7_1] IS NULL) OR ([ItemQ7_1] = @Original_ItemQ7_1)) AND ((@IsNull_Q7_1 = 1 AND [Q7_1] IS NULL) OR ([Q7_1] = @Original_Q7_1)) AND ((@IsNull_ItemQ8_1 = 1 AND [ItemQ8_1] IS NULL) OR ([ItemQ8_1] = @Original_ItemQ8_1)) AND ((@IsNull_Q8_1 = 1 AND [Q8_1] IS NULL) OR ([Q8_1] = @Original_Q8_1)) AND ((@IsNull_ItemQ9_1 = 1 AND [ItemQ9_1] IS NULL) OR ([ItemQ9_1] = @Original_ItemQ9_1)) AND ((@IsNull_Q9_1 = 1 AND [Q9_1] IS NULL) OR ([Q9_1] = @Original_Q9_1)) AND ((@IsNull_ItemQ10_1 = 1 AND [ItemQ10_1] IS NULL) OR ([ItemQ10_1] = @Original_ItemQ10_1)) AND ((@IsNull_Q10_1 = 1 AND [Q10_1] IS NULL) OR ([Q10_1] = @Original_Q10_1)) AND ((@IsNull_ItemR1_1 = 1 AND [ItemR1_1] IS NULL) OR ([ItemR1_1] = @Original_ItemR1_1)) AND ((@IsNull_R1_1 = 1 AND [R1_1] IS NULL) OR ([R1_1] = @Original_R1_1)) AND ((@IsNull_ItemR2_1 = 1 AND [ItemR2_1] IS NULL) OR ([ItemR2_1] = @Original_ItemR2_1)) AND ((@IsNull_R2_1 = 1 AND [R2_1] IS NULL) OR ([R2_1] = @Original_R2_1)) AND ((@IsNull_ItemR3_1 = 1 AND [ItemR3_1] IS NULL) OR ([ItemR3_1] = @Original_ItemR3_1)) AND ((@IsNull_R3_1 = 1 AND [R3_1] IS NULL) OR ([R3_1] = @Original_R3_1)) AND ((@IsNull_ItemR4_1 = 1 AND [ItemR4_1] IS NULL) OR ([ItemR4_1] = @Original_ItemR4_1)) AND ((@IsNull_R4_1 = 1 AND [R4_1] IS NULL) OR ([R4_1] = @Original_R4_1)) AND ((@IsNull_ItemR5_1 = 1 AND [ItemR5_1] IS NULL) OR ([ItemR5_1] = @Original_ItemR5_1)) AND ((@IsNull_R5_1 = 1 AND [R5_1] IS NULL) OR ([R5_1] = @Original_R5_1)) AND ((@IsNull_ItemR6_1 = 1 AND [ItemR6_1] IS NULL) OR ([ItemR6_1] = @Original_ItemR6_1)) AND ((@IsNull_R6_1 = 1 AND [R6_1] IS NULL) OR ([R6_1] = @Original_R6_1)) AND ((@IsNull_ItemR7_1 = 1 AND [ItemR7_1] IS NULL) OR ([ItemR7_1] = @Original_ItemR7_1)) AND ((@IsNull_R7_1 = 1 AND [R7_1] IS NULL) OR ([R7_1] = @Original_R7_1)) AND ((@IsNull_ItemR8_1 = 1 AND [ItemR8_1] IS NULL) OR ([ItemR8_1] = @Original_ItemR8_1)) AND ((@IsNull_R8_1 = 1 AND [R8_1] IS NULL) OR ([R8_1] = @Original_R8_1)) AND ((@IsNull_ItemR9_1 = 1 AND [ItemR9_1] IS NULL) OR ([ItemR9_1] = @Original_ItemR9_1)) AND ((@IsNull_R9_1 = 1 AND [R9_1] IS NULL) OR ([R9_1] = @Original_R9_1)) AND ((@IsNull_ItemR10_1 = 1 AND [ItemR10_1] IS NULL) OR ([ItemR10_1] = @Original_ItemR10_1)) AND ((@IsNull_R10_1 = 1 AND [R10_1] IS NULL) OR ([R10_1] = @Original_R10_1)) AND ((@IsNull_ItemPrj1 = 1 AND [ItemPrj1] IS NULL) OR ([ItemPrj1] = @Original_ItemPrj1)) AND ((@IsNull_Prj1 = 1 AND [Prj1] IS NULL) OR ([Prj1] = @Original_Prj1)) AND ((@IsNull_ItemSP1 = 1 AND [ItemSP1] IS NULL) OR ([ItemSP1] = @Original_ItemSP1)) AND ((@IsNull_SP1 = 1 AND [SP1] IS NULL) OR ([SP1] = @Original_SP1)) AND ((@IsNull_ItemRDG1 = 1 AND [ItemRDG1] IS NULL) OR ([ItemRDG1] = @Original_ItemRDG1)) AND ((@IsNull_RDG1 = 1 AND [RDG1] IS NULL) OR ([RDG1] = @Original_RDG1)) AND ((@IsNull_ItemExam1 = 1 AND [ItemExam1] IS NULL) OR ([ItemExam1] = @Original_ItemExam1)) AND ((@IsNull_Exam1 = 1 AND [Exam1] IS NULL) OR ([Exam1] = @Original_Exam1)) AND ((@IsNull_TotA1 = 1 AND [TotA1] IS NULL) OR ([TotA1] = @Original_TotA1)) AND ((@IsNull_TotA1skor = 1 AND [TotA1skor] IS NULL) OR ([TotA1skor] = @Original_TotA1skor)) AND ((@IsNull_A1Percent = 1 AND [A1Percent] IS NULL) OR ([A1Percent] = @Original_A1Percent)) AND ((@IsNull_A1Result = 1 AND [A1Result] IS NULL) OR ([A1Result] = @Original_A1Result)) AND ((@IsNull_TotQ1 = 1 AND [TotQ1] IS NULL) OR ([TotQ1] = @Original_TotQ1)) AND ((@IsNull_TotQ1skor = 1 AND [TotQ1skor] IS NULL) OR ([TotQ1skor] = @Original_TotQ1skor)) AND ((@IsNull_Q1Percent = 1 AND [Q1Percent] IS NULL) OR ([Q1Percent] = @Original_Q1Percent)) AND ((@IsNull_Q1Result = 1 AND [Q1Result] IS NULL) OR ([Q1Result] = @Original_Q1Result)) AND ((@IsNull_TotR1 = 1 AND [TotR1] IS NULL) OR ([TotR1] = @Original_TotR1)) AND ((@IsNull_TotR1skor = 1 AND [TotR1skor] IS NULL) OR ([TotR1skor] = @Original_TotR1skor)) AND ((@IsNull_R1Percent = 1 AND [R1Percent] IS NULL) OR ([R1Percent] = @Original_R1Percent)) AND ((@IsNull_R1Result = 1 AND [R1Result] IS NULL) OR ([R1Result] = @Original_R1Result)) AND ((@IsNull_TotPrj1 = 1 AND [TotPrj1] IS NULL) OR ([TotPrj1] = @Original_TotPrj1)) AND ((@IsNull_TotPrj1skor = 1 AND [TotPrj1skor] IS NULL) OR ([TotPrj1skor] = @Original_TotPrj1skor)) AND ((@IsNull_Prj1Percent = 1 AND [Prj1Percent] IS NULL) OR ([Prj1Percent] = @Original_Prj1Percent)) AND ((@IsNull_Prj1Result = 1 AND [Prj1Result] IS NULL) OR ([Prj1Result] = @Original_Prj1Result)) AND ((@IsNull_TotSP1 = 1 AND [TotSP1] IS NULL) OR ([TotSP1] = @Original_TotSP1)) AND ((@IsNull_TotSP1skor = 1 AND [TotSP1skor] IS NULL) OR ([TotSP1skor] = @Original_TotSP1skor)) AND ((@IsNull_SP1Percent = 1 AND [SP1Percent] IS NULL) OR ([SP1Percent] = @Original_SP1Percent)) AND ((@IsNull_SP1Result = 1 AND [SP1Result] IS NULL) OR ([SP1Result] = @Original_SP1Result)) AND ((@IsNull_TotRDG1 = 1 AND [TotRDG1] IS NULL) OR ([TotRDG1] = @Original_TotRDG1)) AND ((@IsNull_ToRDG1skor = 1 AND [ToRDG1skor] IS NULL) OR ([ToRDG1skor] = @Original_ToRDG1skor)) AND ((@IsNull_RDG1Percent = 1 AND [RDG1Percent] IS NULL) OR ([RDG1Percent] = @Original_RDG1Percent)) AND ((@IsNull_RDG1Result = 1 AND [RDG1Result] IS NULL) OR ([RDG1Result] = @Original_RDG1Result)) AND ((@IsNull_TotExam1 = 1 AND [TotExam1] IS NULL) OR ([TotExam1] = @Original_TotExam1)) AND ((@IsNull_TotExam1skor = 1 AND [TotExam1skor] IS NULL) OR ([TotExam1skor] = @Original_TotExam1skor)) AND ((@IsNull_Exam1Percent = 1 AND [Exam1Percent] IS NULL) OR ([Exam1Percent] = @Original_Exam1Percent)) AND ((@IsNull_Exam1Result = 1 AND [Exam1Result] IS NULL) OR ([Exam1Result] = @Original_Exam1Result)) AND ((@IsNull_TG1 = 1 AND [TG1] IS NULL) OR ([TG1] = @Original_TG1)) AND ((@IsNull_FG1 = 1 AND [FG1] IS NULL) OR ([FG1] = @Original_FG1)) AND ((@IsNull_Rem1 = 1 AND [Rem1] IS NULL) OR ([Rem1] = @Original_Rem1)) AND ((@IsNull_CPC1 = 1 AND [CPC1] IS NULL) OR ([CPC1] = @Original_CPC1)) AND ((@IsNull_ST1 = 1 AND [ST1] IS NULL) OR ([ST1] = @Original_ST1)) AND ((@IsNull_CFG1 = 1 AND [CFG1] IS NULL) OR ([CFG1] = @Original_CFG1)) AND ((@IsNull_CLG1 = 1 AND [CLG1] IS NULL) OR ([CLG1] = @Original_CLG1)) AND ((@IsNull_WO1Item = 1 AND [WO1Item] IS NULL) OR ([WO1Item] = @Original_WO1Item)) AND ((@IsNull_WO1 = 1 AND [WO1] IS NULL) OR ([WO1] = @Original_WO1)) AND ((@IsNull_WO1Percent = 1 AND [WO1Percent] IS NULL) OR ([WO1Percent] = @Original_WO1Percent)) AND ((@IsNull_WO1Result = 1 AND [WO1Result] IS NULL) OR ([WO1Result] = @Original_WO1Result)) AND ((@IsNull_Att1Item = 1 AND [Att1Item] IS NULL) OR ([Att1Item] = @Original_Att1Item)) AND ((@IsNull_Att1 = 1 AND [Att1] IS NULL) OR ([Att1] = @Original_Att1)) AND ((@IsNull_Att1Percent = 1 AND [Att1Percent] IS NULL) OR ([Att1Percent] = @Original_Att1Percent)) AND ((@IsNull_Att1Result = 1 AND [Att1Result] IS NULL) OR ([Att1Result] = @Original_Att1Result)) AND ((@IsNull_Punc1Item = 1 AND [Punc1Item] IS NULL) OR ([Punc1Item] = @Original_Punc1Item)) AND ((@IsNull_Punc1 = 1 AND [Punc1] IS NULL) OR ([Punc1] = @Original_Punc1)) AND ((@IsNull_Punc1Percent = 1 AND [Punc1Percent] IS NULL) OR ([Punc1Percent] = @Original_Punc1Percent)) AND ((@IsNull_Punc1Result = 1 AND [Punc1Result] IS NULL) OR ([Punc1Result] = @Original_Punc1Result)) AND ((@IsNull_Involve1Item = 1 AND [Involve1Item] IS NULL) OR ([Involve1Item] = @Original_Involve1Item)) AND ((@IsNull_Involve1 = 1 AND [Involve1] IS NULL) OR ([Involve1] = @Original_Involve1)) AND ((@IsNull_Involve1Percent = 1 AND [Involve1Percent] IS NULL) OR ([Involve1Percent] = @Original_Involve1Percent)) AND ((@IsNull_Invlove1Result = 1 AND [Invlove1Result] IS NULL) OR ([Invlove1Result] = @Original_Invlove1Result)) AND ((@IsNull_HTG1 = 1 AND [HTG1] IS NULL) OR ([HTG1] = @Original_HTG1)) AND ((@IsNull_HFG1 = 1 AND [HFG1] IS NULL) OR ([HFG1] = @Original_HFG1)) AND ((@IsNull_HRem1 = 1 AND [HRem1] IS NULL) OR ([HRem1] = @Original_HRem1)) AND ((@IsNull_Club1 = 1 AND [Club1] IS NULL) OR ([Club1] = @Original_Club1)) AND ((@IsNull_ItemA1_2 = 1 AND [ItemA1_2] IS NULL) OR ([ItemA1_2] = @Original_ItemA1_2)) AND ((@IsNull_A1_2 = 1 AND [A1_2] IS NULL) OR ([A1_2] = @Original_A1_2)) AND ((@IsNull_ItemA2_2 = 1 AND [ItemA2_2] IS NULL) OR ([ItemA2_2] = @Original_ItemA2_2)) AND ((@IsNull_A2_2 = 1 AND [A2_2] IS NULL) OR ([A2_2] = @Original_A2_2)) AND ((@IsNull_ItemA3_2 = 1 AND [ItemA3_2] IS NULL) OR ([ItemA3_2] = @Original_ItemA3_2)) AND ((@IsNull_A3_2 = 1 AND [A3_2] IS NULL) OR ([A3_2] = @Original_A3_2)) AND ((@IsNull_ItemA4_2 = 1 AND [ItemA4_2] IS NULL) OR ([ItemA4_2] = @Original_ItemA4_2)) AND ((@IsNull_A4_2 = 1 AND [A4_2] IS NULL) OR ([A4_2] = @Original_A4_2)) AND ((@IsNull_ItemA5_2 = 1 AND [ItemA5_2] IS NULL) OR ([ItemA5_2] = @Original_ItemA5_2)) AND ((@IsNull_A5_2 = 1 AND [A5_2] IS NULL) OR ([A5_2] = @Original_A5_2)) AND ((@IsNull_ItemA6_2 = 1 AND [ItemA6_2] IS NULL) OR ([ItemA6_2] = @Original_ItemA6_2)) AND ((@IsNull_A6_2 = 1 AND [A6_2] IS NULL) OR ([A6_2] = @Original_A6_2)) AND ((@IsNull_ItemA7_2 = 1 AND [ItemA7_2] IS NULL) OR ([ItemA7_2] = @Original_ItemA7_2)) AND ((@IsNull_A7_2 = 1 AND [A7_2] IS NULL) OR ([A7_2] = @Original_A7_2)) AND ((@IsNull_ItemA8_2 = 1 AND [ItemA8_2] IS NULL) OR ([ItemA8_2] = @Original_ItemA8_2)) AND ((@IsNull_A8_2 = 1 AND [A8_2] IS NULL) OR ([A8_2] = @Original_A8_2)) AND ((@IsNull_ItemA9_2 = 1 AND [ItemA9_2] IS NULL) OR ([ItemA9_2] = @Original_ItemA9_2)) AND ((@IsNull_A9_2 = 1 AND [A9_2] IS NULL) OR ([A9_2] = @Original_A9_2)) AND ((@IsNull_ItemA10_2 = 1 AND [ItemA10_2] IS NULL) OR ([ItemA10_2] = @Original_ItemA10_2)) AND ((@IsNull_A10_2 = 1 AND [A10_2] IS NULL) OR ([A10_2] = @Original_A10_2)) AND ((@IsNull_ItemQ1_2 = 1 AND [ItemQ1_2] IS NULL) OR ([ItemQ1_2] = @Original_ItemQ1_2)) AND ((@IsNull_Q1_2 = 1 AND [Q1_2] IS NULL) OR ([Q1_2] = @Original_Q1_2)) AND ((@IsNull_ItemQ2_2 = 1 AND [ItemQ2_2] IS NULL) OR ([ItemQ2_2] = @Original_ItemQ2_2)) AND ((@IsNull_Q2_2 = 1 AND [Q2_2] IS NULL) OR ([Q2_2] = @Original_Q2_2)) AND ((@IsNull_ItemQ3_2 = 1 AND [ItemQ3_2] IS NULL) OR ([ItemQ3_2] = @Original_ItemQ3_2)) AND ((@IsNull_Q3_2 = 1 AND [Q3_2] IS NULL) OR ([Q3_2] = @Original_Q3_2)) AND ((@IsNull_ItemQ4_2 = 1 AND [ItemQ4_2] IS NULL) OR ([ItemQ4_2] = @Original_ItemQ4_2)) AND ((@IsNull_Q4_2 = 1 AND [Q4_2] IS NULL) OR ([Q4_2] = @Original_Q4_2)) AND ((@IsNull_ItemQ5_2 = 1 AND [ItemQ5_2] IS NULL) OR ([ItemQ5_2] = @Original_ItemQ5_2)) AND ((@IsNull_Q5_2 = 1 AND [Q5_2] IS NULL) OR ([Q5_2] = @Original_Q5_2)) AND ((@IsNull_ItemQ6_2 = 1 AND [ItemQ6_2] IS NULL) OR ([ItemQ6_2] = @Original_ItemQ6_2)) AND ((@IsNull_Q6_2 = 1 AND [Q6_2] IS NULL) OR ([Q6_2] = @Original_Q6_2)) AND ((@IsNull_ItemQ7_2 = 1 AND [ItemQ7_2] IS NULL) OR ([ItemQ7_2] = @Original_ItemQ7_2)) AND ((@IsNull_Q7_2 = 1 AND [Q7_2] IS NULL) OR ([Q7_2] = @Original_Q7_2)) AND ((@IsNull_ItemQ8_2 = 1 AND [ItemQ8_2] IS NULL) OR ([ItemQ8_2] = @Original_ItemQ8_2)) AND ((@IsNull_Q8_2 = 1 AND [Q8_2] IS NULL) OR ([Q8_2] = @Original_Q8_2)) AND ((@IsNull_ItemQ9_2 = 1 AND [ItemQ9_2] IS NULL) OR ([ItemQ9_2] = @Original_ItemQ9_2)) AND ((@IsNull_Q9_2 = 1 AND [Q9_2] IS NULL) OR ([Q9_2] = @Original_Q9_2)) AND ((@IsNull_ItemQ10_2 = 1 AND [ItemQ10_2] IS NULL) OR ([ItemQ10_2] = @Original_ItemQ10_2)) AND ((@IsNull_Q10_2 = 1 AND [Q10_2] IS NULL) OR ([Q10_2] = @Original_Q10_2)) AND ((@IsNull_ItemR1_2 = 1 AND [ItemR1_2] IS NULL) OR ([ItemR1_2] = @Original_ItemR1_2)) AND ((@IsNull_R1_2 = 1 AND [R1_2] IS NULL) OR ([R1_2] = @Original_R1_2)) AND ((@IsNull_ItemR2_2 = 1 AND [ItemR2_2] IS NULL) OR ([ItemR2_2] = @Original_ItemR2_2)) AND ((@IsNull_R2_2 = 1 AND [R2_2] IS NULL) OR ([R2_2] = @Original_R2_2)) AND ((@IsNull_ItemR3_2 = 1 AND [ItemR3_2] IS NULL) OR ([ItemR3_2] = @Original_ItemR3_2)) AND ((@IsNull_R3_2 = 1 AND [R3_2] IS NULL) OR ([R3_2] = @Original_R3_2)) AND ((@IsNull_ItemR4_2 = 1 AND [ItemR4_2] IS NULL) OR ([ItemR4_2] = @Original_ItemR4_2)) AND ((@IsNull_R4_2 = 1 AND [R4_2] IS NULL) OR ([R4_2] = @Original_R4_2)) AND ((@IsNull_ItemR5_2 = 1 AND [ItemR5_2] IS NULL) OR ([ItemR5_2] = @Original_ItemR5_2)) AND ((@IsNull_R5_2 = 1 AND [R5_2] IS NULL) OR ([R5_2] = @Original_R5_2)) AND ((@IsNull_ItemR6_2 = 1 AND [ItemR6_2] IS NULL) OR ([ItemR6_2] = @Original_ItemR6_2)) AND ((@IsNull_R6_2 = 1 AND [R6_2] IS NULL) OR ([R6_2] = @Original_R6_2)) AND ((@IsNull_ItemR7_2 = 1 AND [ItemR7_2] IS NULL) OR ([ItemR7_2] = @Original_ItemR7_2)) AND ((@IsNull_R7_2 = 1 AND [R7_2] IS NULL) OR ([R7_2] = @Original_R7_2)) AND ((@IsNull_ItemR8_2 = 1 AND [ItemR8_2] IS NULL) OR ([ItemR8_2] = @Original_ItemR8_2)) AND ((@IsNull_R8_2 = 1 AND [R8_2] IS NULL) OR ([R8_2] = @Original_R8_2)) AND ((@IsNull_ItemR9_2 = 1 AND [ItemR9_2] IS NULL) OR ([ItemR9_2] = @Original_ItemR9_2)) AND ((@IsNull_R9_2 = 1 AND [R9_2] IS NULL) OR ([R9_2] = @Original_R9_2)) AND ((@IsNull_ItemR10_2 = 1 AND [ItemR10_2] IS NULL) OR ([ItemR10_2] = @Original_ItemR10_2)) AND ((@IsNull_R10_2 = 1 AND [R10_2] IS NULL) OR ([R10_2] = @Original_R10_2)) AND ((@IsNull_ItemPrj2 = 1 AND [ItemPrj2] IS NULL) OR ([ItemPrj2] = @Original_ItemPrj2)) AND ((@IsNull_Prj2 = 1 AND [Prj2] IS NULL) OR ([Prj2] = @Original_Prj2)) AND ((@IsNull_ItemSP2 = 1 AND [ItemSP2] IS NULL) OR ([ItemSP2] = @Original_ItemSP2)) AND ((@IsNull_SP2 = 1 AND [SP2] IS NULL) OR ([SP2] = @Original_SP2)) AND ((@IsNull_ItemRDG2 = 1 AND [ItemRDG2] IS NULL) OR ([ItemRDG2] = @Original_ItemRDG2)) AND ((@IsNull_RDG2 = 1 AND [RDG2] IS NULL) OR ([RDG2] = @Original_RDG2)) AND ((@IsNull_ItemExam2 = 1 AND [ItemExam2] IS NULL) OR ([ItemExam2] = @Original_ItemExam2)) AND ((@IsNull_Exam2 = 1 AND [Exam2] IS NULL) OR ([Exam2] = @Original_Exam2)) AND ((@IsNull_TotA2 = 1 AND [TotA2] IS NULL) OR ([TotA2] = @Original_TotA2)) AND ((@IsNull_TotA2skor = 1 AND [TotA2skor] IS NULL) OR ([TotA2skor] = @Original_TotA2skor)) AND ((@IsNull_A2Percent = 1 AND [A2Percent] IS NULL) OR ([A2Percent] = @Original_A2Percent)) AND ((@IsNull_A2Result = 1 AND [A2Result] IS NULL) OR ([A2Result] = @Original_A2Result)) AND ((@IsNull_TotQ2 = 1 AND [TotQ2] IS NULL) OR ([TotQ2] = @Original_TotQ2)) AND ((@IsNull_TotQ2skor = 1 AND [TotQ2skor] IS NULL) OR ([TotQ2skor] = @Original_TotQ2skor)) AND ((@IsNull_Q2Percent = 1 AND [Q2Percent] IS NULL) OR ([Q2Percent] = @Original_Q2Percent)) AND ((@IsNull_Q2Result = 1 AND [Q2Result] IS NULL) OR ([Q2Result] = @Original_Q2Result)) AND ((@IsNull_TotR2 = 1 AND [TotR2] IS NULL) OR ([TotR2] = @Original_TotR2)) AND ((@IsNull_TotR2skor = 1 AND [TotR2skor] IS NULL) OR ([TotR2skor] = @Original_TotR2skor)) AND ((@IsNull_R2Percent = 1 AND [R2Percent] IS NULL) OR ([R2Percent] = @Original_R2Percent)) AND ((@IsNull_R2Result = 1 AND [R2Result] IS NULL) OR ([R2Result] = @Original_R2Result)) AND ((@IsNull_TotPrj2 = 1 AND [TotPrj2] IS NULL) OR ([TotPrj2] = @Original_TotPrj2)) AND ((@IsNull_TotPrj2skor = 1 AND [TotPrj2skor] IS NULL) OR ([TotPrj2skor] = @Original_TotPrj2skor)) AND ((@IsNull_Prj2Percent = 1 AND [Prj2Percent] IS NULL) OR ([Prj2Percent] = @Original_Prj2Percent)) AND ((@IsNull_Prj2Result = 1 AND [Prj2Result] IS NULL) OR ([Prj2Result] = @Original_Prj2Result)) AND ((@IsNull_TotSP2 = 1 AND [TotSP2] IS NULL) OR ([TotSP2] = @Original_TotSP2)) AND ((@IsNull_TotSP2skor = 1 AND [TotSP2skor] IS NULL) OR ([TotSP2skor] = @Original_TotSP2skor)) AND ((@IsNull_SP2Percent = 1 AND [SP2Percent] IS NULL) OR ([SP2Percent] = @Original_SP2Percent)) AND ((@IsNull_SP2Result = 1 AND [SP2Result] IS NULL) OR ([SP2Result] = @Original_SP2Result)) AND ((@IsNull_TotRDG2 = 1 AND [TotRDG2] IS NULL) OR ([TotRDG2] = @Original_TotRDG2)) AND ((@IsNull_ToRDG2skor = 1 AND [ToRDG2skor] IS NULL) OR ([ToRDG2skor] = @Original_ToRDG2skor)) AND ((@IsNull_RDG2Percent = 1 AND [RDG2Percent] IS NULL) OR ([RDG2Percent] = @Original_RDG2Percent)) AND ((@IsNull_RDG2Result = 1 AND [RDG2Result] IS NULL) OR ([RDG2Result] = @Original_RDG2Result)) AND ((@IsNull_TotExam2 = 1 AND [TotExam2] IS NULL) OR ([TotExam2] = @Original_TotExam2)) AND ((@IsNull_TotExam2skor = 1 AND [TotExam2skor] IS NULL) OR ([TotExam2skor] = @Original_TotExam2skor)) AND ((@IsNull_Exam2Percent = 1 AND [Exam2Percent] IS NULL) OR ([Exam2Percent] = @Original_Exam2Percent)) AND ((@IsNull_Exam2Result = 1 AND [Exam2Result] IS NULL) OR ([Exam2Result] = @Original_Exam2Result)) AND ((@IsNull_TG2 = 1 AND [TG2] IS NULL) OR ([TG2] = @Original_TG2)) AND ((@IsNull_FG2 = 1 AND [FG2] IS NULL) OR ([FG2] = @Original_FG2)) AND ((@IsNull_Rem2 = 1 AND [Rem2] IS NULL) OR ([Rem2] = @Original_Rem2)) AND ((@IsNull_CPC2 = 1 AND [CPC2] IS NULL) OR ([CPC2] = @Original_CPC2)) AND ((@IsNull_ST2 = 1 AND [ST2] IS NULL) OR ([ST2] = @Original_ST2)) AND ((@IsNull_CFG2 = 1 AND [CFG2] IS NULL) OR ([CFG2] = @Original_CFG2)) AND ((@IsNull_CLG2 = 1 AND [CLG2] IS NULL) OR ([CLG2] = @Original_CLG2)) AND ((@IsNull_WO2Item = 1 AND [WO2Item] IS NULL) OR ([WO2Item] = @Original_WO2Item)) AND ((@IsNull_WO2 = 1 AND [WO2] IS NULL) OR ([WO2] = @Original_WO2)) AND ((@IsNull_WO2Percent = 1 AND [WO2Percent] IS NULL) OR ([WO2Percent] = @Original_WO2Percent)) AND ((@IsNull_WO2Result = 1 AND [WO2Result] IS NULL) OR ([WO2Result] = @Original_WO2Result)) AND ((@IsNull_Att2Item = 1 AND [Att2Item] IS NULL) OR ([Att2Item] = @Original_Att2Item)) AND ((@IsNull_Att2 = 1 AND [Att2] IS NULL) OR ([Att2] = @Original_Att2)) AND ((@IsNull_Att2Percent = 1 AND [Att2Percent] IS NULL) OR ([Att2Percent] = @Original_Att2Percent)) AND ((@IsNull_Att2Result = 1 AND [Att2Result] IS NULL) OR ([Att2Result] = @Original_Att2Result)) AND ((@IsNull_Punc2Item = 1 AND [Punc2Item] IS NULL) OR ([Punc2Item] = @Original_Punc2Item)) AND ((@IsNull_Punc2 = 1 AND [Punc2] IS NULL) OR ([Punc2] = @Original_Punc2)) AND ((@IsNull_Punc2Percent = 1 AND [Punc2Percent] IS NULL) OR ([Punc2Percent] = @Original_Punc2Percent)) AND ((@IsNull_Punc2Result = 1 AND [Punc2Result] IS NULL) OR ([Punc2Result] = @Original_Punc2Result)) AND ((@IsNull_Involve2Item = 1 AND [Involve2Item] IS NULL) OR ([Involve2Item] = @Original_Involve2Item)) AND ((@IsNull_Involve2 = 1 AND [Involve2] IS NULL) OR ([Involve2] = @Original_Involve2)) AND ((@IsNull_Involve2Percent = 1 AND [Involve2Percent] IS NULL) OR ([Involve2Percent] = @Original_Involve2Percent)) AND ((@IsNull_Invlove2Result = 1 AND [Invlove2Result] IS NULL) OR ([Invlove2Result] = @Original_Invlove2Result)) AND ((@IsNull_HTG2 = 1 AND [HTG2] IS NULL) OR ([HTG2] = @Original_HTG2)) AND ((@IsNull_HFG2 = 1 AND [HFG2] IS NULL) OR ([HFG2] = @Original_HFG2)) AND ((@IsNull_HRem2 = 1 AND [HRem2] IS NULL) OR ([HRem2] = @Original_HRem2)) AND ((@IsNull_Club2 = 1 AND [Club2] IS NULL) OR ([Club2] = @Original_Club2)) AND ((@IsNull_Deliber1_2Ave = 1 AND [Deliber1_2Ave] IS NULL) OR ([Deliber1_2Ave] = @Original_Deliber1_2Ave)) AND ((@IsNull_Deliber1_2Rem = 1 AND [Deliber1_2Rem] IS NULL) OR ([Deliber1_2Rem] = @Original_Deliber1_2Rem)) AND ((@IsNull_ItemA1_3 = 1 AND [ItemA1_3] IS NULL) OR ([ItemA1_3] = @Original_ItemA1_3)) AND ((@IsNull_A1_3 = 1 AND [A1_3] IS NULL) OR ([A1_3] = @Original_A1_3)) AND ((@IsNull_ItemA2_3 = 1 AND [ItemA2_3] IS NULL) OR ([ItemA2_3] = @Original_ItemA2_3)) AND ((@IsNull_A2_3 = 1 AND [A2_3] IS NULL) OR ([A2_3] = @Original_A2_3)) AND ((@IsNull_ItemA3_3 = 1 AND [ItemA3_3] IS NULL) OR ([ItemA3_3] = @Original_ItemA3_3)) AND ((@IsNull_A3_3 = 1 AND [A3_3] IS NULL) OR ([A3_3] = @Original_A3_3)) AND ((@IsNull_ItemA4_3 = 1 AND [ItemA4_3] IS NULL) OR ([ItemA4_3] = @Original_ItemA4_3)) AND ((@IsNull_A4_3 = 1 AND [A4_3] IS NULL) OR ([A4_3] = @Original_A4_3)) AND ((@IsNull_ItemA5_3 = 1 AND [ItemA5_3] IS NULL) OR ([ItemA5_3] = @Original_ItemA5_3)) AND ((@IsNull_A5_3 = 1 AND [A5_3] IS NULL) OR ([A5_3] = @Original_A5_3)) AND ((@IsNull_ItemA6_3 = 1 AND [ItemA6_3] IS NULL) OR ([ItemA6_3] = @Original_ItemA6_3)) AND ((@IsNull_A6_3 = 1 AND [A6_3] IS NULL) OR ([A6_3] = @Original_A6_3)) AND ((@IsNull_ItemA7_3 = 1 AND [ItemA7_3] IS NULL) OR ([ItemA7_3] = @Original_ItemA7_3)) AND ((@IsNull_A7_3 = 1 AND [A7_3] IS NULL) OR ([A7_3] = @Original_A7_3)) AND ((@IsNull_ItemA8_3 = 1 AND [ItemA8_3] IS NULL) OR ([ItemA8_3] = @Original_ItemA8_3)) AND ((@IsNull_A8_3 = 1 AND [A8_3] IS NULL) OR ([A8_3] = @Original_A8_3)) AND ((@IsNull_ItemA9_3 = 1 AND [ItemA9_3] IS NULL) OR ([ItemA9_3] = @Original_ItemA9_3)) AND ((@IsNull_A9_3 = 1 AND [A9_3] IS NULL) OR ([A9_3] = @Original_A9_3)) AND ((@IsNull_ItemA10_3 = 1 AND [ItemA10_3] IS NULL) OR ([ItemA10_3] = @Original_ItemA10_3)) AND ((@IsNull_A10_3 = 1 AND [A10_3] IS NULL) OR ([A10_3] = @Original_A10_3)) AND ((@IsNull_ItemQ1_3 = 1 AND [ItemQ1_3] IS NULL) OR ([ItemQ1_3] = @Original_ItemQ1_3)) AND ((@IsNull_Q1_3 = 1 AND [Q1_3] IS NULL) OR ([Q1_3] = @Original_Q1_3)) AND ((@IsNull_ItemQ2_3 = 1 AND [ItemQ2_3] IS NULL) OR ([ItemQ2_3] = @Original_ItemQ2_3)) AND ((@IsNull_Q2_3 = 1 AND [Q2_3] IS NULL) OR ([Q2_3] = @Original_Q2_3)) AND ((@IsNull_ItemQ3_3 = 1 AND [ItemQ3_3] IS NULL) OR ([ItemQ3_3] = @Original_ItemQ3_3)) AND ((@IsNull_Q3_3 = 1 AND [Q3_3] IS NULL) OR ([Q3_3] = @Original_Q3_3)) AND ((@IsNull_ItemQ4_3 = 1 AND [ItemQ4_3] IS NULL) OR ([ItemQ4_3] = @Original_ItemQ4_3)) AND ((@IsNull_Q4_3 = 1 AND [Q4_3] IS NULL) OR ([Q4_3] = @Original_Q4_3)) AND ((@IsNull_ItemQ5_3 = 1 AND [ItemQ5_3] IS NULL) OR ([ItemQ5_3] = @Original_ItemQ5_3)) AND ((@IsNull_Q5_3 = 1 AND [Q5_3] IS NULL) OR ([Q5_3] = @Original_Q5_3)) AND ((@IsNull_ItemQ6_3 = 1 AND [ItemQ6_3] IS NULL) OR ([ItemQ6_3] = @Original_ItemQ6_3)) AND ((@IsNull_Q6_3 = 1 AND [Q6_3] IS NULL) OR ([Q6_3] = @Original_Q6_3)) AND ((@IsNull_ItemQ7_3 = 1 AND [ItemQ7_3] IS NULL) OR ([ItemQ7_3] = @Original_ItemQ7_3)) AND ((@IsNull_Q7_3 = 1 AND [Q7_3] IS NULL) OR ([Q7_3] = @Original_Q7_3)) AND ((@IsNull_ItemQ8_3 = 1 AND [ItemQ8_3] IS NULL) OR ([ItemQ8_3] = @Original_ItemQ8_3)) AND ((@IsNull_Q8_3 = 1 AND [Q8_3] IS NULL) OR ([Q8_3] = @Original_Q8_3)) AND ((@IsNull_ItemQ9_3 = 1 AND [ItemQ9_3] IS NULL) OR ([ItemQ9_3] = @Original_ItemQ9_3)) AND ((@IsNull_Q9_3 = 1 AND [Q9_3] IS NULL) OR ([Q9_3] = @Original_Q9_3)) AND ((@IsNull_ItemQ10_3 = 1 AND [ItemQ10_3] IS NULL) OR ([ItemQ10_3] = @Original_ItemQ10_3)) AND ((@IsNull_Q10_3 = 1 AND [Q10_3] IS NULL) OR ([Q10_3] = @Original_Q10_3)) AND ((@IsNull_ItemR1_3 = 1 AND [ItemR1_3] IS NULL) OR ([ItemR1_3] = @Original_ItemR1_3)) AND ((@IsNull_R1_3 = 1 AND [R1_3] IS NULL) OR ([R1_3] = @Original_R1_3)) AND ((@IsNull_ItemR2_3 = 1 AND [ItemR2_3] IS NULL) OR ([ItemR2_3] = @Original_ItemR2_3)) AND ((@IsNull_R2_3 = 1 AND [R2_3] IS NULL) OR ([R2_3] = @Original_R2_3)) AND ((@IsNull_ItemR3_3 = 1 AND [ItemR3_3] IS NULL) OR ([ItemR3_3] = @Original_ItemR3_3)) AND ((@IsNull_R3_3 = 1 AND [R3_3] IS NULL) OR ([R3_3] = @Original_R3_3)) AND ((@IsNull_ItemR4_3 = 1 AND [ItemR4_3] IS NULL) OR ([ItemR4_3] = @Original_ItemR4_3)) AND ((@IsNull_R4_3 = 1 AND [R4_3] IS NULL) OR ([R4_3] = @Original_R4_3)) AND ((@IsNull_ItemR5_3 = 1 AND [ItemR5_3] IS NULL) OR ([ItemR5_3] = @Original_ItemR5_3)) AND ((@IsNull_R5_3 = 1 AND [R5_3] IS NULL) OR ([R5_3] = @Original_R5_3)) AND ((@IsNull_ItemR6_3 = 1 AND [ItemR6_3] IS NULL) OR ([ItemR6_3] = @Original_ItemR6_3)) AND ((@IsNull_R6_3 = 1 AND [R6_3] IS NULL) OR ([R6_3] = @Original_R6_3)) AND ((@IsNull_ItemR7_3 = 1 AND [ItemR7_3] IS NULL) OR ([ItemR7_3] = @Original_ItemR7_3)) AND ((@IsNull_R7_3 = 1 AND [R7_3] IS NULL) OR ([R7_3] = @Original_R7_3)) AND ((@IsNull_ItemR8_3 = 1 AND [ItemR8_3] IS NULL) OR ([ItemR8_3] = @Original_ItemR8_3)) AND ((@IsNull_R8_3 = 1 AND [R8_3] IS NULL) OR ([R8_3] = @Original_R8_3)) AND ((@IsNull_ItemR9_3 = 1 AND [ItemR9_3] IS NULL) OR ([ItemR9_3] = @Original_ItemR9_3)) AND ((@IsNull_R9_3 = 1 AND [R9_3] IS NULL) OR ([R9_3] = @Original_R9_3)) AND ((@IsNull_ItemR10_3 = 1 AND [ItemR10_3] IS NULL) OR ([ItemR10_3] = @Original_ItemR10_3)) AND ((@IsNull_R10_3 = 1 AND [R10_3] IS NULL) OR ([R10_3] = @Original_R10_3)) AND ((@IsNull_ItemPrj3 = 1 AND [ItemPrj3] IS NULL) OR ([ItemPrj3] = @Original_ItemPrj3)) AND ((@IsNull_Prj3 = 1 AND [Prj3] IS NULL) OR ([Prj3] = @Original_Prj3)) AND ((@IsNull_ItemSP3 = 1 AND [ItemSP3] IS NULL) OR ([ItemSP3] = @Original_ItemSP3)) AND ((@IsNull_SP3 = 1 AND [SP3] IS NULL) OR ([SP3] = @Original_SP3)) AND ((@IsNull_ItemRDG3 = 1 AND [ItemRDG3] IS NULL) OR ([ItemRDG3] = @Original_ItemRDG3)) AND ((@IsNull_RDG3 = 1 AND [RDG3] IS NULL) OR ([RDG3] = @Original_RDG3)) AND ((@IsNull_ItemExam3 = 1 AND [ItemExam3] IS NULL) OR ([ItemExam3] = @Original_ItemExam3)) AND ((@IsNull_Exam3 = 1 AND [Exam3] IS NULL) OR ([Exam3] = @Original_Exam3)) AND ((@IsNull_TotA3 = 1 AND [TotA3] IS NULL) OR ([TotA3] = @Original_TotA3)) AND ((@IsNull_TotA3skor = 1 AND [TotA3skor] IS NULL) OR ([TotA3skor] = @Original_TotA3skor)) AND ((@IsNull_A3Percent = 1 AND [A3Percent] IS NULL) OR ([A3Percent] = @Original_A3Percent)) AND ((@IsNull_A3Result = 1 AND [A3Result] IS NULL) OR ([A3Result] = @Original_A3Result)) AND ((@IsNull_TotQ3 = 1 AND [TotQ3] IS NULL) OR ([TotQ3] = @Original_TotQ3)) AND ((@IsNull_TotQ3skor = 1 AND [TotQ3skor] IS NULL) OR ([TotQ3skor] = @Original_TotQ3skor)) AND ((@IsNull_Q3Percent = 1 AND [Q3Percent] IS NULL) OR ([Q3Percent] = @Original_Q3Percent)) AND ((@IsNull_Q3Result = 1 AND [Q3Result] IS NULL) OR ([Q3Result] = @Original_Q3Result)) AND ((@IsNull_TotR3 = 1 AND [TotR3] IS NULL) OR ([TotR3] = @Original_TotR3)) AND ((@IsNull_TotR3skor = 1 AND [TotR3skor] IS NULL) OR ([TotR3skor] = @Original_TotR3skor)) AND ((@IsNull_R3Percent = 1 AND [R3Percent] IS NULL) OR ([R3Percent] = @Original_R3Percent)) AND ((@IsNull_R3Result = 1 AND [R3Result] IS NULL) OR ([R3Result] = @Original_R3Result)) AND ((@IsNull_TotPrj3 = 1 AND [TotPrj3] IS NULL) OR ([TotPrj3] = @Original_TotPrj3)) AND ((@IsNull_TotPrj3skor = 1 AND [TotPrj3skor] IS NULL) OR ([TotPrj3skor] = @Original_TotPrj3skor)) AND ((@IsNull_Prj3Percent = 1 AND [Prj3Percent] IS NULL) OR ([Prj3Percent] = @Original_Prj3Percent)) AND ((@IsNull_Prj3Result = 1 AND [Prj3Result] IS NULL) OR ([Prj3Result] = @Original_Prj3Result)) AND ((@IsNull_TotSP3 = 1 AND [TotSP3] IS NULL) OR ([TotSP3] = @Original_TotSP3)) AND ((@IsNull_TotSP3skor = 1 AND [TotSP3skor] IS NULL) OR ([TotSP3skor] = @Original_TotSP3skor)) AND ((@IsNull_SP3Percent = 1 AND [SP3Percent] IS NULL) OR ([SP3Percent] = @Original_SP3Percent)) AND ((@IsNull_SP3Result = 1 AND [SP3Result] IS NULL) OR ([SP3Result] = @Original_SP3Result)) AND ((@IsNull_TotRDG3 = 1 AND [TotRDG3] IS NULL) OR ([TotRDG3] = @Original_TotRDG3)) AND ((@IsNull_ToRDG3skor = 1 AND [ToRDG3skor] IS NULL) OR ([ToRDG3skor] = @Original_ToRDG3skor)) AND ((@IsNull_RDG3Percent = 1 AND [RDG3Percent] IS NULL) OR ([RDG3Percent] = @Original_RDG3Percent)) AND ((@IsNull_RDG3Result = 1 AND [RDG3Result] IS NULL) OR ([RDG3Result] = @Original_RDG3Result)) AND ((@IsNull_TotExam3 = 1 AND [TotExam3] IS NULL) OR ([TotExam3] = @Original_TotExam3)) AND ((@IsNull_TotExam3skor = 1 AND [TotExam3skor] IS NULL) OR ([TotExam3skor] = @Original_TotExam3skor)) AND ((@IsNull_Exam3Percent = 1 AND [Exam3Percent] IS NULL) OR ([Exam3Percent] = @Original_Exam3Percent)) AND ((@IsNull_Exam3Result = 1 AND [Exam3Result] IS NULL) OR ([Exam3Result] = @Original_Exam3Result)) AND ((@IsNull_TG3 = 1 AND [TG3] IS NULL) OR ([TG3] = @Original_TG3)) AND ((@IsNull_FG3 = 1 AND [FG3] IS NULL) OR ([FG3] = @Original_FG3)) AND ((@IsNull_Rem3 = 1 AND [Rem3] IS NULL) OR ([Rem3] = @Original_Rem3)) AND ((@IsNull_CPC3 = 1 AND [CPC3] IS NULL) OR ([CPC3] = @Original_CPC3)) AND ((@IsNull_ST3 = 1 AND [ST3] IS NULL) OR ([ST3] = @Original_ST3)) AND ((@IsNull_CFG3 = 1 AND [CFG3] IS NULL) OR ([CFG3] = @Original_CFG3)) AND ((@IsNull_CLG3 = 1 AND [CLG3] IS NULL) OR ([CLG3] = @Original_CLG3)) AND ((@IsNull_WO3Item = 1 AND [WO3Item] IS NULL) OR ([WO3Item] = @Original_WO3Item)) AND ((@IsNull_WO3 = 1 AND [WO3] IS NULL) OR ([WO3] = @Original_WO3)) AND ((@IsNull_WO3Percent = 1 AND [WO3Percent] IS NULL) OR ([WO3Percent] = @Original_WO3Percent)) AND ((@IsNull_WO3Result = 1 AND [WO3Result] IS NULL) OR ([WO3Result] = @Original_WO3Result)) AND ((@IsNull_Att3Item = 1 AND [Att3Item] IS NULL) OR ([Att3Item] = @Original_Att3Item)) AND ((@IsNull_Att3 = 1 AND [Att3] IS NULL) OR ([Att3] = @Original_Att3)) AND ((@IsNull_Att3Percent = 1 AND [Att3Percent] IS NULL) OR ([Att3Percent] = @Original_Att3Percent)) AND ((@IsNull_Att3Result = 1 AND [Att3Result] IS NULL) OR ([Att3Result] = @Original_Att3Result)) AND ((@IsNull_Punc3Item = 1 AND [Punc3Item] IS NULL) OR ([Punc3Item] = @Original_Punc3Item)) AND ((@IsNull_Punc3 = 1 AND [Punc3] IS NULL) OR ([Punc3] = @Original_Punc3)) AND ((@IsNull_Punc3Percent = 1 AND [Punc3Percent] IS NULL) OR ([Punc3Percent] = @Original_Punc3Percent)) AND ((@IsNull_Punc3Result = 1 AND [Punc3Result] IS NULL) OR ([Punc3Result] = @Original_Punc3Result)) AND ((@IsNull_Involve3Item = 1 AND [Involve3Item] IS NULL) OR ([Involve3Item] = @Original_Involve3Item)) AND ((@IsNull_Involve3 = 1 AND [Involve3] IS NULL) OR ([Involve3] = @Original_Involve3)) AND ((@IsNull_Involve3Percent = 1 AND [Involve3Percent] IS NULL) OR ([Involve3Percent] = @Original_Involve3Percent)) AND ((@IsNull_Involve3Result = 1 AND [Involve3Result] IS NULL) OR ([Involve3Result] = @Original_Involve3Result)) AND ((@IsNull_HTG3 = 1 AND [HTG3] IS NULL) OR ([HTG3] = @Original_HTG3)) AND ((@IsNull_HFG3 = 1 AND [HFG3] IS NULL) OR ([HFG3] = @Original_HFG3)) AND ((@IsNull_HRem3 = 1 AND [HRem3] IS NULL) OR ([HRem3] = @Original_HRem3)) AND ((@IsNull_Club3 = 1 AND [Club3] IS NULL) OR ([Club3] = @Original_Club3)) AND ((@IsNull_Deliber1_3Ave = 1 AND [Deliber1_3Ave] IS NULL) OR ([Deliber1_3Ave] = @Original_Deliber1_3Ave)) AND ((@IsNull_Deliber1_3Rem = 1 AND [Deliber1_3Rem] IS NULL) OR ([Deliber1_3Rem] = @Original_Deliber1_3Rem)) AND ((@IsNull_ItemA1_4 = 1 AND [ItemA1_4] IS NULL) OR ([ItemA1_4] = @Original_ItemA1_4)) AND ((@IsNull_A1_4 = 1 AND [A1_4] IS NULL) OR ([A1_4] = @Original_A1_4)) AND ((@IsNull_ItemA2_4 = 1 AND [ItemA2_4] IS NULL) OR ([ItemA2_4] = @Original_ItemA2_4)) AND ((@IsNull_A2_4 = 1 AND [A2_4] IS NULL) OR ([A2_4] = @Original_A2_4)) AND ((@IsNull_ItemA3_4 = 1 AND [ItemA3_4] IS NULL) OR ([ItemA3_4] = @Original_ItemA3_4)) AND ((@IsNull_A3_4 = 1 AND [A3_4] IS NULL) OR ([A3_4] = @Original_A3_4)) AND ((@IsNull_ItemA4_4 = 1 AND [ItemA4_4] IS NULL) OR ([ItemA4_4] = @Original_ItemA4_4)) AND ((@IsNull_A4_4 = 1 AND [A4_4] IS NULL) OR ([A4_4] = @Original_A4_4)) AND ((@IsNull_ItemA5_4 = 1 AND [ItemA5_4] IS NULL) OR ([ItemA5_4] = @Original_ItemA5_4)) AND ((@IsNull_A5_4 = 1 AND [A5_4] IS NULL) OR ([A5_4] = @Original_A5_4)) AND ((@IsNull_ItemA6_4 = 1 AND [ItemA6_4] IS NULL) OR ([ItemA6_4] = @Original_ItemA6_4)) AND ((@IsNull_A6_4 = 1 AND [A6_4] IS NULL) OR ([A6_4] = @Original_A6_4)) AND ((@IsNull_ItemA7_4 = 1 AND [ItemA7_4] IS NULL) OR ([ItemA7_4] = @Original_ItemA7_4)) AND ((@IsNull_A7_4 = 1 AND [A7_4] IS NULL) OR ([A7_4] = @Original_A7_4)) AND ((@IsNull_ItemA8_4 = 1 AND [ItemA8_4] IS NULL) OR ([ItemA8_4] = @Original_ItemA8_4)) AND ((@IsNull_A8_4 = 1 AND [A8_4] IS NULL) OR ([A8_4] = @Original_A8_4)) AND ((@IsNull_ItemA9_4 = 1 AND [ItemA9_4] IS NULL) OR ([ItemA9_4] = @Original_ItemA9_4)) AND ((@IsNull_A9_4 = 1 AND [A9_4] IS NULL) OR ([A9_4] = @Original_A9_4)) AND ((@IsNull_ItemA10_4 = 1 AND [ItemA10_4] IS NULL) OR ([ItemA10_4] = @Original_ItemA10_4)) AND ((@IsNull_A10_4 = 1 AND [A10_4] IS NULL) OR ([A10_4] = @Original_A10_4)) AND ((@IsNull_ItemQ1_4 = 1 AND [ItemQ1_4] IS NULL) OR ([ItemQ1_4] = @Original_ItemQ1_4)) AND ((@IsNull_Q1_4 = 1 AND [Q1_4] IS NULL) OR ([Q1_4] = @Original_Q1_4)) AND ((@IsNull_ItemQ2_4 = 1 AND [ItemQ2_4] IS NULL) OR ([ItemQ2_4] = @Original_ItemQ2_4)) AND ((@IsNull_Q2_4 = 1 AND [Q2_4] IS NULL) OR ([Q2_4] = @Original_Q2_4)) AND ((@IsNull_ItemQ3_4 = 1 AND [ItemQ3_4] IS NULL) OR ([ItemQ3_4] = @Original_ItemQ3_4)) AND ((@IsNull_Q3_4 = 1 AND [Q3_4] IS NULL) OR ([Q3_4] = @Original_Q3_4)) AND ((@IsNull_ItemQ4_4 = 1 AND [ItemQ4_4] IS NULL) OR ([ItemQ4_4] = @Original_ItemQ4_4)) AND ((@IsNull_Q4_4 = 1 AND [Q4_4] IS NULL) OR ([Q4_4] = @Original_Q4_4)) AND ((@IsNull_ItemQ5_4 = 1 AND [ItemQ5_4] IS NULL) OR ([ItemQ5_4] = @Original_ItemQ5_4)) AND ((@IsNull_Q5_4 = 1 AND [Q5_4] IS NULL) OR ([Q5_4] = @Original_Q5_4)) AND ((@IsNull_ItemQ6_4 = 1 AND [ItemQ6_4] IS NULL) OR ([ItemQ6_4] = @Original_ItemQ6_4)) AND ((@IsNull_Q6_4 = 1 AND [Q6_4] IS NULL) OR ([Q6_4] = @Original_Q6_4)) AND ((@IsNull_ItemQ7_4 = 1 AND [ItemQ7_4] IS NULL) OR ([ItemQ7_4] = @Original_ItemQ7_4)) AND ((@IsNull_Q7_4 = 1 AND [Q7_4] IS NULL) OR ([Q7_4] = @Original_Q7_4)) AND ((@IsNull_ItemQ8_4 = 1 AND [ItemQ8_4] IS NULL) OR ([ItemQ8_4] = @Original_ItemQ8_4)) AND ((@IsNull_Q8_4 = 1 AND [Q8_4] IS NULL) OR ([Q8_4] = @Original_Q8_4)) AND ((@IsNull_ItemQ9_4 = 1 AND [ItemQ9_4] IS NULL) OR ([ItemQ9_4] = @Original_ItemQ9_4)) AND ((@IsNull_Q9_4 = 1 AND [Q9_4] IS NULL) OR ([Q9_4] = @Original_Q9_4)) AND ((@IsNull_ItemQ10_4 = 1 AND [ItemQ10_4] IS NULL) OR ([ItemQ10_4] = @Original_ItemQ10_4)) AND ((@IsNull_Q10_4 = 1 AND [Q10_4] IS NULL) OR ([Q10_4] = @Original_Q10_4)) AND ((@IsNull_ItemR1_4 = 1 AND [ItemR1_4] IS NULL) OR ([ItemR1_4] = @Original_ItemR1_4)) AND ((@IsNull_R1_4 = 1 AND [R1_4] IS NULL) OR ([R1_4] = @Original_R1_4)) AND ((@IsNull_ItemR2_4 = 1 AND [ItemR2_4] IS NULL) OR ([ItemR2_4] = @Original_ItemR2_4)) AND ((@IsNull_R2_4 = 1 AND [R2_4] IS NULL) OR ([R2_4] = @Original_R2_4)) AND ((@IsNull_ItemR3_4 = 1 AND [ItemR3_4] IS NULL) OR ([ItemR3_4] = @Original_ItemR3_4)) AND ((@IsNull_R3_4 = 1 AND [R3_4] IS NULL) OR ([R3_4] = @Original_R3_4)) AND ((@IsNull_ItemR4_4 = 1 AND [ItemR4_4] IS NULL) OR ([ItemR4_4] = @Original_ItemR4_4)) AND ((@IsNull_R4_4 = 1 AND [R4_4] IS NULL) OR ([R4_4] = @Original_R4_4)) AND ((@IsNull_ItemR5_4 = 1 AND [ItemR5_4] IS NULL) OR ([ItemR5_4] = @Original_ItemR5_4)) AND ((@IsNull_R5_4 = 1 AND [R5_4] IS NULL) OR ([R5_4] = @Original_R5_4)) AND ((@IsNull_ItemR6_4 = 1 AND [ItemR6_4] IS NULL) OR ([ItemR6_4] = @Original_ItemR6_4)) AND ((@IsNull_R6_4 = 1 AND [R6_4] IS NULL) OR ([R6_4] = @Original_R6_4)) AND ((@IsNull_ItemR7_4 = 1 AND [ItemR7_4] IS NULL) OR ([ItemR7_4] = @Original_ItemR7_4)) AND ((@IsNull_R7_4 = 1 AND [R7_4] IS NULL) OR ([R7_4] = @Original_R7_4)) AND ((@IsNull_ItemR8_4 = 1 AND [ItemR8_4] IS NULL) OR ([ItemR8_4] = @Original_ItemR8_4)) AND ((@IsNull_R8_4 = 1 AND [R8_4] IS NULL) OR ([R8_4] = @Original_R8_4)) AND ((@IsNull_ItemR9_4 = 1 AND [ItemR9_4] IS NULL) OR ([ItemR9_4] = @Original_ItemR9_4)) AND ((@IsNull_R9_4 = 1 AND [R9_4] IS NULL) OR ([R9_4] = @Original_R9_4)) AND ((@IsNull_ItemR10_4 = 1 AND [ItemR10_4] IS NULL) OR ([ItemR10_4] = @Original_ItemR10_4)) AND ((@IsNull_R10_4 = 1 AND [R10_4] IS NULL) OR ([R10_4] = @Original_R10_4)) AND ((@IsNull_ItemPrj4 = 1 AND [ItemPrj4] IS NULL) OR ([ItemPrj4] = @Original_ItemPrj4)) AND ((@IsNull_Prj4 = 1 AND [Prj4] IS NULL) OR ([Prj4] = @Original_Prj4)) AND ((@IsNull_ItemSP4 = 1 AND [ItemSP4] IS NULL) OR ([ItemSP4] = @Original_ItemSP4)) AND ((@IsNull_SP4 = 1 AND [SP4] IS NULL) OR ([SP4] = @Original_SP4)) AND ((@IsNull_ItemRDG4 = 1 AND [ItemRDG4] IS NULL) OR ([ItemRDG4] = @Original_ItemRDG4)) AND ((@IsNull_RDG4 = 1 AND [RDG4] IS NULL) OR ([RDG4] = @Original_RDG4)) AND ((@IsNull_ItemExam4 = 1 AND [ItemExam4] IS NULL) OR ([ItemExam4] = @Original_ItemExam4)) AND ((@IsNull_Exam4 = 1 AND [Exam4] IS NULL) OR ([Exam4] = @Original_Exam4)) AND ((@IsNull_TotA4 = 1 AND [TotA4] IS NULL) OR ([TotA4] = @Original_TotA4)) AND ((@IsNull_TotA4skor = 1 AND [TotA4skor] IS NULL) OR ([TotA4skor] = @Original_TotA4skor)) AND ((@IsNull_A4Percent = 1 AND [A4Percent] IS NULL) OR ([A4Percent] = @Original_A4Percent)) AND ((@IsNull_A4Result = 1 AND [A4Result] IS NULL) OR ([A4Result] = @Original_A4Result)) AND ((@IsNull_TotQ4 = 1 AND [TotQ4] IS NULL) OR ([TotQ4] = @Original_TotQ4)) AND ((@IsNull_TotQ4skor = 1 AND [TotQ4skor] IS NULL) OR ([TotQ4skor] = @Original_TotQ4skor)) AND ((@IsNull_Q4Percent = 1 AND [Q4Percent] IS NULL) OR ([Q4Percent] = @Original_Q4Percent)) AND ((@IsNull_Q4Result = 1 AND [Q4Result] IS NULL) OR ([Q4Result] = @Original_Q4Result)) AND ((@IsNull_TotR4 = 1 AND [TotR4] IS NULL) OR ([TotR4] = @Original_TotR4)) AND ((@IsNull_TotR4skor = 1 AND [TotR4skor] IS NULL) OR ([TotR4skor] = @Original_TotR4skor)) AND ((@IsNull_R4Percent = 1 AND [R4Percent] IS NULL) OR ([R4Percent] = @Original_R4Percent)) AND ((@IsNull_R4Result = 1 AND [R4Result] IS NULL) OR ([R4Result] = @Original_R4Result)) AND ((@IsNull_TotPrj4 = 1 AND [TotPrj4] IS NULL) OR ([TotPrj4] = @Original_TotPrj4)) AND ((@IsNull_TotPrj4skor = 1 AND [TotPrj4skor] IS NULL) OR ([TotPrj4skor] = @Original_TotPrj4skor)) AND ((@IsNull_Prj4Percent = 1 AND [Prj4Percent] IS NULL) OR ([Prj4Percent] = @Original_Prj4Percent)) AND ((@IsNull_Prj4Result = 1 AND [Prj4Result] IS NULL) OR ([Prj4Result] = @Original_Prj4Result)) AND ((@IsNull_TotSP4 = 1 AND [TotSP4] IS NULL) OR ([TotSP4] = @Original_TotSP4)) AND ((@IsNull_TotSP4skor = 1 AND [TotSP4skor] IS NULL) OR ([TotSP4skor] = @Original_TotSP4skor)) AND ((@IsNull_SP4Percent = 1 AND [SP4Percent] IS NULL) OR ([SP4Percent] = @Original_SP4Percent)) AND ((@IsNull_SP4Result = 1 AND [SP4Result] IS NULL) OR ([SP4Result] = @Original_SP4Result)) AND ((@IsNull_TotRDG4 = 1 AND [TotRDG4] IS NULL) OR ([TotRDG4] = @Original_TotRDG4)) AND ((@IsNull_ToRDG4skor = 1 AND [ToRDG4skor] IS NULL) OR ([ToRDG4skor] = @Original_ToRDG4skor)) AND ((@IsNull_RDG4Percent = 1 AND [RDG4Percent] IS NULL) OR ([RDG4Percent] = @Original_RDG4Percent)) AND ((@IsNull_RDG4Result = 1 AND [RDG4Result] IS NULL) OR ([RDG4Result] = @Original_RDG4Result)) AND ((@IsNull_TotExam4 = 1 AND [TotExam4] IS NULL) OR ([TotExam4] = @Original_TotExam4)) AND ((@IsNull_TotExam4skor = 1 AND [TotExam4skor] IS NULL) OR ([TotExam4skor] = @Original_TotExam4skor)) AND ((@IsNull_Exam4Percent = 1 AND [Exam4Percent] IS NULL) OR ([Exam4Percent] = @Original_Exam4Percent)) AND ((@IsNull_Exam4Result = 1 AND [Exam4Result] IS NULL) OR ([Exam4Result] = @Original_Exam4Result)) AND ((@IsNull_TG4 = 1 AND [TG4] IS NULL) OR ([TG4] = @Original_TG4)) AND ((@IsNull_FG4 = 1 AND [FG4] IS NULL) OR ([FG4] = @Original_FG4)) AND ((@IsNull_Rem4 = 1 AND [Rem4] IS NULL) OR ([Rem4] = @Original_Rem4)) AND ((@IsNull_CPC4 = 1 AND [CPC4] IS NULL) OR ([CPC4] = @Original_CPC4)) AND ((@IsNull_ST4 = 1 AND [ST4] IS NULL) OR ([ST4] = @Original_ST4)) AND ((@IsNull_CFG4 = 1 AND [CFG4] IS NULL) OR ([CFG4] = @Original_CFG4)) AND ((@IsNull_CLG4 = 1 AND [CLG4] IS NULL) OR ([CLG4] = @Original_CLG4)) AND ((@IsNull_WO4Item = 1 AND [WO4Item] IS NULL) OR ([WO4Item] = @Original_WO4Item)) AND ((@IsNull_WO4 = 1 AND [WO4] IS NULL) OR ([WO4] = @Original_WO4)) AND ((@IsNull_WO4Percent = 1 AND [WO4Percent] IS NULL) OR ([WO4Percent] = @Original_WO4Percent)) AND ((@IsNull_WO4Result = 1 AND [WO4Result] IS NULL) OR ([WO4Result] = @Original_WO4Result)) AND ((@IsNull_Att4Item = 1 AND [Att4Item] IS NULL) OR ([Att4Item] = @Original_Att4Item)) AND ((@IsNull_Att4 = 1 AND [Att4] IS NULL) OR ([Att4] = @Original_Att4)) AND ((@IsNull_Att4Percent = 1 AND [Att4Percent] IS NULL) OR ([Att4Percent] = @Original_Att4Percent)) AND ((@IsNull_Att4Result = 1 AND [Att4Result] IS NULL) OR ([Att4Result] = @Original_Att4Result)) AND ((@IsNull_Punc4Item = 1 AND [Punc4Item] IS NULL) OR ([Punc4Item] = @Original_Punc4Item)) AND ((@IsNull_Punc4 = 1 AND [Punc4] IS NULL) OR ([Punc4] = @Original_Punc4)) AND ((@IsNull_Punc4Percent = 1 AND [Punc4Percent] IS NULL) OR ([Punc4Percent] = @Original_Punc4Percent)) AND ((@IsNull_Punc4Result = 1 AND [Punc4Result] IS NULL) OR ([Punc4Result] = @Original_Punc4Result)) AND ((@IsNull_Involve4Item = 1 AND [Involve4Item] IS NULL) OR ([Involve4Item] = @Original_Involve4Item)) AND ((@IsNull_Involve4 = 1 AND [Involve4] IS NULL) OR ([Involve4] = @Original_Involve4)) AND ((@IsNull_Involve4Percent = 1 AND [Involve4Percent] IS NULL) OR ([Involve4Percent] = @Original_Involve4Percent)) AND ((@IsNull_Involve4Result = 1 AND [Involve4Result] IS NULL) OR ([Involve4Result] = @Original_Involve4Result)) AND ((@IsNull_HTG4 = 1 AND [HTG4] IS NULL) OR ([HTG4] = @Original_HTG4)) AND ((@IsNull_HFG4 = 1 AND [HFG4] IS NULL) OR ([HFG4] = @Original_HFG4)) AND ((@IsNull_HRem4 = 1 AND [HRem4] IS NULL) OR ([HRem4] = @Original_HRem4)) AND ((@IsNull_Club4 = 1 AND [Club4] IS NULL) OR ([Club4] = @Original_Club4)) AND ((@IsNull_FinalAve = 1 AND [FinalAve] IS NULL) OR ([FinalAve] = @Original_FinalAve)) AND ((@IsNull_FinalRem = 1 AND [FinalRem] IS NULL) OR ([FinalRem] = @Original_FinalRem)) AND ((@IsNull_GA1_1 = 1 AND [GA1_1] IS NULL) OR ([GA1_1] = @Original_GA1_1)) AND ((@IsNull_GA1_2 = 1 AND [GA1_2] IS NULL) OR ([GA1_2] = @Original_GA1_2)) AND ((@IsNull_GA1_3 = 1 AND [GA1_3] IS NULL) OR ([GA1_3] = @Original_GA1_3)) AND ((@IsNull_GA1_4 = 1 AND [GA1_4] IS NULL) OR ([GA1_4] = @Original_GA1_4)) AND ((@IsNull_GA1_5 = 1 AND [GA1_5] IS NULL) OR ([GA1_5] = @Original_GA1_5)) AND ((@IsNull_GA1_6 = 1 AND [GA1_6] IS NULL) OR ([GA1_6] = @Original_GA1_6)) AND ((@IsNull_GA1_7 = 1 AND [GA1_7] IS NULL) OR ([GA1_7] = @Original_GA1_7)) AND ((@IsNull_TotGA1 = 1 AND [TotGA1] IS NULL) OR ([TotGA1] = @Original_TotGA1)) AND ((@IsNull_GExam1 = 1 AND [GExam1] IS NULL) OR ([GExam1] = @Original_GExam1)) AND ((@IsNull_GTG1 = 1 AND [GTG1] IS NULL) OR ([GTG1] = @Original_GTG1)) AND ((@IsNull_GFG1 = 1 AND [GFG1] IS NULL) OR ([GFG1] = @Original_GFG1)) AND ((@IsNull_GRem1 = 1 AND [GRem1] IS NULL) OR ([GRem1] = @Original_GRem1)) AND ((@IsNull_Pen1_1 = 1 AND [Pen1_1] IS NULL) OR ([Pen1_1] = @Original_Pen1_1)) AND ((@IsNull_Pen1_2 = 1 AND [Pen1_2] IS NULL) OR ([Pen1_2] = @Original_Pen1_2)) AND ((@IsNull_Pen1_3 = 1 AND [Pen1_3] IS NULL) OR ([Pen1_3] = @Original_Pen1_3)) AND ((@IsNull_Pen1_4 = 1 AND [Pen1_4] IS NULL) OR ([Pen1_4] = @Original_Pen1_4)) AND ((@IsNull_Pen1_5 = 1 AND [Pen1_5] IS NULL) OR ([Pen1_5] = @Original_Pen1_5)) AND ((@IsNull_Pen1_6 = 1 AND [Pen1_6] IS NULL) OR ([Pen1_6] = @Original_Pen1_6)) AND ((@IsNull_Pen1_7 = 1 AND [Pen1_7] IS NULL) OR ([Pen1_7] = @Original_Pen1_7)) AND ((@IsNull_Pen1_8 = 1 AND [Pen1_8] IS NULL) OR ([Pen1_8] = @Original_Pen1_8)) AND ((@IsNull_Pen1_9 = 1 AND [Pen1_9] IS NULL) OR ([Pen1_9] = @Original_Pen1_9)) AND ((@IsNull_Pen1_10 = 1 AND [Pen1_10] IS NULL) OR ([Pen1_10] = @Original_Pen1_10)) AND ((@IsNull_Pen1Tot = 1 AND [Pen1Tot] IS NULL) OR ([Pen1Tot] = @Original_Pen1Tot)) AND ((@IsNull_PenTG1 = 1 AND [PenTG1] IS NULL) OR ([PenTG1] = @Original_PenTG1)) AND ((@IsNull_PenFG1 = 1 AND [PenFG1] IS NULL) OR ([PenFG1] = @Original_PenFG1)) AND ((@IsNull_PenRem1 = 1 AND [PenRem1] IS NULL) OR ([PenRem1] = @Original_PenRem1)));
    SELECT Ukey, IDNo, LastName, FirstName, MiddleName, Gender, Address, YearLevel, SubjectName, Time, SectionName, Teacher, ItemA1_1, A1_1, ItemA2_1, A2_1, ItemA3_1, A3_1, ItemA4_1, A4_1, ItemA5_1, A5_1, ItemA6_1, A6_1, ItemA7_1, A7_1, ItemA8_1, A8_1, ItemA9_1, A9_1, ItemA10_1, A10_1, ItemQ1_1, Q1_1, ItemQ2_1, Q2_1, ItemQ3_1, Q3_1, ItemQ4_1, Q4_1, ItemQ5_1, Q5_1, ItemQ6_1, Q6_1, ItemQ7_1, Q7_1, ItemQ8_1, Q8_1, ItemQ9_1, Q9_1, ItemQ10_1, Q10_1, ItemR1_1, R1_1, ItemR2_1, R2_1, ItemR3_1, R3_1, ItemR4_1, R4_1, ItemR5_1, R5_1, ItemR6_1, R6_1, ItemR7_1, R7_1, ItemR8_1, R8_1, ItemR9_1, R9_1, ItemR10_1, R10_1, ItemPrj1, Prj1, ItemSP1, SP1, ItemRDG1, RDG1, ItemExam1, Exam1, TotA1, TotA1skor, A1Percent, A1Result, TotQ1, TotQ1skor, Q1Percent, Q1Result, TotR1, TotR1skor, R1Percent, R1Result, TotPrj1, TotPrj1skor, Prj1Percent, Prj1Result, TotSP1, TotSP1skor, SP1Percent, SP1Result, TotRDG1, ToRDG1skor, RDG1Percent, RDG1Result, TotExam1, TotExam1skor, Exam1Percent, Exam1Result, TG1, FG1, Rem1, CPC1, ST1, CFG1, CLG1, WO1Item, WO1, WO1Percent, WO1Result, Att1Item, Att1, Att1Percent, Att1Result, Punc1Item, Punc1, Punc1Percent, Punc1Result, Involve1Item, Involve1, Involve1Percent, Invlove1Result, HTG1, HFG1, HRem1, Club1, ItemA1_2, A1_2, ItemA2_2, A2_2, ItemA3_2, A3_2, ItemA4_2, A4_2, ItemA5_2, A5_2, ItemA6_2, A6_2, ItemA7_2, A7_2, ItemA8_2, A8_2, ItemA9_2, A9_2, ItemA10_2, A10_2, ItemQ1_2, Q1_2, ItemQ2_2, Q2_2, ItemQ3_2, Q3_2, ItemQ4_2, Q4_2, ItemQ5_2, Q5_2, ItemQ6_2, Q6_2, ItemQ7_2, Q7_2, ItemQ8_2, Q8_2, ItemQ9_2, Q9_2, ItemQ10_2, Q10_2, ItemR1_2, R1_2, ItemR2_2, R2_2, ItemR3_2, R3_2, ItemR4_2, R4_2, ItemR5_2, R5_2, ItemR6_2, R6_2, ItemR7_2, R7_2, ItemR8_2, R8_2, ItemR9_2, R9_2, ItemR10_2, R10_2, ItemPrj2, Prj2, ItemSP2, SP2, ItemRDG2, RDG2, ItemExam2, Exam2, TotA2, TotA2skor, A2Percent, A2Result, TotQ2, TotQ2skor, Q2Percent, Q2Result, TotR2, TotR2skor, R2Percent, R2Result, TotPrj2, TotPrj2skor, Prj2Percent, Prj2Result, TotSP2, TotSP2skor, SP2Percent, SP2Result, TotRDG2, ToRDG2skor, RDG2Percent, RDG2Result, TotExam2, TotExam2skor, Exam2Percent, Exam2Result, TG2, FG2, Rem2, CPC2, ST2, CFG2, CLG2, WO2Item, WO2, WO2Percent, WO2Result, Att2Item, Att2, Att2Percent, Att2Result, Punc2Item, Punc2, Punc2Percent, Punc2Result, Involve2Item, Involve2, Involve2Percent, Invlove2Result, HTG2, HFG2, HRem2, Club2, Deliber1_2Ave, Deliber1_2Rem, ItemA1_3, A1_3, ItemA2_3, A2_3, ItemA3_3, A3_3, ItemA4_3, A4_3, ItemA5_3, A5_3, ItemA6_3, A6_3, ItemA7_3, A7_3, ItemA8_3, A8_3, ItemA9_3, A9_3, ItemA10_3, A10_3, ItemQ1_3, Q1_3, ItemQ2_3, Q2_3, ItemQ3_3, Q3_3, ItemQ4_3, Q4_3, ItemQ5_3, Q5_3, ItemQ6_3, Q6_3, ItemQ7_3, Q7_3, ItemQ8_3, Q8_3, ItemQ9_3, Q9_3, ItemQ10_3, Q10_3, ItemR1_3, R1_3, ItemR2_3, R2_3, ItemR3_3, R3_3, ItemR4_3, R4_3, ItemR5_3, R5_3, ItemR6_3, R6_3, ItemR7_3, R7_3, ItemR8_3, R8_3, ItemR9_3, R9_3, ItemR10_3, R10_3, ItemPrj3, Prj3, ItemSP3, SP3, ItemRDG3, RDG3, ItemExam3, Exam3, TotA3, TotA3skor, A3Percent, A3Result, TotQ3, TotQ3skor, Q3Percent, Q3Result, TotR3, TotR3skor, R3Percent, R3Result, TotPrj3, TotPrj3skor, Prj3Percent, Prj3Result, TotSP3, TotSP3skor, SP3Percent, SP3Result, TotRDG3, ToRDG3skor, RDG3Percent, RDG3Result, TotExam3, TotExam3skor, Exam3Percent, Exam3Result, TG3, FG3, Rem3, CPC3, ST3, CFG3, CLG3, WO3Item, WO3, WO3Percent, WO3Result, Att3Item, Att3, Att3Percent, Att3Result, Punc3Item, Punc3, Punc3Percent, Punc3Result, Involve3Item, Involve3, Involve3Percent, Involve3Result, HTG3, HFG3, HRem3, Club3, Deliber1_3Ave, Deliber1_3Rem, ItemA1_4, A1_4, ItemA2_4, A2_4, ItemA3_4, A3_4, ItemA4_4, A4_4, ItemA5_4, A5_4, ItemA6_4, A6_4, ItemA7_4, A7_4, ItemA8_4, A8_4, ItemA9_4, A9_4, ItemA10_4, A10_4, ItemQ1_4, Q1_4, ItemQ2_4, Q2_4, ItemQ3_4, Q3_4, ItemQ4_4, Q4_4, ItemQ5_4, Q5_4, ItemQ6_4, Q6_4, ItemQ7_4, Q7_4, ItemQ8_4, Q8_4, ItemQ9_4, Q9_4, ItemQ10_4, Q10_4, ItemR1_4, R1_4, ItemR2_4, R2_4, ItemR3_4, R3_4, ItemR4_4, R4_4, ItemR5_4, R5_4, ItemR6_4, R6_4, ItemR7_4, R7_4, ItemR8_4, R8_4, ItemR9_4, R9_4, ItemR10_4, R10_4, ItemPrj4, Prj4, ItemSP4, SP4, ItemRDG4, RDG4, ItemExam4, Exam4, TotA4, TotA4skor, A4Percent, A4Result, TotQ4, TotQ4skor, Q4Percent, Q4Result, TotR4, TotR4skor, R4Percent, R4Result, TotPrj4, TotPrj4skor, Prj4Percent, Prj4Result, TotSP4, TotSP4skor, SP4Percent, SP4Result, TotRDG4, ToRDG4skor, RDG4Percent, RDG4Result, TotExam4, TotExam4skor, Exam4Percent, Exam4Result, TG4, FG4, Rem4, CPC4, ST4, CFG4, CLG4, WO4Item, WO4, WO4Percent, WO4Result, Att4Item, Att4, Att4Percent, Att4Result, Punc4Item, Punc4, Punc4Percent, Punc4Result, Involve4Item, Involve4, Involve4Percent, Involve4Result, HTG4, HFG4, HRem4, Club4, FinalAve, FinalRem, GA1_1, GA1_2, GA1_3, GA1_4, GA1_5, GA1_6, GA1_7, TotGA1, GExam1, GTG1, GFG1, GRem1, Pen1_1, Pen1_2, Pen1_3, Pen1_4, Pen1_5, Pen1_6, Pen1_7, Pen1_8, Pen1_9, Pen1_10, Pen1Tot, PenTG1, PenFG1, PenRem1 FROM tblEnrol WHERE (Ukey = @Ukey)..........


    Im sorry about splitting my code into three parts... Honestly, Im still new in vb.net. I assumed what you mean by filling the dataset is like this


    cmdGrade = cnn.CreateCommand


    cmdGrade.CommandText = "SELECT DISTINCT * FROM tblEnrol WHERE SectionName = '" & cboSection.Text & "' AND SubjectName = '" & cboSubjectName.Text & "' AND YearLevel = '" & cboYearLevel.Text & "'"


    daGrade.MissingSchemaAction = MissingSchemaAction.AddWithKey


    dsGrade.Clear()


    'dsSection.Clear()


    'dsSubject.Clear()


    daGrade.SelectCommand = cmdGrade


    daGrade.Fill(dsGrade, "tblEnrol")

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    If you have created your DataAdapter through the Visual Studion wizard and let it create it's own Update, Insert and Delete commands, then the xsd file is the place these commands would be. My qustion, and what I think is causing the error by what I have researched, is this command is not using the primary key(s) in the Where clause. If the UpdateCommand is using the primary keys in the Where clause I am not sure what may be causing this exception you are seeing.


    You can split your code into thr eeparts. In the first part, just fill the DataSet to see how long that takes. Then, set the DataSource of the Spread to see how long that takes. Finally format the Spread to see how long that takes. This should show you the area of your code taking the most time and help us narrow down where to profile your code for performance issues.

  • Replied 8 September 2017, 1:14 pm EST

    Hi!


     I dont have any line of codes anywhere in my program similar to this:


    adapter.UpdateCommand = New SqlCommand( _
            "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = " & _
            "@CompanyName WHERE CustomerID = @oldCustomerID", connection)


    I have an updateCommand in the file Grading_Rpt_DataSet.xsd which very long and but I think that's not the one you are talking of.


    With regards to retrieving and saving, I really really dont know where it is taking time to display the record in the spread if its in filling the bound dataset from the database through the dataadapter or from binding te datasource to the spread....It takes about 3-5 minutes for the records to display in the spread and the same thing also happen when saving/updating records to the database. 

  • Replied 8 September 2017, 1:14 pm EST

    Hi Scotts!


    I just tried to day to bind the table to datagridview and the accessing of the records takes only about 2-3 seconds.

  • Replied 8 September 2017, 1:14 pm EST

    I tried commeting my code that calls the formatspread(). it seems that it is really the one taking much time to process. 


     If I remove all my formatspread() subs then how do I design my spread? It is in formatspread() subs where I assign which column width, column header text, which columns are hidden, frozen, columnrowsheight, Column Formula and etc...

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Then binding to the Spread is probably taking about the same time. You can create buttons to break up your code to bind the Spread to the DataSource in the click of one button and then format the Spread in the click of another button. This would tell you how long these actions are taking in the Spread control. It sounds like the formatting of the Spread is taking the time from what you have been saying, but this will tell for sure. Then, you can trim down the formatting code (commenting out parts of code) to see where the bottleneck is in performance.

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    It is probably best to keep this code at runtime than to put it in the Spread Designer. If you are not using sticky notes, you want to set the AutoUpdateNotes property to False. Also, setting the AutoCalculation property to False while you are filling the Spread will help the speed of the load process and then you can set the property back to True when you are done.

  • Replied 8 September 2017, 1:14 pm EST

    Hi!


    I'm sorry but I dont get what you meant by setting the Value Property.  I am already using SuspendLayout and ResumeLayout methods. I didnt use AutoUpdateNotes. I am using autocalculation property since I would like my user to see changes to students grades whenever they type in values in the spread. I remember, you gave me snippets on this in myformat() sub but I did removed it as I found out something will go wrong (I cant remember exactly problem)  if I add it.


     Will it help, if instead of doing it in codes, I just put the headers, the formulas during the design time instead of doing programmatically?

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    You would need to optimize the code. You can uncomment out blocks of the code to see where the performance hit is at. I believe you have a lot of code where you are setting the Text property of cells. If you change that code to set the Value property instead, then this will help the load time. Calling the SuspendLayout and ResumeLayout methods around your code will help the performance. Lastly, setting the AutoUpdateNotes and AutoCalculation properties to False will help.

  • Replied 8 September 2017, 1:14 pm EST

    Thanks for your reply. I'll try this.
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    When using SuspendLayout and ResumeLayout to speed up performance of the Spread, you want to call these methods on the Spread (FpSpread1.SuspendLayout and FpSpread.ResumeLayout). This will keep the Spread from trying to paint during the execution of this code. Setting the ColumnWidth the way you are should not take a long time to process. Since you are bound to a DataSource, you do want to set the DataAutoSizeColumns property to False. Setting the header text would run faster by using the Value property of the cell to assign the text instead of the Text property. Looking at this code, I would think setting the Text into the header cells and looping all the rows calling GetPreferredRowHeight are the two bottle necks. GetPreferredRowHeight is measuring the text in each column of the row to find the largest text block. This is a very expensive call in far as time.You can make it faster by referencing the TextRenderer.DLL in your project so Spread uses GDI instead of GDI+ for measuring the string. Also, you could just measure one row and use that height for all rows in the block.

  • Replied 8 September 2017, 1:14 pm EST

    Hi Scotts!


    I did all what you mentioned here except about the GetPrefferedRowHieight (I commented it) and textrenderer.dll (not sure how to referrence it). The Displaying of records on the spread takes about 15-18 seconds and while saving takes about 25-40 seconds. Still its taking too long to save.

  • Replied 8 September 2017, 1:14 pm EST

    Hi Scotts!


    If I comment out my FormatSpread call display time is faster, if I comment out only the setting of column width and assigning of column headers, there's a  difference in displaying. I have other FormatSpread call which I have not added yet in my code so this means the more I add the longer it will take time to display records on spread.


    There' nothing much written in my save button.


    I already have referenced FarPoint.TextRenderer.dll.


    Here's my save button codes


    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click


    FpSpread1.SuspendLayout()


    'Get the data from Spread


    dsGrade = CType(FpSpread1.ActiveSheet.DataSource, System.Data.DataSet)


    'Save the changes back to the database


    Try


    daGrade.Update(dsGrade.Tables("tblEnrol"))


    dsGrade.AcceptChanges()


    MessageBox.Show("Changes are committed to the database")

    Catch ex As Exception


    MessageBox.Show(ex.ToString)


    End Try


    FpSpread1.ResumeLayout()


    End Sub

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    You have now gone from 3-5 minutes to 15-18 seconds for the load and 25-40 seconds for the save. If you comment out the FormatSpread call, are both the load and save about the same? If not, what is taking longer n the save code? to Reference the TextRenderer in your project, you add a reference to your solution and browse to the FarPoint\bin directory to get the FarPoint.TextRenderer.dll.

  • Replied 8 September 2017, 1:14 pm EST

    Hi Scotts! I tried last night to see where my prog is taking long to display records in the spread and i this is what I found out.  I tried commenting the part in the formatspread() sub where I assign column width and column headers and it seems that, it's part that's taking so long.


    What should be the best thing to do? It's ok to use the default column width (for now), if I dont put column headers, the table fieldnames will be used as headers which is I dont want to happen.


    I have a lot of formatspread(), formatspread1(), formatspread2()  and so on....


    Any suggestion please?


    Here's my code:


    Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click


    SuspendLayout()


    'btnDisplay.Enabled = False


    FpSpread1.DataSource = Nothing


    FpSpread1.Reset()


    myFormat()


    cnn.ConnectionString = "Data Source=.\sqlexpress;Initial Catalog=TestDB;Integrated Security=True"


    If cnn.State = ConnectionState.Closed Then cnn.Open()


    cmdGrade = cnn.CreateCommand


    cmdGrade.CommandText = "SELECT DISTINCT * FROM tblEnrol WHERE SectionName = '" & cboSection.Text & "' AND SubjectName = '" & cboSubjectName.Text & "' AND YearLevel = '" & cboYearLevel.Text & "'"


    daGrade.MissingSchemaAction = MissingSchemaAction.AddWithKey


    dsGrade.Clear()


    dsGrade = New DataSet


    daGrade.SelectCommand = cmdGrade


    daGrade.Fill(dsGrade, "tblEnrol")


    cnn.Close()


    Dim si() As FarPoint.Win.Spread.SortInfo = New FarPoint.Win.Spread.SortInfo() {New FarPoint.Win.Spread.SortInfo(5, False), New FarPoint.Win.Spread.SortInfo(2, True), New FarPoint.Win.Spread.SortInfo(3, True)}


    'bind FpSpread1 to datasource


    '1st Grading


    FpSpread1.Sheets(0).DataSource = dsGrade


    FpSpread1.Sheets(0).DataMember = "tblEnrol"


    FpSpread1.Sheets(0).SortRows(0, FpSpread1.Sheets(0).RowCount, si)


    FormatSpread()


    '2nd Grading


    FpSpread1.Sheets(1).DataSource = dsGrade


    FpSpread1.Sheets(1).DataMember = "tblEnrol"


    FpSpread1.Sheets(1).SortRows(0, FpSpread1.Sheets(0).RowCount, si)


    FormatSpread1()


    '1st-2nd Deliberation


    FpSpread1.Sheets(2).DataSource = dsGrade


    FpSpread1.Sheets(2).DataMember = "tblEnrol"


    FpSpread1.Sheets(2).SortRows(0, FpSpread1.Sheets(0).RowCount, si)


    'formatspread2()


    '3rd Grading


    FpSpread1.Sheets(3).DataSource = dsGrade


    FpSpread1.Sheets(3).DataMember = "tblEnrol"


    FpSpread1.Sheets(3).SortRows(0, FpSpread1.Sheets(0).RowCount, si)


    'FormatSpread3()


    btnSave.Enabled = True


    ResumeLayout()


    End Sub


    '====================


    '=1ST GRADING PERIOD=


    '====================


    Private Sub FormatSpread()


    SuspendLayout()


    Dim i As Integer


    With FpSpread1.Sheets(0)


    .AutoCalculation = True


    .ColumnHeader.Rows(0).Height = 30


    .FrozenColumnCount = 5


    .Columns(0, 4).Locked = True


    .Columns(0, 1).Visible = False


    .Columns(5, 11).Visible = False


    .Columns(77).Visible = False


    .Columns(101).Visible = False


    .Columns(111, 647).Visible = False


    For i = 0 To .RowCount - 1


    .Rows(i).Height = .GetPreferredRowHeight(i) + 5


    Next


    '' 'set column width in pixels.


    '' .Columns(2).Width = 100


    '' .Columns(3).Width = 100


    '' .Columns(4).Width = 100


    '' 'Assignment Columns


    '' .Columns(12).Width = 27


    '' .Columns(13).Width = 27


    '' .Columns(14).Width = 27


    '' .Columns(15).Width = 27


    '' .Columns(16).Width = 27


    '' .Columns(17).Width = 27


    '' .Columns(18).Width = 27


    '' .Columns(19).Width = 27


    '' .Columns(20).Width = 27


    '' .Columns(21).Width = 27


    '' .Columns(22).Width = 27


    '' .Columns(23).Width = 27


    '' .Columns(24).Width = 27


    '' .Columns(25).Width = 27


    '' .Columns(26).Width = 27


    '' .Columns(27).Width = 27


    '' .Columns(28).Width = 27


    '' .Columns(29).Width = 27


    '' .Columns(30).Width = 27


    '' .Columns(31).Width = 27


    '' 'Quiz Columns


    '' .Columns(32).Width = 27


    '' .Columns(33).Width = 27


    '' .Columns(34).Width = 27


    '' .Columns(35).Width = 27


    '' .Columns(36).Width = 27


    '' .Columns(37).Width = 27


    '' .Columns(38).Width = 27


    '' .Columns(39).Width = 27


    '' .Columns(40).Width = 27


    '' .Columns(41).Width = 27


    '' .Columns(42).Width = 27


    '' .Columns(43).Width = 27


    '' .Columns(44).Width = 27


    '' .Columns(45).Width = 27


    '' .Columns(46).Width = 27


    '' .Columns(47).Width = 27


    '' .Columns(48).Width = 27


    '' .Columns(49).Width = 27


    '' .Columns(50).Width = 27


    '' .Columns(51).Width = 27


    '' 'Recitation Columns


    '' .Columns(52).Width = 27


    '' .Columns(53).Width = 27


    '' .Columns(54).Width = 27


    '' .Columns(55).Width = 27


    '' .Columns(56).Width = 27


    '' .Columns(57).Width = 27


    '' .Columns(58).Width = 27


    '' .Columns(59).Width = 27


    '' .Columns(60).Width = 27


    '' .Columns(61).Width = 27


    '' .Columns(62).Width = 27


    '' .Columns(63).Width = 27


    '' .Columns(64).Width = 27


    '' .Columns(65).Width = 27


    '' .Columns(66).Width = 27


    '' .Columns(67).Width = 27


    '' .Columns(68).Width = 27


    '' .Columns(69).Width = 27


    '' .Columns(70).Width = 27


    '' .Columns(71).Width = 27


    '' 'PROJ,MASS,GMRC,EXAM Columns


    '' .Columns(72).Width = 27


    '' .Columns(73).Width = 27


    '' .Columns(74).Width = 50


    '' .Columns(75).Width = 50


    '' .Columns(76).Width = 50


    '' '.Columns(77).Width = 50


    '' .Columns(78).Width = 27


    '' .Columns(79).Width = 27


    '' 'Total,Percent,Result Columns


    '' 'Assignment


    '' .Columns(80).Width = 40


    '' .Columns(81).Width = 55


    '' .Columns(82).Width = 35


    '' .Columns(83).Width = 35


    '' 'Quiz


    '' .Columns(84).Width = 40


    '' .Columns(85).Width = 55


    '' .Columns(86).Width = 35


    '' .Columns(87).Width = 35


    '' 'Recitation


    '' .Columns(88).Width = 40


    '' .Columns(89).Width = 55


    '' .Columns(90).Width = 35


    '' .Columns(91).Width = 35


    '' 'Project


    '' .Columns(92).Width = 40


    '' .Columns(93).Width = 55


    '' .Columns(94).Width = 35


    '' .Columns(95).Width = 35


    '' 'Mass


    '' .Columns(96).Width = 43


    '' .Columns(97).Width = 60


    '' .Columns(98).Width = 35


    '' .Columns(99).Width = 35


    '' 'GMRC


    '' .Columns(100).Width = 47


    '' '.Columns(101).Width = 62


    '' .Columns(102).Width = 35


    '' .Columns(103).Width = 35


    '' 'Exam


    '' .Columns(104).Width = 40


    '' .Columns(105).Width = 55


    '' .Columns(106).Width = 35


    '' .Columns(107).Width = 35


    '' 'TG,FG,REM


    '' .Columns(108).Width = 35


    '' .Columns(109).Width = 35


    '' .Columns(110).Width = 35


    End With


    ''ConditionalFormat()


     


    ' Set the labels as needed -- using the Label property or


    ' the cell Text property.


    ''With FpSpread1.Sheets(0).ColumnHeader


    '' '.Cells(0, 0).Text = "Ukey"


    '' '.Cells(0, 1).Text = "IDNo"


    '' .Cells(0, 2).Text = "Last Name"


    '' .Cells(0, 3).Text = "First Name"


    '' .Cells(0, 4).Text = "Middle Initial"


    '' 'Assignment Headers


    '' .Cells(0, 12).Text = "A1 Item"


    '' .Cells(0, 13).Text = "A1"


    '' .Cells(0, 14).Text = "A2 Item"


    '' .Cells(0, 15).Text = "A2"


    '' .Cells(0, 16).Text = "A3 Item"


    '' .Cells(0, 17).Text = "A3"


    '' .Cells(0, 18).Text = "A4 Item"


    '' .Cells(0, 19).Text = "A4"


    '' .Cells(0, 20).Text = "A5 Item"


    '' .Cells(0, 21).Text = "A5"


    '' .Cells(0, 22).Text = "A6 Item"


    '' .Cells(0, 23).Text = "A6"


    '' .Cells(0, 24).Text = "A7 Item"


    '' .Cells(0, 25).Text = "A7"


    '' .Cells(0, 26).Text = "A8 Item"


    '' .Cells(0, 27).Text = "A8"


    '' .Cells(0, 28).Text = "A9 Item"


    '' .Cells(0, 29).Text = "A9"


    '' .Cells(0, 30).Text = "A10 Item"


    '' .Cells(0, 31).Text = "A10"


    '' 'Quiz Headers


    '' .Cells(0, 32).Text = "Q1 Item"


    '' .Cells(0, 33).Text = "Q1"


    '' .Cells(0, 34).Text = "Q2 Item"


    '' .Cells(0, 35).Text = "Q2"


    '' .Cells(0, 36).Text = "Q3 Item"


    '' .Cells(0, 37).Text = "Q3"


    '' .Cells(0, 38).Text = "Q4 Item"


    '' .Cells(0, 39).Text = "Q4"


    '' .Cells(0, 40).Text = "Q5 Item"


    '' .Cells(0, 41).Text = "Q5"


    '' .Cells(0, 42).Text = "Q6 Item"


    '' .Cells(0, 43).Text = "Q6"


    '' .Cells(0, 44).Text = "Q7 Item"


    '' .Cells(0, 45).Text = "Q7"


    '' .Cells(0, 46).Text = "Q8 Item"


    '' .Cells(0, 47).Text = "Q8"


    '' .Cells(0, 48).Text = "Q9 Item"


    '' .Cells(0, 49).Text = "Q9"


    '' .Cells(0, 50).Text = "Q10 Item"


    '' .Cells(0, 51).Text = "Q10"


    '' 'Recitation Headers


    '' .Cells(0, 52).Text = "R1 Item"


    '' .Cells(0, 53).Text = "R1"


    '' .Cells(0, 54).Text = "R2 Item"


    '' .Cells(0, 55).Text = "R2"


    '' .Cells(0, 56).Text = "R3 Item"


    '' .Cells(0, 57).Text = "R3"


    '' .Cells(0, 58).Text = "R4 Item"


    '' .Cells(0, 59).Text = "R4"


    '' .Cells(0, 60).Text = "R5 Item"


    '' .Cells(0, 61).Text = "R5"


    '' .Cells(0, 62).Text = "R6 Item"


    '' .Cells(0, 63).Text = "R6"


    '' .Cells(0, 64).Text = "R7 Item"


    '' .Cells(0, 65).Text = "R7"


    '' .Cells(0, 66).Text = "R8 Item"


    '' .Cells(0, 67).Text = "R8"


    '' .Cells(0, 68).Text = "R9 Item"


    '' .Cells(0, 69).Text = "R9"


    '' .Cells(0, 70).Text = "R10 Item"


    '' .Cells(0, 71).Text = "R10"


    '' 'PROJ,MASS,GMRC,EXAM Headers


    '' .Cells(0, 72).Text = "Proj Item"


    '' .Cells(0, 73).Text = "Proj"


    '' .Cells(0, 74).Text = "Mass Item"


    '' .Cells(0, 75).Text = "Mass"


    '' .Cells(0, 76).Text = "GMRC"


    '' '.Cells(0, 77).Text = "Rdg"


    '' .Cells(0, 78).Text = "Ex Item"


    '' .Cells(0, 79).Text = "Ex"


    '' 'Total,Percent,Result Headers


    '' 'Assignment


    '' .Cells(0, 80).Text = "Total Assign"


    '' .Cells(0, 81).Text = "Total Score (A)"


    '' .Cells(0, 82).Text = "%"


    '' .Cells(0, 83).Text = "Equiv"


    '' 'Quiz


    '' .Cells(0, 84).Text = "Total Quiz"


    '' .Cells(0, 85).Text = "Total Score (Q)"


    '' .Cells(0, 86).Text = "Q%"


    '' .Cells(0, 87).Text = "Equiv"


    '' 'Recitation


    '' .Cells(0, 88).Text = "Total Rec"


    '' .Cells(0, 89).Text = "Total Score (R)"


    '' .Cells(0, 90).Text = "R%"


    '' .Cells(0, 91).Text = "Equiv"


    '' 'Project


    '' .Cells(0, 92).Text = "Total Proj"


    '' .Cells(0, 93).Text = "Total Score (P)"


    '' .Cells(0, 94).Text = "P%"


    '' .Cells(0, 95).Text = "Equiv"


    '' 'Mass


    '' .Cells(0, 96).Text = "Total Mass"


    '' .Cells(0, 97).Text = "Total Score (M)"


    '' .Cells(0, 98).Text = "M%"


    '' .Cells(0, 99).Text = "Equiv"


    '' 'GMRC


    '' .Cells(0, 100).Text = "GMRC Grade"


    '' '.Cells(0, 101).Text = "Score"


    '' .Cells(0, 102).Text = "G%"


    '' .Cells(0, 103).Text = "Equiv"


    '' 'Exam


    '' .Cells(0, 104).Text = "Total Exam"


    '' .Cells(0, 105).Text = "Total Score (E)"


    '' .Cells(0, 106).Text = "E%"


    '' .Cells(0, 107).Text = "Equiv"


    '' 'TG,FG,REM Headers


    '' .Cells(0, 108).Text = "TG"


    '' .Cells(0, 109).Text = "FG"


    '' .Cells(0, 110).Text = "REM"


    ''End With


    'Formulas


    With FpSpread1.Sheets(0)


    'Assign


    .Columns(80).Formula = "SUM(M1,O1,Q1,S1,U1,W1,Y1,AA1,AC1,AE1)"


    .Columns(81).Formula = "SUM(N1,P1,R1,T1,V1,X1,Z1,AB1,AD1,AF1)"


    .Columns(83).Formula = "((CD1/CC1)*60+40)*(CE1/100)"


    'Quiz


    .Columns(84).Formula = "SUM(AG1,AI1,AK1,AM1,AO1,AQ1,AS1,AU1,AW1,AY1)"


    .Columns(85).Formula = "SUM(AH1,AJ1,AL1,AN1,AP1,AR1,AT1,AV1,AX1,AZ1)"


    .Columns(87).Formula = "((CH1/CG1)*60+40)*(CI1/100)"


    'Recitation


    .Columns(88).Formula = "SUM(BA1,BC1,BE1,BG1,BI1,BK1,BM1,BO1,BQ1,BS1)"


    .Columns(89).Formula = "SUM(BB1,BD1,BF1,BH1,BJ1,BL1,BN1,BP1,BR1,BT1)"


    .Columns(91).Formula = "((CL1/CK1)*60+40)*(CM1/100)"


    'Project


    .Columns(92).Formula = "BU1"


    .Columns(93).Formula = "BV1"


    .Columns(95).Formula = "((CP1/CO1)*60+40)*(CQ1/100)"


    'Mass


    .Columns(96).Formula = "BW1"


    .Columns(97).Formula = "BX1"


    .Columns(99).Formula = "((CT1/CS1)*60+40)*(CU1/100)"


    'GMRC


    '.Columns(76).Formula = "DF1"


    .Columns(100).Formula = "BY1"


    '.Columns(101).Formula = "BZ1"


    '.Columns(103).Formula = "((CX1/CW1)*60+40)*(CY1/100)"


    .Columns(103).Formula = "(CW1)*(CY1/100)"


    '.Columns(103).Formula = "IF(ISBLANK(BY1),"""",CW1*(CY1/100))"


    'Exam


    .Columns(104).Formula = "CA1"


    .Columns(105).Formula = "CB1"


    .Columns(107).Formula = "((DB1/DA1)*60+40)*(DC1/100)"


    'TG,FG,Rem


    If cboSubjectName.Text = "PE1" Or cboSubjectName.Text = "PE2" Then


    .Columns(108).Formula = "SUM(CD1,CH1,CL1)/3"


    Else


    .Columns(108).Formula = "SUM(CF1,CJ1,CN1,CR1,CV1,CZ1,DD1)"


    ''.Columns(109).Formula = "IF(ROUND(DE1,0)<=70,70,IF(ROUND(DE1,0)<=75,75,ROUND(DE1,0)))"


    End If


    '.Columns(109).Formula = "IF(DE1>70,ROUND(DE1,0),70)"


    .Columns(109).Formula = "IF(ROUND(DE1,0)<=70,70,IF(ROUND(DE1,0)<=75,75,ROUND(DE1,0)))"


    .Columns(110).Formula = "IF(DF1>=74.5,""P"",""F"")"


    ''ConditionalFormat()


    End With


    ResumeLayout()


    End Sub

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    If the TextRenderer assembly is not giving you any better performance, you may as well remove the reference. Are you now using the Value property to assign the text to the Spread headers? Probably the best thing for you to do now is to remove the calls to FormatSpread for all but the active SheetView. Then, when the user changes sheets, you can format the new active SheetView at that time.

  • Replied 8 September 2017, 1:14 pm EST

    Yes, I am using already the .Value property.


    can you guide me in formatting the sheets whenever the user changes sheets? so what will happen now is that in my btndisplay I will remove all the calls to Formatspread except the activesheet where and what event do I put the rest of the calls to FormatSpread1() to FormatSpread17()?

  • Replied 8 September 2017, 1:14 pm EST

    I have 17 sheets already in my app and its taking 2-3 minutes now to display records on the spread. I have already referenced TextRenderer.dll

  • Replied 8 September 2017, 1:14 pm EST

    this is just the code of my save button.


    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click


    FpSpread1.SuspendLayout()


    'Get the data from Spread


    'dsGrade = CType(FpSpread1.Sheets(0).DataSource, System.Data.DataSet)


    dsGrade = CType(FpSpread1.ActiveSheet.DataSource, System.Data.DataSet)


    'Dim ds As DataSet = FpSpread1.ActiveSheet.DataSource


    'Save the changes back to the database


    Try


    daGrade.Update(dsGrade.Tables("tblEnrol"))


    dsGrade.AcceptChanges()


    MessageBox.Show("Changes are committed to the database")


    'btnSave.Enabled = False


    'btnDisplay.Enabled = True


    Catch ex As Exception


    MessageBox.Show(ex.ToString)


    End Try


    FpSpread1.ResumeLayout()


    End Sub

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Do the same thing to debug where in your save code it is taking a long time.

  • Replied 8 September 2017, 1:14 pm EST

    using the above style of coding, Displaying of records is at 14-20 secs but saving takes about 1-3 minutes....
  • Replied 8 September 2017, 1:14 pm EST

    Ok I found three events but which is more appropriate in my case?


    1. ActiveSheetChanged


    2. ActiveSheetChanging


    3. SheetTabClick


    I tried doing doing something like this and it works (am I on the right track?) If I put all the calls here, i think the problem will still be there...How do I tell spread to just format the sheet the has clicked?


    Private Sub FpSpread1_ActiveSheetChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.ActiveSheetChanged


    '2nd Grading


    FpSpread1.Sheets(1).DataSource = dsGrade


    FpSpread1.Sheets(1).DataMember = "tblEnrol"


    FpSpread1.Sheets(1).SortRows(0, FpSpread1.Sheets(0).RowCount, si)


    FormatSpread1()


    '1st-2nd Deliberation


    FpSpread1.Sheets(2).DataSource = dsGrade


    FpSpread1.Sheets(2).DataMember = "tblEnrol"


    FpSpread1.Sheets(2).SortRows(0, FpSpread1.Sheets(0).RowCount, si)


    FormatSpread2()


    'calls to other FormatSpread here......


    End Sub

  • Replied 8 September 2017, 1:14 pm EST

    I commented this line daGrade.Update(dsGrade.Tables("tblEnrol")) and saving is almost instantaneous but as expected changes are not committed. So meaning that's best performance I get?
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    If you comment out the code in the call to the Update method, is the save method almost instantaneous? If not, there is some other code somewhere that is running that is causing the long time saving. If it is, then you should see the same performance bound to a DataGrid, since there is nothing Spread is doing in this code, it should be the same no matter if it is the Spread or DataGrid bound to the DataSource.

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    I am not sure what you are seeing. It sounds like you want to make sure the formatting does not get called unnecessarily. You can set a flag of some sort, like a tag on the Sheet, that you can check when the SheetView has been formatted and not format again until needed (flag unset).

  • Replied 8 September 2017, 1:14 pm EST

    with my current code which quite okey now when it comes to displaying records on the spread. I put all the call to FormatSpread on click of the Sheetviews but with this setup I got another issue.


    This is the scenario: I have Sheetviews 1st,2nd,3rd,4th,Final. I display records then click on the final SheetView then I click on the 4th SheetView. with this steps, my display in 4th SheetView are duplicated if not, I got extra row at the last student name and my last column which is supposed to display "P" from row 1 to the last row I have, right now, some cells are blank. Why is this happenng?

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Using the SQL command you have, then yes this will be the best perfomance to expect. There may be a better way to write your SQL string for saving the data back, but I would not be able to help you on that.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels