Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Format for year to display in grouping(SSRS) report


Format for year to display in grouping(SSRS) report

Author
Message
mcfarlandparkway
mcfarlandparkway
Old Hand
Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)

Group: General Forum Members
Points: 342 Visits: 584
Hello,
I have an SSRS report where I have a single dataset; I am using parameter as fiscal year.
only one parameter; My requirement was to create a ssrs report with fiscalyear group header.


suppose if I give parameter as 2011 it will display all the years data from 2011 to 2014 and its grouped on fiscal year(group header)

I created an ssrs report with group header my question is why I am facing error at fiscal year(I am not getting fiscal year : 2011) in group header; we have a column as FY_1 where its populating all the years..

I given the expression as -

="Fiscal Year : " + FORMAT(Fields!FY_1.Value,"yyyy")

when I display the report its getting Fiscal Year : yyyy

For the test case I just grouped with system name it working fine; only with fiscal year its not working.
Not sure why its not displaying. Any help..
pietlinden
pietlinden
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2939 Visits: 12825
Create a calculated column in your dataset for the year.

YEAR(SomeDate)

Then you should be able to group no problem.
David Burrows
David Burrows
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8273 Visits: 9566
"yyyy" formatting only works with date datatypes


Far away is close at hand in the images of elsewhere.

Anon.


mcfarlandparkway
mcfarlandparkway
Old Hand
Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)

Group: General Forum Members
Points: 342 Visits: 584
Thank you for the reply, But its not working

I created a calculated field as Year and assigned FY_1 value field which is coming years from dataset


Some how not working showing as #Error when I preview the report.
David Burrows
David Burrows
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8273 Visits: 9566
If FY_1 is a year and assuming it is an int datatype then use the following expression

=String.Format("Fiscal Year : {0}",Fields!FY_1.Value)


Far away is close at hand in the images of elsewhere.

Anon.


mcfarlandparkway
mcfarlandparkway
Old Hand
Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)

Group: General Forum Members
Points: 342 Visits: 584
Thank You So much..It got worked.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search