Showing posts with label generate. Show all posts
Showing posts with label generate. Show all posts

Wednesday, March 28, 2012

reporting services 2005 proxy

I am trying to create a RS proxy to use in my web site. I did this successfully with RS2000. I used web matrix to generate the proxy and put the dll and .cs file in the bin directory of the web site, then I just used <%@. import namspace="rsProxy" %>. It worked like a charm. Now I am trying to get the 2005 version working and created the dll's but all I get in my web page is that it couldn't find the namespace.

I also tried adding a web reference through VS 2005. I don't use projects in my web site so in the VS 2005 method it created a folder under my web site called App_WebReferences. In that folder was another named after my server (reference name defaulted it to, say myServerName). Within that folder there are two files: reportservice2005.discomap and reportservice2005.wsdl. I then tried thier examples to create an instance of ReportingService2005 on the page_load event:

reportservice2005.myServerName.reportservice2005 rs = new reportservice2005.myServerName.reportservice2005();

rs.Url = "http://myservername.reportserver/reportservice2005.asmx?wsdl";

rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

I get the follwiong error:

CS0246: The type or namespace name 'reportservice2005' could not be found (are you missing a using directive or an assembly reference?)

I tried to import the namespace as I did in 2000 with the same error.

I am trying to read the listchildren and populate a treeview. Any suggestions?

Not sure how VS 2005 is different in this respect, but in any case you could use wsdl.exe to extract a *.cs file from a SOAP endpoint. Then you can just include that file in your project.|||

I can get the dll and .cs file to generate. Again, I am not using projects in my web site. Even when I created the web reference in VS it showed all the methods available in the reportingservice2005 and reportexecution2005. I generated it and have tried to implement it using multiple methods but none work. Is there something on the report server or IIS that needs to be setup in order to make a web service available for consumption? I was thinking that maybe during the installation or configuration I missed something. Anyway, I followed the exact same process I used with RS 2000 and it doesn't work.

By the way, thanks for the reply. I'll keep plugging away at it.

|||

ok, I got it this far. I can get the auto-list members to display in VS 2005. Here is my code:

WindowsImpersonationContext impersonationContext;

WindowsIdentity currentWindowsIdentity;

currentWindowsIdentity = WindowsIdentity.GetCurrent();

impersonationContext = currentWindowsIdentity.Impersonate();

rsWebReference.ReportingService2005 rs = new rsWebReference.ReportingService2005();

rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

rsWebReference.CatalogItem[] items = rs.ListChildren("/", true);

foreach (rsWebReference.CatalogItem ci in items)

{

if (ci.Type.ToString() == "Folder" && ci.Hidden == false)

{

Response.Write(ci.Name);

Response.Write(ci.Path);

}

}

impersonationContext.Undo();

Even though the list members are working, it still gives me the same error:

The type or namespace name 'rsWebReference' could not be found (are you missing a using directive or an assembly reference?)

|||The problem was the web site is using the 1.1 framework. When I changed it to use 2.0 it worked.

Tuesday, March 20, 2012

Reporting services

Is it possible to generate ad hoc reporting in reporting services from an analysis services database? I would like to be able to generate ad hoc models for use in report builder. Does anyone know if this is possible?

Yes, you can generate RB model for AS cube - just right-click on UDM data source in Reporting Services connected in management studio, as described for example here.

My personal experience is, that RB is good for simple ad hoc queries, but when you will want to do anything more complex, use some advanced filter or grouping, then you're lost. Also, RB doesn't generate the most efficient MDX code, so performance suffers as well. We've tested it for some time, but at the end we decided to use Proclarity.

Radim

Reporting Services

