MonthName function Report Builder 2.0 Query Designer
Hello everyone. Is there a way to get the MonthName function to work in the Define Formula pop-up that is used to create new fields in Report Builder 2.0's Query Designer? I'm getting: "The following is not a valid identifier: MONTHNAME" The MonthName fuctions works as expected when writing standard expressions elswhere in Builder 2.0. Many thanks in advance. P
January 19th, 2011 7:00am

Hi Here is the expression to get the Monthname from date field. =MonthName(Month(Fields!date.Value)) Hope this helps!!- Kerobin
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2011 4:53am

Hi Here is the expression to get the Monthname from date field. =MonthName(Month(Fields!date.Value)) Hope this helps!!- Kerobin
January 20th, 2011 4:53am

Thanks Kerobin - I'm aware of the expression and have used it previously. W hat I'm after is an answer as to whether this function can be used in the Define Formula window when one creates a new field via the Query Designer. Any suggestions? P
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2011 5:11am

Thanks Kerobin - I'm aware of the expression and have used it previously. W hat I'm after is an answer as to whether this function can be used in the Define Formula window when one creates a new field via the Query Designer. Any suggestions? P
January 20th, 2011 5:11am

Hi PROLBB, In the Query Designer, you could utilize below T-SQL: SELECT DATENAME(month, GETDATE()) AS 'Month Name'; For more information, please Returns a character string representing the specified datepart of the specified date at this link http://msdn.microsoft.com/en-us/library/ms174395(v=sql.90).aspx Thanks,Challen Fu [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 3:16am

Hi Challen Fu Thanks for getting back to me. I am unable to add the T-SQL you specified as I'm limited to the graphical view of the query designer and the symantic SMQL query view. Do you have any other advice? Many thanks P
January 24th, 2011 9:10am

Since you could not add the T-SQL, you could add a Calculated field to the created dataset, then type in below expression =MonthName(Month(Fields!date.Value))Challen Fu [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
January 25th, 2011 3:07am

Thanks for your help Challen Fu but it seems we've come full circle, as that is what I am already doing. So. . . What we've established is that there is no way to use MONTHNAME in the Define Formula window that opens when you creates a new Field via the Query Designer in Report Builder 2.0 - correct? Does anyone know if this functionality is available in Report Builder 3.0?
January 25th, 2011 4:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics