Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2022 Release Wave 2Check out the latest updates and new features of Dynamics 365 released from October 2022 through March 2023
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
In a SSRS report DP class, I have a in memory table called bookingsTmp. I want some fields be blank in my report. So I hard coded them as following:
bookingsTmp.ProjectStage = ""; -----Data type of ProjectStage is EnumType ProjStatus
bookingsTmp.FiscalYear = ""; -----Data type of FiscalYear is ExtendedDataType Year
bookingsTmp.ProjectBookedDate= ""; ---Data type of ProjectBookedDate is ExtendedDataType TransDate
I got error message "Operand types are not compatible with the operator". if I change
bookingsTmp.FiscalYear = 0;
No compiler error. But there are values in my report.
For the Date field ---bookingsTmp.ProjectBookedDate , I tried assign it 1900-01-01 , still get error. I also tried convert it to string, no luck.
Basically, I don't want to display any values in my report for those 3 fields. How to do it?
You can use the nullValueFromType() method in the Global class.
As written in this method, for enum, it will return 0.
What exactly is the purpose of hard-coding "empty" values and then displaying them in a report? You could simply use unbound controls without any value.
Also, you have to realize what data type values actually means. Value 0 of an enum represents the element with ID == 0, e.g. No in NoYes enum. What is "blank value" of NoYes enum? The question doesn't makes sense. (I'm ignoring the option of setting an invalid value of an enum, because it goes against the purpose of enums.) But you surely can say "if the value is No, I want to show an empty string instead of the actual enum value" - that's what you can implement in an SSRS expression with IIF function.
Thanks everyone. I used IIF in visual studio to take care of what I need.
Martin,The purpose of hard-coding "empty" value is I need to add return POs to my booking report. Bookings are from projects. So I have to hard-code empty value to lots of project attributes for my return order's data set.
AX does not have a null value concept. Instead the following values are considered "not entered" by defintion:
int and int64: 0 (zero)
enum: 0 (typically the first value)
date: 01\01\1900 (displays as blank)
For new base enums make a blank zero enum value (by convention name it None). This will make the use of mandatory fields possible for this enum type.
For Date empty date try with DateNull() method instead of 1900-01-01.
Business Applications communities