Hi,
I am new for the Reporting Services. I need to generate a reports
based on a stored procedure. When we call the stored procedure it says
Invalid object name '#LType'. (Microsoft SQL SERVER, Error:208)
If we see the stored procedure, we find that there is a temporary table
'#LType' where we are storing the data and applying some condition for
fatching the records from the table. At the bottom of the stored
procedure we are also dropping the temporary table.The stored procedure
looks like:
alter procedure Test4 .
@.UID int,@.varSourceType varchar(10)=null
......
......
as
set quoted_identifier off
set nocount on
declare @.BranchIDsql varchar(1000),@.varleveltype varchar
.....
....
Begin
create table <b> #LType (LevelType varchar(4)) </b>
insert into #LType select ltrim(rtrim(UL.varleveltype)) from
tbluserlevel UL inner join tblUserProfile UP on
UL.intUserProfileID=UP.intUserProfileID where UP.intUserLoginID=@.UID
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[BID]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BID]
create table BID (intUlBranchID int)
if ((select count(Leveltype) from #LType where LevelType='CORP')>0)
Begin
set @.BranchIDsql="insert into BID select tblULBranch.intUlBranchID
from tblULBranch where intULBranchGroupID in
(select intULBranchGroupID from tblULBranchGroup where intULCountyID
in
(select intULCountyID from tblULCounty where intULRegionID in
(select intULRegionID from tblULRegion where intULCompanyID in
(select intULCompanyID from tblULCompany where intULCompanyGroupID
in
(select intULCompanyGroupID from tblULCompanyGroup where
intULCorporateID in
(select intlevelvalue from tblUserLevel where intUserProfileID in
(select intUserProfileID from tblUserProfile where intUserLoginID in
("+convert(varchar,@.UID)+"))))))))"
exec(@.BranchIDsql)
End
............
............
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[#LType]') and OBJECTPROPERTY(id, N'IsUserTable') =
1)
drop table [dbo].[#LType]
Thanks in Advance
Munna Kumar Singh
Bangalore
IndiaHi
Your procedure is not returning a result set!
Why are you dropping the BID table, this could cause issues on a multiuser
system?
Maybe something like the following (untested!) may be what you want?
ALTER PROCEDURE Test4 @.UID INT,@.varSourceType VARCHAR(10)=NULL
......
......
AS
SET NOCOUNT ON
DECLARE @.BranchIDsql VARCHAR(1000),@.varleveltype VARCHAR(4)
.....
....
BEGIN
IF EXISTS ( SELECT * FROM
dbo.tbluserlevel UL
JOIN dbo.tblUserProfile UP ON UL.intUserProfileID=UP.intUserProfileID
WHERE UP.intUserLoginID=@.UID
AND LTRIM(RTRIM(UL.varleveltype)) = 'CORP'
)
BEGIN
SELECT DISTINCT B.intUlBranchID
FROM tblULBranch B
JOIN tblULBranchGroup G ON B.intULBranchGroupID = G.intULBranchGroupID
JOIN tblULCounty C ON G.intULCountyID = C.intULCountyID
JOIN tblULRegion R ON R.intULRegionID = C.intULRegionID
JOIN tblULCompany Y ON Y.intULCompanyID = R.intULCompanyID
JOIN tblULCompanyGroup Z ON Y.intULCompanyGroupID = Z.intULCompanyGroupID
JOIN tblUserLevel U ON U.intlevelvalue = Z.intULCorporateID
WHERE U.intUserLoginID = @.UID
END
ELSE
SELECT NULL AS intUlBranchID
END
Check out http://www.aspfaq.com/etiquette.asp?id=5006 on how to post DDL and
example data to get a more precise reply. Also posting expected results from
example data is very useful.
John
<dreammunna@.gmail.com> wrote in message
news:1135665571.048020.288240@.g43g2000cwa.googlegroups.com...
> Hi,
> I am new for the Reporting Services. I need to generate a reports
> based on a stored procedure. When we call the stored procedure it says
> Invalid object name '#LType'. (Microsoft SQL SERVER, Error:208)
> If we see the stored procedure, we find that there is a temporary table
> '#LType' where we are storing the data and applying some condition for
> fatching the records from the table. At the bottom of the stored
> procedure we are also dropping the temporary table.The stored procedure
> looks like:
>
> alter procedure Test4 .
> @.UID int,@.varSourceType varchar(10)=null
> ......
> ......
> as
> set quoted_identifier off
> set nocount on
> declare @.BranchIDsql varchar(1000),@.varleveltype varchar
> .....
> ....
> Begin
> create table <b> #LType (LevelType varchar(4)) </b>
> insert into #LType select ltrim(rtrim(UL.varleveltype)) from
> tbluserlevel UL inner join tblUserProfile UP on
> UL.intUserProfileID=UP.intUserProfileID where UP.intUserLoginID=@.UID
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[BID]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
> drop table [dbo].[BID]
> create table BID (intUlBranchID int)
> if ((select count(Leveltype) from #LType where LevelType='CORP')>0)
> Begin
> set @.BranchIDsql="insert into BID select tblULBranch.intUlBranchID
> from tblULBranch where intULBranchGroupID in
> (select intULBranchGroupID from tblULBranchGroup where intULCountyID
> in
> (select intULCountyID from tblULCounty where intULRegionID in
> (select intULRegionID from tblULRegion where intULCompanyID in
> (select intULCompanyID from tblULCompany where intULCompanyGroupID
> in
> (select intULCompanyGroupID from tblULCompanyGroup where
> intULCorporateID in
> (select intlevelvalue from tblUserLevel where intUserProfileID in
> (select intUserProfileID from tblUserProfile where intUserLoginID in
> ("+convert(varchar,@.UID)+"))))))))"
> exec(@.BranchIDsql)
> End
> ............
> ............
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[#LType]') and OBJECTPROPERTY(id, N'IsUserTable') =
> 1)
> drop table [dbo].[#LType]
>
> Thanks in Advance
> Munna Kumar Singh
> Bangalore
> India
>

Monday, March 12, 2012

Reporting Service Web Service Timeout ERROR !!!

Hi,

I am trying to generate a report using the Reporting Service Web Services. The report is getting generated on a completely different server. The Stored procedure used for generating the report is taking about 5-6 hours, since the data and processing is huge.

After some time I get an Timeout error for the web services. The error is described below:

Exception : System.Net.WebException: The operation has timed out

at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)

at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at GetReport._01hw071633.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)

at GetReport.ReportProperties.renderReport(ArrayList objParam)

at JobServer.JobServerMain.RunReport(String reportName)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.\

Can any body suggest me an effecient technique for requesting the reports without timeouts.

Thanks for your help, in advance !

-Sandeep

The Error has been resolved. I set the web service timeout to infinity. :)

-Sandy

Reporting Service Web Service Timeout ERROR !!!

Hi,

I am trying to generate a report using the Reporting Service Web Services. The report is getting generated on a completely different server. The Stored procedure used for generating the report is taking about 5-6 hours, since the data and processing is huge.

After some time I get an Timeout error for the web services. The error is described below:

Exception : System.Net.WebException: The operation has timed out

at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)

at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at GetReport._01hw071633.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)

at GetReport.ReportProperties.renderReport(ArrayList objParam)

at JobServer.JobServerMain.RunReport(String reportName)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.\

Can any body suggest me an effecient technique for requesting the reports without timeouts.

Thanks for your help, in advance !

-Sandeep

The Error has been resolved. I set the web service timeout to infinity. :)

-Sandy

Saturday, February 25, 2012

Reporting on Sharepoint Lists?

I was wondering if it would be possible to generate reports directly from
Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
tnx
-= Maximizing Creativity and Productivity =-Dear Maarten
Yes, you can generate a report from data of WSS - although it is a bit of a
guesswork. WSS saves all user data in one table only (called UserData). You
will have to filter the right data from this table. In order to know what to
filter, you will have to identify the tp_ListId (uniqueidentifier) of the
WSS-List on which you want to base your report. In order to find this
tp_ListId you have to search first in the Sites table for the tp_ID of the
site. With this ID you can look up the tp_ID of the subweb in the Webs table.
And finally, with the ID of the subweb you can look up the ID of the WSS list
in the Lists table.
The next step will be to identify the fields for the identified list. There
is only one way: make a print screen from the WSS-list and scroll the list
date in the UserData table in order to find the fields that store the WSS
list data.
Furthermore, I have found it easiest to define different views on the
UserData table and to work with this views in Reporting Services (not
directly with the UserData table). In the view, you can rename the fields of
the UserData table with aliases that are the names of the columns of the WSS
list.
A last hint: you can display reports in WSS. Just define a WSS page with a
webpart aerea and give this webpart the reportserver link of the report you
want to show. It works fine.
Good luck - Judith Schuetz (www.osn.ch)
"Maarten Visser" wrote:
> I was wondering if it would be possible to generate reports directly from
> Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> tnx
> -= Maximizing Creativity and Productivity =-|||Judith.
Thanks for the information, I understand your solution.
But, like you are saying.. ' It is a bit of a guesswork'.
I have to build a solution for a customer, where end users have to build
reports and the manipulation of data has to be as easy as possible. Because
of this, i was thinking to use WSS as a front-end for data input and
Reporting Services for generating reports on this data.
I'm afraid the given solution would not work in this case, because the user
needs to be able to add columns (in WSS) and the report should than easily be
adapted by the user to show this column. (It would be best if the report
automatically showed the extra column).
Could the ADO.Net extensibility of Reporting Services do something here..
Would it be possible to build a webservice that gets the information from
Sharepoint and let Reporting Services build reports based on the data (rows)
that this webservice provides?
Tnx.
Maarten
I'm afraid the given solution would not work in this case, because the user
needs to be able to add columns and the report should than easely be adapted
by the user to show this column. (It would be best if the report
automatecally showed the extra column).
"j schuetz" wrote:
> Dear Maarten
> Yes, you can generate a report from data of WSS - although it is a bit of a
> guesswork. WSS saves all user data in one table only (called UserData). You
> will have to filter the right data from this table. In order to know what to
> filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> WSS-List on which you want to base your report. In order to find this
> tp_ListId you have to search first in the Sites table for the tp_ID of the
> site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> And finally, with the ID of the subweb you can look up the ID of the WSS list
> in the Lists table.
> The next step will be to identify the fields for the identified list. There
> is only one way: make a print screen from the WSS-list and scroll the list
> date in the UserData table in order to find the fields that store the WSS
> list data.
> Furthermore, I have found it easiest to define different views on the
> UserData table and to work with this views in Reporting Services (not
> directly with the UserData table). In the view, you can rename the fields of
> the UserData table with aliases that are the names of the columns of the WSS
> list.
> A last hint: you can display reports in WSS. Just define a WSS page with a
> webpart aerea and give this webpart the reportserver link of the report you
> want to show. It works fine.
> Good luck - Judith Schuetz (www.osn.ch)
>
> "Maarten Visser" wrote:
> >
> > I was wondering if it would be possible to generate reports directly from
> > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> >
> > tnx
> >
> > -= Maximizing Creativity and Productivity =-|||Sorry - I can't help you with this one.
"Maarten Visser" wrote:
> Judith.
> Thanks for the information, I understand your solution.
> But, like you are saying.. ' It is a bit of a guesswork'.
> I have to build a solution for a customer, where end users have to build
> reports and the manipulation of data has to be as easy as possible. Because
> of this, i was thinking to use WSS as a front-end for data input and
> Reporting Services for generating reports on this data.
> I'm afraid the given solution would not work in this case, because the user
> needs to be able to add columns (in WSS) and the report should than easily be
> adapted by the user to show this column. (It would be best if the report
> automatically showed the extra column).
> Could the ADO.Net extensibility of Reporting Services do something here..
> Would it be possible to build a webservice that gets the information from
> Sharepoint and let Reporting Services build reports based on the data (rows)
> that this webservice provides?
> Tnx.
> Maarten
>
> I'm afraid the given solution would not work in this case, because the user
> needs to be able to add columns and the report should than easely be adapted
> by the user to show this column. (It would be best if the report
> automatecally showed the extra column).
>
> "j schuetz" wrote:
> > Dear Maarten
> >
> > Yes, you can generate a report from data of WSS - although it is a bit of a
> > guesswork. WSS saves all user data in one table only (called UserData). You
> > will have to filter the right data from this table. In order to know what to
> > filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> > WSS-List on which you want to base your report. In order to find this
> > tp_ListId you have to search first in the Sites table for the tp_ID of the
> > site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> > And finally, with the ID of the subweb you can look up the ID of the WSS list
> > in the Lists table.
> >
> > The next step will be to identify the fields for the identified list. There
> > is only one way: make a print screen from the WSS-list and scroll the list
> > date in the UserData table in order to find the fields that store the WSS
> > list data.
> >
> > Furthermore, I have found it easiest to define different views on the
> > UserData table and to work with this views in Reporting Services (not
> > directly with the UserData table). In the view, you can rename the fields of
> > the UserData table with aliases that are the names of the columns of the WSS
> > list.
> >
> > A last hint: you can display reports in WSS. Just define a WSS page with a
> > webpart aerea and give this webpart the reportserver link of the report you
> > want to show. It works fine.
> >
> > Good luck - Judith Schuetz (www.osn.ch)
> >
> >
> > "Maarten Visser" wrote:
> >
> > >
> > > I was wondering if it would be possible to generate reports directly from
> > > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> > >
> > > tnx
> > >
> > > -= Maximizing Creativity and Productivity =-|||This is a fragment from a sp I wrote for a customer that ought to get you
started...
declare @.tbl table(DisplayName varchar(100), ColName varchar(100), List
varchar(20), ShowFld varchar(100))
select top 1 @.flds=cast(tp_Fields as varchar(8000))
from dbo.Lists
where <-- some selection clause -->
select @.flds = '<root>'+@.flds+'</root>' -- surround field list with top
level node, otherwise DOM throws error
exec sp_xml_preparedocument @.hnd output, @.flds
insert into @.tbl
select *
from openxml(@.hnd, N'/root/Field') with (DisplayName varchar(100), ColName
varchar(100), List varchar(20), ShowField varchar(100))
where DisplayName is not null
exec sp_xml_removedocument @.hnd
select @.cmd='select "ID"=ud.tp_ID, Created=ud.tp_Created,
Modified=ud.tp_Modified, Author=u1.tp_Title'
declare crs cursor for select DisplayName, ColName, List, ShowFld from @.tbl
open crs
fetch next from crs into @.name, @.colname, @.list, @.showfld
select @.joinum=2, @.join=''
while @.@.fetch_status = 0
begin
if @.list is not NULL -- if this is a userlist field, join in the list and
return the value (not the list id)
begin
select @.alias = 'u'+cast(@.joinum as varchar(3))
select @.join=@.join+' join dbo.'+@.list+' '+@.alias+' on
(ud.'+@.colname+'='+@.alias+'.tp_ID and ud.tp_Siteid='+@.alias+'.tp_SiteID)'
select @.cmd=@.cmd+', '''+@.name+'''='+@.alias+'.tp_'+@.showfld
select @.joinum=@.joinum+1
end
else
begin
if left(@.colname, 5) = 'ntext' select @.colname = 'cast('+@.colname+' as
varchar('+cast(@.txtlen as varchar(4))+'))'
select @.cmd=@.cmd+', '''+@.name+'''='+@.colname
end
fetch next from crs into @.name, @.colname, @.list, @.showfld
end
close crs
deallocate crs
select @.cmd=@.cmd+' from dbo.UserData ud join dbo.UserInfo u1 on
(ud.tp_Author=u1.tp_ID and ud.tp_Siteid=u1.tp_SiteID) '+@.join
select @.cmd=@.cmd+' order by ud.tp_ID'
Cheers
Mitch
"j schuetz" wrote:
> Sorry - I can't help you with this one.
> "Maarten Visser" wrote:
> > Judith.
> >
> > Thanks for the information, I understand your solution.
> > But, like you are saying.. ' It is a bit of a guesswork'.
> >
> > I have to build a solution for a customer, where end users have to build
> > reports and the manipulation of data has to be as easy as possible. Because
> > of this, i was thinking to use WSS as a front-end for data input and
> > Reporting Services for generating reports on this data.
> >
> > I'm afraid the given solution would not work in this case, because the user
> > needs to be able to add columns (in WSS) and the report should than easily be
> > adapted by the user to show this column. (It would be best if the report
> > automatically showed the extra column).
> >
> > Could the ADO.Net extensibility of Reporting Services do something here..
> > Would it be possible to build a webservice that gets the information from
> > Sharepoint and let Reporting Services build reports based on the data (rows)
> > that this webservice provides?
> >
> > Tnx.
> > Maarten
> >
> >
> > I'm afraid the given solution would not work in this case, because the user
> > needs to be able to add columns and the report should than easely be adapted
> > by the user to show this column. (It would be best if the report
> > automatecally showed the extra column).
> >
> >
> >
> > "j schuetz" wrote:
> >
> > > Dear Maarten
> > >
> > > Yes, you can generate a report from data of WSS - although it is a bit of a
> > > guesswork. WSS saves all user data in one table only (called UserData). You
> > > will have to filter the right data from this table. In order to know what to
> > > filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> > > WSS-List on which you want to base your report. In order to find this
> > > tp_ListId you have to search first in the Sites table for the tp_ID of the
> > > site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> > > And finally, with the ID of the subweb you can look up the ID of the WSS list
> > > in the Lists table.
> > >
> > > The next step will be to identify the fields for the identified list. There
> > > is only one way: make a print screen from the WSS-list and scroll the list
> > > date in the UserData table in order to find the fields that store the WSS
> > > list data.
> > >
> > > Furthermore, I have found it easiest to define different views on the
> > > UserData table and to work with this views in Reporting Services (not
> > > directly with the UserData table). In the view, you can rename the fields of
> > > the UserData table with aliases that are the names of the columns of the WSS
> > > list.
> > >
> > > A last hint: you can display reports in WSS. Just define a WSS page with a
> > > webpart aerea and give this webpart the reportserver link of the report you
> > > want to show. It works fine.
> > >
> > > Good luck - Judith Schuetz (www.osn.ch)
> > >
> > >
> > > "Maarten Visser" wrote:
> > >
> > > >
> > > > I was wondering if it would be possible to generate reports directly from
> > > > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> > > >
> > > > tnx
> > > >
> > > > -= Maximizing Creativity and Productivity =-|||I was negligent in noting that;
This posting is provided "AS IS" with no warranties, and confers no rights.
Now that the lawyers are happy - have fun... :-)
"Mitch vH [MSFT]" wrote:
> This is a fragment from a sp I wrote for a customer that ought to get you
> started...
> declare @.tbl table(DisplayName varchar(100), ColName varchar(100), List
> varchar(20), ShowFld varchar(100))
> select top 1 @.flds=cast(tp_Fields as varchar(8000))
> from dbo.Lists
> where <-- some selection clause -->
> select @.flds = '<root>'+@.flds+'</root>' -- surround field list with top
> level node, otherwise DOM throws error
> exec sp_xml_preparedocument @.hnd output, @.flds
> insert into @.tbl
> select *
> from openxml(@.hnd, N'/root/Field') with (DisplayName varchar(100), ColName
> varchar(100), List varchar(20), ShowField varchar(100))
> where DisplayName is not null
> exec sp_xml_removedocument @.hnd
> select @.cmd='select "ID"=ud.tp_ID, Created=ud.tp_Created,
> Modified=ud.tp_Modified, Author=u1.tp_Title'
> declare crs cursor for select DisplayName, ColName, List, ShowFld from @.tbl
> open crs
> fetch next from crs into @.name, @.colname, @.list, @.showfld
> select @.joinum=2, @.join=''
> while @.@.fetch_status = 0
> begin
> if @.list is not NULL -- if this is a userlist field, join in the list and
> return the value (not the list id)
> begin
> select @.alias = 'u'+cast(@.joinum as varchar(3))
> select @.join=@.join+' join dbo.'+@.list+' '+@.alias+' on
> (ud.'+@.colname+'='+@.alias+'.tp_ID and ud.tp_Siteid='+@.alias+'.tp_SiteID)'
> select @.cmd=@.cmd+', '''+@.name+'''='+@.alias+'.tp_'+@.showfld
> select @.joinum=@.joinum+1
> end
> else
> begin
> if left(@.colname, 5) = 'ntext' select @.colname = 'cast('+@.colname+' as
> varchar('+cast(@.txtlen as varchar(4))+'))'
> select @.cmd=@.cmd+', '''+@.name+'''='+@.colname
> end
> fetch next from crs into @.name, @.colname, @.list, @.showfld
> end
> close crs
> deallocate crs
> select @.cmd=@.cmd+' from dbo.UserData ud join dbo.UserInfo u1 on
> (ud.tp_Author=u1.tp_ID and ud.tp_Siteid=u1.tp_SiteID) '+@.join
> select @.cmd=@.cmd+' order by ud.tp_ID'
> Cheers
> Mitch
> "j schuetz" wrote:
> > Sorry - I can't help you with this one.
> >
> > "Maarten Visser" wrote:
> >
> > > Judith.
> > >
> > > Thanks for the information, I understand your solution.
> > > But, like you are saying.. ' It is a bit of a guesswork'.
> > >
> > > I have to build a solution for a customer, where end users have to build
> > > reports and the manipulation of data has to be as easy as possible. Because
> > > of this, i was thinking to use WSS as a front-end for data input and
> > > Reporting Services for generating reports on this data.
> > >
> > > I'm afraid the given solution would not work in this case, because the user
> > > needs to be able to add columns (in WSS) and the report should than easily be
> > > adapted by the user to show this column. (It would be best if the report
> > > automatically showed the extra column).
> > >
> > > Could the ADO.Net extensibility of Reporting Services do something here..
> > > Would it be possible to build a webservice that gets the information from
> > > Sharepoint and let Reporting Services build reports based on the data (rows)
> > > that this webservice provides?
> > >
> > > Tnx.
> > > Maarten
> > >
> > >
> > > I'm afraid the given solution would not work in this case, because the user
> > > needs to be able to add columns and the report should than easely be adapted
> > > by the user to show this column. (It would be best if the report
> > > automatecally showed the extra column).
> > >
> > >
> > >
> > > "j schuetz" wrote:
> > >
> > > > Dear Maarten
> > > >
> > > > Yes, you can generate a report from data of WSS - although it is a bit of a
> > > > guesswork. WSS saves all user data in one table only (called UserData). You
> > > > will have to filter the right data from this table. In order to know what to
> > > > filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> > > > WSS-List on which you want to base your report. In order to find this
> > > > tp_ListId you have to search first in the Sites table for the tp_ID of the
> > > > site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> > > > And finally, with the ID of the subweb you can look up the ID of the WSS list
> > > > in the Lists table.
> > > >
> > > > The next step will be to identify the fields for the identified list. There
> > > > is only one way: make a print screen from the WSS-list and scroll the list
> > > > date in the UserData table in order to find the fields that store the WSS
> > > > list data.
> > > >
> > > > Furthermore, I have found it easiest to define different views on the
> > > > UserData table and to work with this views in Reporting Services (not
> > > > directly with the UserData table). In the view, you can rename the fields of
> > > > the UserData table with aliases that are the names of the columns of the WSS
> > > > list.
> > > >
> > > > A last hint: you can display reports in WSS. Just define a WSS page with a
> > > > webpart aerea and give this webpart the reportserver link of the report you
> > > > want to show. It works fine.
> > > >
> > > > Good luck - Judith Schuetz (www.osn.ch)
> > > >
> > > >
> > > > "Maarten Visser" wrote:
> > > >
> > > > >
> > > > > I was wondering if it would be possible to generate reports directly from
> > > > > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> > > > >
> > > > > tnx
> > > > >
> > > > > -= Maximizing Creativity and Productivity =-|||I'm reviewing this... sounds promising:
http://www.teuntostring.net/blog/2006/03/update-reporting-over-sharepoint-lists.html
"Maarten Visser" wrote:
> Judith.
> Thanks for the information, I understand your solution.
> But, like you are saying.. ' It is a bit of a guesswork'.
> I have to build a solution for a customer, where end users have to build
> reports and the manipulation of data has to be as easy as possible. Because
> of this, i was thinking to use WSS as a front-end for data input and
> Reporting Services for generating reports on this data.
> I'm afraid the given solution would not work in this case, because the user
> needs to be able to add columns (in WSS) and the report should than easily be
> adapted by the user to show this column. (It would be best if the report
> automatically showed the extra column).
> Could the ADO.Net extensibility of Reporting Services do something here..
> Would it be possible to build a webservice that gets the information from
> Sharepoint and let Reporting Services build reports based on the data (rows)
> that this webservice provides?
> Tnx.
> Maarten
>
> I'm afraid the given solution would not work in this case, because the user
> needs to be able to add columns and the report should than easely be adapted
> by the user to show this column. (It would be best if the report
> automatecally showed the extra column).
>
> "j schuetz" wrote:
> > Dear Maarten
> >
> > Yes, you can generate a report from data of WSS - although it is a bit of a
> > guesswork. WSS saves all user data in one table only (called UserData). You
> > will have to filter the right data from this table. In order to know what to
> > filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> > WSS-List on which you want to base your report. In order to find this
> > tp_ListId you have to search first in the Sites table for the tp_ID of the
> > site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> > And finally, with the ID of the subweb you can look up the ID of the WSS list
> > in the Lists table.
> >
> > The next step will be to identify the fields for the identified list. There
> > is only one way: make a print screen from the WSS-list and scroll the list
> > date in the UserData table in order to find the fields that store the WSS
> > list data.
> >
> > Furthermore, I have found it easiest to define different views on the
> > UserData table and to work with this views in Reporting Services (not
> > directly with the UserData table). In the view, you can rename the fields of
> > the UserData table with aliases that are the names of the columns of the WSS
> > list.
> >
> > A last hint: you can display reports in WSS. Just define a WSS page with a
> > webpart aerea and give this webpart the reportserver link of the report you
> > want to show. It works fine.
> >
> > Good luck - Judith Schuetz (www.osn.ch)
> >
> >
> > "Maarten Visser" wrote:
> >
> > >
> > > I was wondering if it would be possible to generate reports directly from
> > > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> > >
> > > tnx
> > >
> > > -= Maximizing Creativity and Productivity =-|||Do you know if this will be valid for the new version of WSS(v3)?
"Mitch vH [MSFT]" wrote:
> This is a fragment from a sp I wrote for a customer that ought to get you
> started...
> declare @.tbl table(DisplayName varchar(100), ColName varchar(100), List
> varchar(20), ShowFld varchar(100))
> select top 1 @.flds=cast(tp_Fields as varchar(8000))
> from dbo.Lists
> where <-- some selection clause -->
> select @.flds = '<root>'+@.flds+'</root>' -- surround field list with top
> level node, otherwise DOM throws error
> exec sp_xml_preparedocument @.hnd output, @.flds
> insert into @.tbl
> select *
> from openxml(@.hnd, N'/root/Field') with (DisplayName varchar(100), ColName
> varchar(100), List varchar(20), ShowField varchar(100))
> where DisplayName is not null
> exec sp_xml_removedocument @.hnd
> select @.cmd='select "ID"=ud.tp_ID, Created=ud.tp_Created,
> Modified=ud.tp_Modified, Author=u1.tp_Title'
> declare crs cursor for select DisplayName, ColName, List, ShowFld from @.tbl
> open crs
> fetch next from crs into @.name, @.colname, @.list, @.showfld
> select @.joinum=2, @.join=''
> while @.@.fetch_status = 0
> begin
> if @.list is not NULL -- if this is a userlist field, join in the list and
> return the value (not the list id)
> begin
> select @.alias = 'u'+cast(@.joinum as varchar(3))
> select @.join=@.join+' join dbo.'+@.list+' '+@.alias+' on
> (ud.'+@.colname+'='+@.alias+'.tp_ID and ud.tp_Siteid='+@.alias+'.tp_SiteID)'
> select @.cmd=@.cmd+', '''+@.name+'''='+@.alias+'.tp_'+@.showfld
> select @.joinum=@.joinum+1
> end
> else
> begin
> if left(@.colname, 5) = 'ntext' select @.colname = 'cast('+@.colname+' as
> varchar('+cast(@.txtlen as varchar(4))+'))'
> select @.cmd=@.cmd+', '''+@.name+'''='+@.colname
> end
> fetch next from crs into @.name, @.colname, @.list, @.showfld
> end
> close crs
> deallocate crs
> select @.cmd=@.cmd+' from dbo.UserData ud join dbo.UserInfo u1 on
> (ud.tp_Author=u1.tp_ID and ud.tp_Siteid=u1.tp_SiteID) '+@.join
> select @.cmd=@.cmd+' order by ud.tp_ID'
> Cheers
> Mitch
> "j schuetz" wrote:
> > Sorry - I can't help you with this one.
> >
> > "Maarten Visser" wrote:
> >
> > > Judith.
> > >
> > > Thanks for the information, I understand your solution.
> > > But, like you are saying.. ' It is a bit of a guesswork'.
> > >
> > > I have to build a solution for a customer, where end users have to build
> > > reports and the manipulation of data has to be as easy as possible. Because
> > > of this, i was thinking to use WSS as a front-end for data input and
> > > Reporting Services for generating reports on this data.
> > >
> > > I'm afraid the given solution would not work in this case, because the user
> > > needs to be able to add columns (in WSS) and the report should than easily be
> > > adapted by the user to show this column. (It would be best if the report
> > > automatically showed the extra column).
> > >
> > > Could the ADO.Net extensibility of Reporting Services do something here..
> > > Would it be possible to build a webservice that gets the information from
> > > Sharepoint and let Reporting Services build reports based on the data (rows)
> > > that this webservice provides?
> > >
> > > Tnx.
> > > Maarten
> > >
> > >
> > > I'm afraid the given solution would not work in this case, because the user
> > > needs to be able to add columns and the report should than easely be adapted
> > > by the user to show this column. (It would be best if the report
> > > automatecally showed the extra column).
> > >
> > >
> > >
> > > "j schuetz" wrote:
> > >
> > > > Dear Maarten
> > > >
> > > > Yes, you can generate a report from data of WSS - although it is a bit of a
> > > > guesswork. WSS saves all user data in one table only (called UserData). You
> > > > will have to filter the right data from this table. In order to know what to
> > > > filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> > > > WSS-List on which you want to base your report. In order to find this
> > > > tp_ListId you have to search first in the Sites table for the tp_ID of the
> > > > site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> > > > And finally, with the ID of the subweb you can look up the ID of the WSS list
> > > > in the Lists table.
> > > >
> > > > The next step will be to identify the fields for the identified list. There
> > > > is only one way: make a print screen from the WSS-list and scroll the list
> > > > date in the UserData table in order to find the fields that store the WSS
> > > > list data.
> > > >
> > > > Furthermore, I have found it easiest to define different views on the
> > > > UserData table and to work with this views in Reporting Services (not
> > > > directly with the UserData table). In the view, you can rename the fields of
> > > > the UserData table with aliases that are the names of the columns of the WSS
> > > > list.
> > > >
> > > > A last hint: you can display reports in WSS. Just define a WSS page with a
> > > > webpart aerea and give this webpart the reportserver link of the report you
> > > > want to show. It works fine.
> > > >
> > > > Good luck - Judith Schuetz (www.osn.ch)
> > > >
> > > >
> > > > "Maarten Visser" wrote:
> > > >
> > > > >
> > > > > I was wondering if it would be possible to generate reports directly from
> > > > > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> > > > >
> > > > > tnx
> > > > >
> > > > > -= Maximizing Creativity and Productivity =-|||Hi,
In case you are interested, we have developped a Reporting Services Data
Extension for SharePoint. An evaluation version is available on our web site
at http://www.enesyssoftware.com/Default.aspx?tabid=56.
If you would like to develop it from scratch, the article from Teun Duynstee
is surely the way to go.
--
Frederic Latour
Enesys
http://www.enesyssoftware.com
"Bob C." wrote:
> I'm reviewing this... sounds promising:
> http://www.teuntostring.net/blog/2006/03/update-reporting-over-sharepoint-lists.html
> "Maarten Visser" wrote:
> > Judith.
> >
> > Thanks for the information, I understand your solution.
> > But, like you are saying.. ' It is a bit of a guesswork'.
> >
> > I have to build a solution for a customer, where end users have to build
> > reports and the manipulation of data has to be as easy as possible. Because
> > of this, i was thinking to use WSS as a front-end for data input and
> > Reporting Services for generating reports on this data.
> >
> > I'm afraid the given solution would not work in this case, because the user
> > needs to be able to add columns (in WSS) and the report should than easily be
> > adapted by the user to show this column. (It would be best if the report
> > automatically showed the extra column).
> >
> > Could the ADO.Net extensibility of Reporting Services do something here..
> > Would it be possible to build a webservice that gets the information from
> > Sharepoint and let Reporting Services build reports based on the data (rows)
> > that this webservice provides?
> >
> > Tnx.
> > Maarten
> >
> >
> > I'm afraid the given solution would not work in this case, because the user
> > needs to be able to add columns and the report should than easely be adapted
> > by the user to show this column. (It would be best if the report
> > automatecally showed the extra column).
> >
> >
> >
> > "j schuetz" wrote:
> >
> > > Dear Maarten
> > >
> > > Yes, you can generate a report from data of WSS - although it is a bit of a
> > > guesswork. WSS saves all user data in one table only (called UserData). You
> > > will have to filter the right data from this table. In order to know what to
> > > filter, you will have to identify the tp_ListId (uniqueidentifier) of the
> > > WSS-List on which you want to base your report. In order to find this
> > > tp_ListId you have to search first in the Sites table for the tp_ID of the
> > > site. With this ID you can look up the tp_ID of the subweb in the Webs table.
> > > And finally, with the ID of the subweb you can look up the ID of the WSS list
> > > in the Lists table.
> > >
> > > The next step will be to identify the fields for the identified list. There
> > > is only one way: make a print screen from the WSS-list and scroll the list
> > > date in the UserData table in order to find the fields that store the WSS
> > > list data.
> > >
> > > Furthermore, I have found it easiest to define different views on the
> > > UserData table and to work with this views in Reporting Services (not
> > > directly with the UserData table). In the view, you can rename the fields of
> > > the UserData table with aliases that are the names of the columns of the WSS
> > > list.
> > >
> > > A last hint: you can display reports in WSS. Just define a WSS page with a
> > > webpart aerea and give this webpart the reportserver link of the report you
> > > want to show. It works fine.
> > >
> > > Good luck - Judith Schuetz (www.osn.ch)
> > >
> > >
> > > "Maarten Visser" wrote:
> > >
> > > >
> > > > I was wondering if it would be possible to generate reports directly from
> > > > Windows Sharepoint Services (WSS) Lists or from the output of a Webservice?
> > > >
> > > > tnx
> > > >
> > > > -= Maximizing Creativity and Productivity =-

Tuesday, February 21, 2012

Reporting on a dynamic recordset

I have my first project with reporting services - 2000 not 2005 and the very
first report that I have to generate is based on a dynamic pivot of an SQL
table.
This means at design time, I don't know how many columns there is going to
be - it will vary quite a lot depending on date ranges and time of year and
so on.
Is there any way to create a report at run time using code? - C# preferably
Thanks for any helpCould you use a matrix control? This allows you to have a variable number of
columns.
HTH,
Magendo_man
"ElijaTheGold" wrote:
> I have my first project with reporting services - 2000 not 2005 and the very
> first report that I have to generate is based on a dynamic pivot of an SQL
> table.
> This means at design time, I don't know how many columns there is going to
> be - it will vary quite a lot depending on date ranges and time of year and
> so on.
> Is there any way to create a report at run time using code? - C# preferably
> Thanks for any help|||But what if I don't know what the columns are going to be until the report is
run?
Can a Matrix do that - I couldn't find anything to say it could
"magendo_man" wrote:
> Could you use a matrix control? This allows you to have a variable number of
> columns.
> HTH,
> Magendo_man
> "ElijaTheGold" wrote:
> > I have my first project with reporting services - 2000 not 2005 and the very
> > first report that I have to generate is based on a dynamic pivot of an SQL
> > table.
> >
> > This means at design time, I don't know how many columns there is going to
> > be - it will vary quite a lot depending on date ranges and time of year and
> > so on.
> >
> > Is there any way to create a report at run time using code? - C# preferably
> >
> > Thanks for any help|||I achieved this in a report I was working on today by introducing a field
called ColumnNo in the stored procedure on which my report dataset is
introduced. This allowed me to have as many columns as required depending on
the reports parameters and the underlying data.
HTH,
Magendo_man
"ElijaTheGold" wrote:
> But what if I don't know what the columns are going to be until the report is
> run?
> Can a Matrix do that - I couldn't find anything to say it could
> "magendo_man" wrote:
> > Could you use a matrix control? This allows you to have a variable number of
> > columns.
> >
> > HTH,
> > Magendo_man
> >
> > "ElijaTheGold" wrote:
> >
> > > I have my first project with reporting services - 2000 not 2005 and the very
> > > first report that I have to generate is based on a dynamic pivot of an SQL
> > > table.
> > >
> > > This means at design time, I don't know how many columns there is going to
> > > be - it will vary quite a lot depending on date ranges and time of year and
> > > so on.
> > >
> > > Is there any way to create a report at run time using code? - C# preferably
> > >
> > > Thanks for any help|||Thanks - I'll have a look into it and see how it goes.
I may be back ;)
"magendo_man" wrote:
> I achieved this in a report I was working on today by introducing a field
> called ColumnNo in the stored procedure on which my report dataset is
> introduced. This allowed me to have as many columns as required depending on
> the reports parameters and the underlying data.
> HTH,
> Magendo_man
> "ElijaTheGold" wrote:
> > But what if I don't know what the columns are going to be until the report is
> > run?
> > Can a Matrix do that - I couldn't find anything to say it could
> >
> > "magendo_man" wrote:
> >
> > > Could you use a matrix control? This allows you to have a variable number of
> > > columns.
> > >
> > > HTH,
> > > Magendo_man
> > >
> > > "ElijaTheGold" wrote:
> > >
> > > > I have my first project with reporting services - 2000 not 2005 and the very
> > > > first report that I have to generate is based on a dynamic pivot of an SQL
> > > > table.
> > > >
> > > > This means at design time, I don't know how many columns there is going to
> > > > be - it will vary quite a lot depending on date ranges and time of year and
> > > > so on.
> > > >
> > > > Is there any way to create a report at run time using code? - C# preferably
> > > >
> > > > Thanks for any help