Hi
Struggling with knowing what the best way to acheive my goal is and wondered if someone could help..
Simple task and I have searched the forums and documentation (I belieive I am close) but cant get this to work. I have a completedorder table that I use to generate invoices, and this table contains all data I need and I currently have a Aggregate.Sum working with grouping etc so all is fine. The problem comes now that I would like to filter some of the rows I have and am getting an exception thrown in the SQL as follows:
CompletedOrder does not match with a table name or alias name used in the query.
My code is below and I am using version 2 self servicing, should I be setting the filter expression to the field directly?? Is this in fact the best way to sum and group ( I am using dynamic list because of large number of columns in my designed typedlist)
If anyone can point me in the right direction I would be very grateful. ( I have taken all my grouping and aggregates out to simplify the issue but this simplified code still exhibits the problem)
Many thanks
Richard
ResultsetFields fields = new ResultsetFields(2);
fields.DefineField(CompletedOrderFields.CoDescription, 0, "Description", "CompletedOrder");
fields.DefineField(CompletedOrderFields.CoGross, 1, "Total", "CompletedOrder");
IPredicateExpression filter = new PredicateExpression();
filter.Add(CompletedOrderFields.CoInvoiceid == 0);
DataTable summaryList = new DataTable();
TypedListDAO dao = new TypedListDAO();
dao.GetMultiAsDataTable(fields, summaryList, 0, null, filter, null, false, null, null, 0, 0);