Forum Discussion

Ashok's avatar
Ashok
New Contributor III
2 years ago

Line Items in DataCellDetail - using BR

Hi Experts, i am trying to read the line items from celldetails. I think i get the sytax of BR functions it compiles fine but getting  "Object reference not set to an instance of an object." erro...
  • Ashok's avatar
    2 years ago

    I am able to do it like below in a BR.

    1. Execute the Method query to get the data set
    2. Copy data set into a datable 
    3. use the data table to read the rows 

     

    Example code:

     

    Dim MyDataSet As DataSet
    Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
    MyDataSet= BRApi.Database.ExecuteMethodCommand(dbConnApp,XFCommandMethodTypeId.DataCellDetail, "{AUM}{E#RevAccComments}{RevAccRecon}{T#"+Year+quarter+"}{}{}{}{}{}{}{}{}{}{}{}{UD4='"+row("Product")+"' and UD6='"+FeeType+"'}", "MyDataCellDetail", Nothing)
    Dim dt As DataTable = MyDataSet.Tables("MyDataCellDetail").Copy