Sunday, March 11, 2012
Can SSRS use an ASP.NET dataset?
application to generate just the right dataset. Now we want to produce a
report from it. Is there any way just to pass our existing dataset to
reporting services instead of having to re-inquire, re-filter, re-join, etc?
thanks,
THI Tim,
> We find that quite often we have devoted a great deal of work in our
asp.net
> application to generate just the right dataset. Now we want to produce a
> report from it. Is there any way just to pass our existing dataset to
> reporting services instead of having to re-inquire, re-filter, re-join,
etc?
Yes, I have solved the same question.
I have implemented a custom RS DataExtension. The DataExtension use a
System.Data.Dataset as data source.
At report design time I use an XML file to load schema and sample data.
When I must cosume the report from my ASP.NET application I use
ReportingServices web service (render method) and I pass my dataset as
parameters... I pass dataset as XML String: your custom DataExtension must
be able to treat it.
The dataset must have a compatible schema with dataset you have used to
design report.
You can find a sample of DataExtension implementation in your folder
"C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\Samples\Extensions\FsiDataExtension".
HTH M.rkino
--
Marco Barzaghi - [MVP - MCP]
http://mvp.support.microsoft.com - http://italy.mvps.org
UGIDotNet - User Group Italiano .NET, http://www.ugidotnet.org
Read my WebLog: http://www.ugidotnet.org/436.blog|||Marco has a good solution if you must do it this way. But look at the hoops
to go through. First you have to write a data extension (although this could
be done just once). But then look at what you have to do with every report
you want to do. You have to have an xml defining the schema with some sample
data. This will definitely affect productivity in creating reports plus it
raises the skill level necessary to create reports. My feeling is that a
better direction to take is to put the logic into a stored procedure. If you
have code that ends up with a dataset in your asp application then someone
can easily look at it and create a stored procedure. I have been doing that
some when taking reports written in C. Although, when people work in
something like C, C#, VB they don't tend to solve the solution in a set
based manner so sometimes you are better off to totally rewrite the logic.
Anyway, once it is in a stored procedure then both your asp application and
RS can use it. RS supports stored procedures quite well (at least with SQL
Server, I have tried unsuccessfully with Sybase 11.x). My guess is the
effort to encapsulate the logic into a stored procedure will be no greater
than going through the hoops for a data extension. Once Yukon comes out then
this would be even easier to port your code to a stored procedure but for
now you would need to use T-SQL.
Now, in some cases you can not use a stored procedure easily in which case
Marco's solution is a very elegant one.
Bruce L-C
"Tim Seaburn" <tims@.removespamexcite.com> wrote in message
news:OIwXtK1WEHA.2852@.TK2MSFTNGP12.phx.gbl...
> We find that quite often we have devoted a great deal of work in our
asp.net
> application to generate just the right dataset. Now we want to produce a
> report from it. Is there any way just to pass our existing dataset to
> reporting services instead of having to re-inquire, re-filter, re-join,
etc?
> thanks,
> T
>
Thursday, February 16, 2012
Can OWC and ASP.NET be used to connect to an OLAP cube running on SQL Server 2005 ?
My question is can the same be done with a cube running on SQL Server 2005 (browse it from ASP.NET page using OWC) ? If so, can anyone please give a link to an tutorial or sample project ?
Or if not, please offer a solution on how to browse an OLAP cube from SQL Server
2005 from ASP.NET.
Thanks.
For the client application using OWC all you need to do is to install new version of the AS OLEDB provider. OWC can work with both AS200 and AS2005. Same goes for Excel and all major Analysis Services clients.
You can install "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider " from http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
|||
Hi. It's me again, I have downloaded and installed all necessary stuff, and project runs seems to run fine, but the Office Web Control says it cannot find the object specified by me.
Here's the OLAPconnection string :
value="Provider=MSOLAP.2;Data Source=http://localhost/elena;Initial Catalog=Aplicatie LogyCars;"
Here is the block of code where i attempt to connect ;
Try
Dim objPT As PivotTableClass = New PivotTableClass
objPT.ConnectionString = strOLAPConn
'strDataMember = "CubLogyCar"
strDataMember = "Cub LogyCar"
objPT.DataMember = strDataMember
m_XML = objPT.XMLData
objPT = Nothing
Catch err As Exception
m_XML = "<err>" & err.Source & " - " & err.Message & "</err>"
Finally
End Try
Return (m_XML)
End Function
There's no error, but still does not connect. "Cub LogyCar" is the name of the OLAP cube buuilt inside the Aplicatie LogyCars solution. Both of them are correctly written in code and web.config file.
Any Suggestions ?
|||For Analysis Service 2005, the provider should be MSOLAP.3Can OWC and ASP.NET be used to connect to an OLAP cube running on SQL Server 2005 ?
My question is can the same be done with a cube running on SQL Server 2005 (browse it from ASP.NET page using OWC) ? If so, can anyone please give a link to an tutorial or sample project ?
Or if not, please offer a solution on how to browse an OLAP cube from SQL Server
2005 from ASP.NET.
Thanks.
For the client application using OWC all you need to do is to install new version of the AS OLEDB provider. OWC can work with both AS200 and AS2005. Same goes for Excel and all major Analysis Services clients.
You can install "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider " from http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
|||
Hi. It's me again, I have downloaded and installed all necessary stuff, and project runs seems to run fine, but the Office Web Control says it cannot find the object specified by me.
Here's the OLAPconnection string :
value="Provider=MSOLAP.2;Data Source=http://localhost/elena;Initial Catalog=Aplicatie LogyCars;"
Here is the block of code where i attempt to connect ;
Try
Dim objPT As PivotTableClass = New PivotTableClass
objPT.ConnectionString = strOLAPConn
'strDataMember = "CubLogyCar"
strDataMember = "Cub LogyCar"
objPT.DataMember = strDataMember
m_XML = objPT.XMLData
objPT = Nothing
Catch err As Exception
m_XML = "<err>" & err.Source & " - " & err.Message & "</err>"
Finally
End Try
Return (m_XML)
End Function
There's no error, but still does not connect. "Cub LogyCar" is the name of the OLAP cube buuilt inside the Aplicatie LogyCars solution. Both of them are correctly written in code and web.config file.
Any Suggestions ?
|||For Analysis Service 2005, the provider should be MSOLAP.3Sunday, February 12, 2012
can not send an email using databasemail from asp.net page in a trigger
Hello,
I want to send an email from a trigger. I have configured all, and if I insert something into the table directly in the db the email is sent.
I give access to the asp.net account to msdb and put it into DatabaseMailUserRole group, but it doesnt work when I launch the trigger.
Any ideas?
What is the error you are getting?
Did you try inserting the row from Query window to check db mail working?
Check mail log for more info...
|||that is what i do not understand. It do not give me any error. If I insert from query window it works, but from asp.net fails. I think it is something related to the asp.net account, but i am using atlas and i can not see the error message. Nothing to see in the log, except a transacction exception, but I do not see that always, sometimes it writes it sometimes not.