Hello guys,
I want to set up a DateTime property from my DB to use the Bulgarian culture inside a TextBox in the Report Designer. It should use one of the following formats "MMMM yyyy" or "Y" (example: декември 2015).
Using the following code I have found that the Culture does not change even though I have specifically set it to Bulgarian in the code, also in the Report culture and TextBox culture:
Fields.ProductionDate.ToString("Y", CultureInfo.GetCurrentCulture("bg-BG"))
What I have found up until now. is that using the following syntax, with the cultures of the Report and TextBox set. including setting the DateTime formatter for the TextBox to be July 2023 fixes the issue:
=Fields.ProductionDate
However, this does not work for me as the TextBox I am using the property in, includes a lot of text and the only way I have found to write code that way is using Curly Braces which do not seem to apply the selected format.
Result when using =Fields.ProductionDate:
Result when using {Fields.ProductionDate}:
Question 1: Is there a way to change the DateTime Format and Culture using the first approach, if so could you please attach a sample as everything so far that I have tried does not seem to work.
Question 2: Is there a way to go around the curly braces and use the =Fields.ProductionDate with square braces without the need to create a separate TextBox.
Thank you in advance.