Hi Philip ,
Ok, just to elaborate on what Matt said, we need as much relevant information as you can give us to understand the problem. Remember that we are here and we just know what you tell us. For instance, at this point we don't know what is the actual error, or what LLBLGen version are you using. You can read the guidelines here: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7718
BTW, this kind of questions generally should be posted on "Generated Code" forum.
Another recommendation is to use UBB tags at least for code snippets so we can read easily the code.
Thanks for take a look on these recommendations in the future.
Now, back to your code. I think you are using the wrong predicate class here:
TSfilter.AddWithAnd(New FieldCompareValuePredicate(TimesheetDetailFields.AllocatedTime, ComparisonOperator.NotEqual, New Expression(TimesheetDetailFields.OrgAllocatedTime)))
TSfilter.AddWithOr(New FieldCompareValuePredicate(TimesheetDetailFields.Authorisation, ComparisonOperator.NotEqual, New Expression(TimesheetDetailFields.OrgAuthorisation)))
You are using FieldCompareValuePredicate, but that class is used when you compare a Field and a discrete value. If you want to compare two fields or two expressions you should use FieldCompareExpressionPredicate. So try this:
TSfilter.AddWithAnd(
new FieldCompareExpressionPredicate(
TimesheetDetailFields.AllocatedTime, ComparisonOperator.NotEqual,
New Expression(TimesheetDetailFields.OrgAllocatedTime) ))
...
Tip: above snippet is equivalent to:
TSfilter.AddWithAnd(TimesheetDetailFields.AllocatedTime != TimesheetDetailFields.OrgAllocatedTime)
...
For more info read this.
Hope helpul