none
export data to excel with xml RRS feed

  • Question

  • Gooday , usually this works , but now my form is set up where I have the parent table ( Assets)with the primery key row AssetsID and the related data table (maintainance) with Primery key HistoryID ,on the same form. I only want to export the data from ' Maintainance' which is related to the AssetID , but all the data in the Maintainance table is being exported . Here my code as below . I think I'm missing something somewhere . Any help Thanks.

     Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
        Me.Validate()
        Me.MaintainanceBindingSource.EndEdit()
        Dim assetshistorysheet = _
          From Item In Me.AssetHistorySheet.Maintainance _
          Where Item.RowState <> DataRowState.Deleted _
            AndAlso Not Item.IsWorkDoneNull _
          Order By Item.HistoryID _
          Select <Row>

     


    rh
    Friday, August 19, 2011 6:27 AM

Answers