0

I am trying to add a range (which I believe functions as a filter, right?) on an Enum field. This data source table is used in a Web Report.

This is what I do in the init method of the Web Report:

this.query().dataSourceTable(tablenum(SupplProduct)).addRange(fieldnum(SupplProduct, ShowOnReport)).value(QueryValue(NoYesCombo::Yes));

ShowOnReport is a field of type NoYesCombo Enum.

The Web Report crashes with this error:

Invalid range

I've managed to find quite a few examples on the web and this seems to be the proper way to do it so it supports all languages.

Any ideas ?

Could it be the properties of the field I'm trying to add a range on ?

Right underneath the line of code above, there is another similar line doing exactly the same, on another field:

//this is at the beginning of the init method...
AppointmentTable    activeAppoint = element.args().record().data();
;

this.query().dataSourceTable(tablenum(AppointmentTable)).addRange(fieldnum(AppointmentTable, AppointmentId)).value(queryValue(activeAppoint.AppointmentId));

This range works fine.

Thanks.

Francis Ducharme
  • 4,848
  • 6
  • 43
  • 81
  • The syntax is correct, but I'm unsure of the `QueryValue` in your value expression. Have you attempted to run the command with `.value(NoYes::Yes)` (or `.value(NoYesCombo::Yes)`)? – kingofzeal Dec 02 '13 at 20:56
  • this won't even compile since value() is expecting an str. – Francis Ducharme Dec 02 '13 at 20:58
  • Could you compare value for activeAppoint.AppointmentId and NoYesCombo::Yes. Im sure, the compiler could not read enum value as per example. Try give a int value in your code : "...value(QueryValue(1));" – Setiaji Dec 03 '13 at 05:02

1 Answers1

2

Oh crap. The Enterprise Portal server and its Business Connector was still at version RTM while the AOS server it connects on is RU8. After I patched the EP server to RU8, this works.

Thanks.

Francis Ducharme
  • 4,848
  • 6
  • 43
  • 81