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." error so something is wrong with script? I am able to read Cellamount just fine using the Member Script. Requirement is to get the cell detail in the report along with amount.
Below is the line from the code:
LineItem = BRapi.Finance.Data.GetDataCellUsingMemberScript(si,"AUM","Cb#AUM:E#RevAccComments:C#USD:S#RevAccRecon:T#"+ FYQ +": A#MGMTFEES:F#CQ_MGMT_FEE_REV:O#Top:I#None:U1#None:U2#None:U3#None:U4#"+ Product.Member.Name +":U5#None:U6#None:U7#None:U8#None").DataCellEx.DataCellDetail.LineItems.LineItems.Item(0).Classification
any ideas on why this is not working?
I am able to do it like below in a BR.
- Execute the Method query to get the data set
- Copy data set into a datable
- 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