Hello,
as you can see in the attached files the Displaymember is set to "= Fields.OperationalVType" .
But nothing will appear when I call my report.
The report parameter "Vorgangstyp" is empty.
OperationalVType is from type enum.
public enum OperationalVehicleType
{
Waschen = 1,
Hauptuntersuchung = 2,
Werkstatt = 3,
Tanken = 4,
Kilometerstand = 5,
Abgasuntersuchung = 6
}
public OperationalVehicleType OperationalVType {get;set;}
What is going wrong?
Best Regards
Simon
5 Answers, 1 is accepted
I have attached a sample report demonstrating how you may use Enum types in ObjectDataSource utilized in Report Parameter AvailableValues property. You need to build the project before previewing the report.
Regards,
Todor
Progress Telerik
Hello Todor,
I installed it in my project and it works.
Thank you!
But I have another problem:
Before, as I had only 3 filters in the report 3 records would be displayed.(See 3-filters.jpg)
So far so good.
And now I have installed the fourth filter named "Vorgangstyp" from the enum and I get a NoDatamessage "Es gibt keine Daten zum anzeigen" (On english: "There is no data to display"). (See 4-filters.jpg)
But there must be datas to display - just less records!
Perhaps I have a syntaxerror in the table filter property. (See filter.jpg)
Or have I configured anything wrong?
Hi Todor,
I don't know exactly why, but now it works.
I try around and added a toString()-method and then the fourth filter works without error messages.
Code in the filter property of the table:
= Fields.OperationalVType.toString() In = Parameters.Vorgangstyp.Value
Perhaps it gives another solution?
But it's ok.
Best regards
Simon
The OperationalVType field is an enum (in my example it is of OperationalVehicleType). Therefore, it is necessary to convert it in order to compare it with a string value. I think the solution you have found is a good one.
Regards,
Todor
Progress Telerik