Wednesday, March 7, 2012
how can i give customize dataset to sql report
i am new to sql reporting service, i am using for financial reporting,
in one of my requirement i have to calculate how much year customer's fund
will last and i have to show each year's balance.
in crystal report i get directly assign dataset, but how can i
assign dataset in reporting service, plz so urgentIn SSRS, you can assign an application dataset to server-based report only
if you use a custom dataset extension. In your case, I will gravitate toward
performing the data manipulation at the data source level, e.g. inside a
stored procedure. If you use SQL Server 2005 as a data source, consider
using a CLR stored procedure.
I demonstrate how this could be done in this code sample
(http://www.prologika.com/downloads/Pass/). The report invokes a CLR stored
procedure that uses data mining for sales forecasting.
As a side note, for financial reporting, I strongly suggest you evaluate
Analysis Services especially if you need to support account charts where
values substract or add (income, expenses, etc). Otherwise, you may find
yourself reinventing the wheel. I know from personal experience.
HTH
--
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Lovenish" <Lovenish@.discussions.microsoft.com> wrote in message
news:CE811BDF-1C05-4C34-9853-166E60A39D65@.microsoft.com...
> hi
> i am new to sql reporting service, i am using for financial reporting,
> in one of my requirement i have to calculate how much year customer's fund
> will last and i have to show each year's balance.
> in crystal report i get directly assign dataset, but how can i
> assign dataset in reporting service, plz so urgent|||Thx Teo Lachev,
but the code you have send is i think in visual studio 2005, i am
using 2003. so can u help me further,
u were talking about customize dataset extension but i cant get how to use
this so plz plz help me
Friday, February 24, 2012
How can i get the first day of the month and the last day of the month?
CREATE FUNCTION FirstDayofMonth
(
@.InputDate DATETIME
)
RETURNS DateTime
AS
BEGIN
RETURN (SELECT LEFT(CONVERT(VARCHAR(10),@.Inputdate,112),6) + '01')
END
GO
SELECT dbo.FirstdayofMonth(GETDATE())
CREATE FUNCTION LastDayofMonth
(
@.InputDate DATETIME
)
RETURNS DateTime
AS
BEGIN
RETURN (SELECT DATEADD(dd,-1,DATEADD(mm,+1,LEFT(CONVERT(VARCHAR(10),@.InputDate,112),6) + '01')))
END
GO
SELECT dbo.LastDayofMonth(GETDATE())
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||You can write scalar UDFs to do this like Jens showed. But if you need more functionality like determining holidays, different week numbers, tracking different calendars (fiscal, financial...) etc it is easier to build a static calendar table that contains all the dates. You can them simply query the calendar table to get the necessary information. This is a common approach in data warehousing environment to create a date or calendar dimension.|||As good start to read for that is:http://www.aspfaq.com/show.asp?id=2519
HTH; jens Suessmeyer.
http://www.sqlserver2005.de
|||select dateadd(month, datediff(month, 0, getdate()), 0) as [First Day of the Month],
dateadd(month, datediff(month, 0, getdate()), -1) as [Last Day of the Month]|||I think that wont give the proper results, a slight change will help
select dateadd(month, datediff(month, 0, getdate()), 0) as [First Day of the Month],
dateadd(month, datediff(month, -1, getdate()), -1) as [Last Day of the Month]