Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Heading is off by one

Author  Topic 

Adam West
Constraint Violating Yak Guru

261 Posts

Posted - 2009-09-30 : 09:44:00
This SQL Is OK if you enter a week dates of a Sunday to Monday. That is OK for the purposes of the Report.

However, on the column display of the report matrix, it is showing the next day

this is the formula on the matrix, this is a text box Expression:
= "Week:" +Cstr(Fields!ID.Value)
So if I entered 04/05/09 to 04/11/09, it shows as the column heading
04/06/09. I would like it to show 04/05/09 - 04/11/09. I can do without the 'Week' heading for space reasons.


SET @SQL = 'SELECT SOP10200.XTNDPRCE AS Price, SOP10200.QUANTITY AS quantity, DATEADD(WK, DATEDIFF(WK, 0, SOP10100.DOCDATE), 0) AS ID,

SOP10200.ITEMNMBR + CHAR(13) + IV00101.ITEMDESC + CHAR(13) + ''Par Level:'' AS ITEMDESC, IV00101.ITMGEDSC

FROM dbo.SOP10200 AS SOP10200 INNER JOIN

dbo.IV00101 AS IV00101 ON SOP10200.ITEMNMBR = IV00101.ITEMNMBR INNER JOIN

dbo.SOP10100 AS SOP10100 ON SOP10200.SOPTYPE = SOP10100.SOPTYPE AND SOP10200.SOPNUMBE = SOP10100.SOPNUMBE INNER JOIN

dbo.RM00101 ON SOP10100.CUSTNMBR = dbo.RM00101.CUSTNMBR INNER JOIN

dbo.SOP10106 ON SOP10200.SOPTYPE = dbo.SOP10106.SOPTYPE AND SOP10200.SOPNUMBE = dbo.SOP10106.SOPNUMBE

Where SOP10100.DOCDATE between ''' + @StartDate + ''' and ''' + @EndDate + ''''

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-01 : 01:37:12
where do you get values 04/05/09 & 04/11/09 from? are they parameter values?
Go to Top of Page
   

- Advertisement -