I have a report in SSRS that I want to create an expression on the row header to pull the next date value from a dataset.

="Week of " + First(Fields!FiscalDate.Value, "ds_FD")

Something similar to this, but it needs to go through the next value and display it for each text box I have.

How can I do that?

Here is the query I used to create the dataset:

SET DATEFIRST 7;

;WITH x AS 
(
  SELECT FiscalDate, rn = ROW_NUMBER() OVER 
    (PARTITION BY FiscalWeekNum ORDER BY FiscalDate)
  FROM dbo.FiscalCalendar
  WHERE FiscalDate >= CONVERT(DATE, GETDATE())
    AND DATEPART(WEEKDAY, FiscalDate) = 2
)
SELECT FiscalDate FROM x WHERE rn = 1;

The report is nothing more than just a table with data from another dataset that does not have an affect on what I'm looking to do.

有帮助吗?

解决方案

="Week of " + DateAdd("d",7,First(Fields!FiscalDate.Value, "ds_FD"))

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top