The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.

Forum Discussion

Ashok's avatar
Ashok
New Contributor III
3 years ago
Solved

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
    3 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