Wednesday, March 28, 2012
How To Determine Total Page Count For Report From VS.NET
(one page at a time).
I use web service written on VS.NET 2005 which calls
ReportingServices.Render(...), where
v_Format = "HTML4.0";
v_DeviceInfo = "<DeviceInfo><Toolbar>true</Toolbar><JavaScript>true</
JavaScript><LinkTarget>_top</LinkTarget><Section>" +
ReportRequest.RequestPage + "</Section></DeviceInfo>";
How can I determine total page count for report?On May 21, 8:33 am, Mary <mnem...@.gmail.com> wrote:
> I've got Reporting Services 2005. And I need to show reports in Delphi
> (one page at a time).
> I use web service written on VS.NET 2005 which calls
> ReportingServices.Render(...), where
> v_Format = "HTML4.0";
> v_DeviceInfo = "<DeviceInfo><Toolbar>true</Toolbar><JavaScript>true</
> JavaScript><LinkTarget>_top</LinkTarget><Section>" +
> ReportRequest.RequestPage + "</Section></DeviceInfo>";
> How can I determine total page count for report?
=Globals.TotalPages
Monday, March 26, 2012
How to determine programatically what datafiles are associated with a database
information. This information will be used for reporting and analysis. I
want to be able to tell what data files are associated with each of the
databases. sysfiles doesn't include the database name and sysaltfiles
doesn't include all of the datafiles.
Query I'm using:
use master
select f.file_name, f.name, ...
from master.dbo.sysaltfiles a ,
dbo.sysfiles f ,
master.dbo.sysdatabases db
where a.name=f.name
and a.fileid = f.fileid
and a.dbid = db.dbid
and db.name = 'master'
I can probably infer the database name from the name column but I'd rather
not go there!
Please don't tell me to go somewhere and point and click. I'm monitoring
almost 70 databases and this data needs to be collected on a daily basis.
Message posted via http://www.webservertalk.comevelyn,
use sp_msforeachdb:
exec sp_msforeachdb '
select db.name, f.name
from master.dbo.sysaltfiles a ,
?.dbo.sysfiles f ,
master.dbo.sysdatabases db
where a.name=f.name
and a.fileid = f.fileid
and a.dbid = db.dbid '
hth
dean
"Evelyn Schwartz via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:eebc4237a7204ec3a8b8ca5fab4890a5@.SQ
webservertalk.com...
> I'm writing a data collection script to gather database and data file
> information. This information will be used for reporting and analysis. I
> want to be able to tell what data files are associated with each of the
> databases. sysfiles doesn't include the database name and sysaltfiles
> doesn't include all of the datafiles.
> Query I'm using:
> use master
> select f.file_name, f.name, ...
> from master.dbo.sysaltfiles a ,
> dbo.sysfiles f ,
> master.dbo.sysdatabases db
> where a.name=f.name
> and a.fileid = f.fileid
> and a.dbid = db.dbid
> and db.name = 'master'
> I can probably infer the database name from the name column but I'd rather
> not go there!
> Please don't tell me to go somewhere and point and click. I'm monitoring
> almost 70 databases and this data needs to be collected on a daily basis.
> --
> Message posted via http://www.webservertalk.com|||Try this:
exec sp_MSforeachdb
'
use [?]
select so.name as Table_Name,
sfg.groupname as GroupName,
sf.name as LogicalName,
sf.filename as PhysicalFileName
from dbo.sysobjects so
inner join sysindexes si
on so.id = si.id
inner join sysfilegroups sfg
on si.groupid = sfg.groupid
inner join sysfiles sf
on sf.groupid = sfg.groupid
group by so.name,
sfg.groupname,
sf.name,
sf.filename
'|||For this query add brackets around the question mark. i.e. [?]|||What does sp_msforeachdb do? It is not in my online book. I hesitate to
run something in 70 production databases without knowing the possible
ramifications.
Message posted via http://www.webservertalk.com|||I figured out what the procedure does.
Perhaps I'm not clear I want the database name and all associated data file
names. The following query gives me table names.
select so.name as Table_Name,
sfg.groupname as GroupName,
sf.name as LogicalName,
sf.filename as PhysicalFileName
from dbo.sysobjects so
inner join sysindexes si
on so.id = si.id
inner join sysfilegroups sfg
on si.groupid = sfg.groupid
inner join sysfiles sf
on sf.groupid = sfg.groupid
group by so.name,
sfg.groupname,
sf.name,
sf.filename
Message posted via http://www.webservertalk.com|||it is undocumented and unsupported, meaning that ms might choose not to
include it in future versions of sql server. however, it is widely used. you
can check the definition (in master db) with:
exec sp_helptext 'sp_msforeachdb'
nothing fancy (builds a cursor internallly), but very handy.
dean
"Evelyn Schwartz via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:f3affb3bea874a3fbf0edb3bcc8b8868@.SQ
webservertalk.com...
> What does sp_msforeachdb do? It is not in my online book. I hesitate to
> run something in 70 production databases without knowing the possible
> ramifications.
> --
> Message posted via http://www.webservertalk.com|||Hi
The database may have two or more log files. You also need to see them
Look at this script helps you.
SELECT RTRIM(filename)
FROM sysfiles
WHERE fileid = (SELECT MIN(fileid) FROM sysfiles)
UNION ALL
SELECT RTRIM(filename)
FROM sysfiles
WHERE fileid > (SELECT MIN(fileid) FROM sysfiles) AND
fileid < (SELECT MAX(fileid) FROM sysfiles)
UNION ALL
SELECT RTRIM(filename) FROM sysfiles
WHERE fileid = (SELECT MAX(fileid) FROM sysfiles)
"Evelyn Schwartz via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:960a4cbd69a241458a0b54a9fd0b14ea@.SQ
webservertalk.com...
> I figured out what the procedure does.
> Perhaps I'm not clear I want the database name and all associated data
file
> names. The following query gives me table names.
> select so.name as Table_Name,
> sfg.groupname as GroupName,
> sf.name as LogicalName,
> sf.filename as PhysicalFileName
> from dbo.sysobjects so
> inner join sysindexes si
> on so.id = si.id
> inner join sysfilegroups sfg
> on si.groupid = sfg.groupid
> inner join sysfiles sf
> on sf.groupid = sfg.groupid
> group by so.name,
> sfg.groupname,
> sf.name,
> sf.filename
> --
> Message posted via http://www.webservertalk.com
Wednesday, March 21, 2012
How to detect if SQL Reporting Services is installed ?
services is installed and if so, which version. Does anyone know a stored
procedure or a Web Services API to do this ?
thanks,RaviHello Ravi,
There are a couple ways to determine RS version:
1) Check the registry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Reporting Services\Version
2) Use the webservice API like this:
For RS 2000:
ReportingService rs1 = new ReportingService();
rs1.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs1.ServerInfoHeaderValue = new ServerInfoHeader();
rs1.ListChildren("/", false);
Console.WriteLine(rs1.ServerInfoHeaderValue.ReportServerEdition);
Console.WriteLine(rs1.ServerInfoHeaderValue.ReportServerVersionNumber);
For RS 2005:
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.ServerInfoHeaderValue = new ServerInfoHeader();
rs.ListChildren("/", false);
Console.WriteLine(rs.ServerInfoHeaderValue.ReportServerVersion);
Console.WriteLine(rs.ServerInfoHeaderValue.ReportServerEdition);
Console.WriteLine(rs.ServerInfoHeaderValue.ReportServerVersionNumber);
Note that there is a new property in 2005, "ReportServerVersion". Also be
aware that ReportServerVersionNumber returns differntly formatted values
for 2000 and 2005.
-Chris
> From an ASP.Net application I need to detect if on a given node,
> Repoting services is installed and if so, which version. Does anyone
> know a stored procedure or a Web Services API to do this ?
> thanks,Ravi
>|||Thanks Chris, that was very helpful.
I have started using the #1 to read the registry. But my requirement is that
I need to be able to detect RS and its version on local and remote machines,
including ones behind firewall. Reading Registry in these secanrios leads to
lot of security issues. Further, I also need to detect if RS is currently
running, I need this to enable a button to launch Report Builder.
Using the RS2005 Web Services seems to be a better approach. Do you know of
an API to also detect if Report Services is currently running ? Do you know
what happens if Report Services is not installed on a remote machine but we
try to call a Web Service ?
thanks for your time and help,
Ravi
"Chris Baldwin" wrote:
> Hello Ravi,
> There are a couple ways to determine RS version:
> 1) Check the registry at:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Reporting Services\Version
> 2) Use the webservice API like this:
> For RS 2000:
> ReportingService rs1 = new ReportingService();
> rs1.Credentials = System.Net.CredentialCache.DefaultCredentials;
> rs1.ServerInfoHeaderValue = new ServerInfoHeader();
> rs1.ListChildren("/", false);
> Console.WriteLine(rs1.ServerInfoHeaderValue.ReportServerEdition);
> Console.WriteLine(rs1.ServerInfoHeaderValue.ReportServerVersionNumber);
> For RS 2005:
> ReportingService2005 rs = new ReportingService2005();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> rs.ServerInfoHeaderValue = new ServerInfoHeader();
> rs.ListChildren("/", false);
> Console.WriteLine(rs.ServerInfoHeaderValue.ReportServerVersion);
> Console.WriteLine(rs.ServerInfoHeaderValue.ReportServerEdition);
> Console.WriteLine(rs.ServerInfoHeaderValue.ReportServerVersionNumber);
> Note that there is a new property in 2005, "ReportServerVersion". Also be
> aware that ReportServerVersionNumber returns differntly formatted values
> for 2000 and 2005.
> -Chris
>
> > From an ASP.Net application I need to detect if on a given node,
> > Repoting services is installed and if so, which version. Does anyone
> > know a stored procedure or a Web Services API to do this ?
> >
> > thanks,Ravi
> >
>
>
Monday, March 19, 2012
How to design SQL Server 2005 Reporting Services Reports in VS.NET 2005 web applications
Hi,
Can we design SQL Server 2005 Reporting Services Reports in VS.NET 2005 web applications. If so how they can be designed. Plz help me if any one know the solution.
Thanx in advance,
Vidya
Are you asking if you can use VS.Net 2005 to design reports, yes, both client and server reports are built using VS.Net.
If you are asking if you can use a web application to build a report, well yes you could, but you would have you design it. All sql server reports are is an xml file, so if you can build a front end that will generate the xml in the proper format then you are good to go! I even believe there is a .Net Class that would assist you in this...
Josh
|||u can design RS2005 in 2 ways:
1.u can open Business Intelligence Projects->Report Server Project,but than u will have to use Report Server.to design open a report file(rdl)
2.u can use ReportViewer within the Web application.to design open a report file(rdlc)
Monday, March 12, 2012
How to deploy Reports.
Hi,
I have a web project and created a setup project for it. And I have to create reports using sql server reporting services. For this I have created an reportserver project and created two reports.
I have to create a setup file to install these reports in a remote machine.
How to do this?
where this .rdl and .rds files will be stored in the reportserver.
Regards,
Murali
You're in the wrong forum. Moving to SQL Server Reporting Services.|||Russell Christopher has a blog post in which he gives a sample and outlines the process of using his sample to deploy RDLs via an MSI: http://blogs.msdn.com/bimusings/archive/2006/03/01/541599.aspx
I believe, however, that you may be better served embedding the ReportViewer control and building the reports into your web project. Here are a couple of resources for the ReportViewer control:
Report Authoring Tips and Tricks
Larry|||http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050609SQLServerBW/manifest.xml
Getting started with SQL Server 2005 Reporting Services or the new report controls in Visual Studio 2005? Brian Welcker demonstrates some tips and tricks that you can use to add interactive features to your own reports. MSDN Webcast: Intelligent Reporting: Using the Visual Studio 2005 Report Viewer Controls (Level 200)
http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032284444&EventCategory=5&culture=en-US&CountryCode=US
This explains integrating the ReportViewer control into your 2005 Web or Windows applications.
I left out a great resource:
http://www.gotreportviewer.com/
Larry
|||Thanks for your help.
It helps me to find the solution.
Murali.
How to Deploy Reports to a Production Environment
using Visual Studio .NET 2003 (and, of course, the Reporting Services
designer). Once the master reports are finished, we will need to install
these reports to our customers' computers (their computers are not a part of
our network, we don't have access to them to deploy from our computers and
the Visual Studio .NET 2003 solution/project). And then we will need to
deploy to the ReportServer on their server.
Additionally, the customers' server will have VB .NET installed (the basic
edition to allow RDL development).
So, should we simply copy the solution, project, RDS, and RDL files to the
customers' server, then open the solution in VB .NET, and deploy? Or is
there a better way?
Also, since we are developing the master reports in a solution/project in
Visual Studio .NET on our local development servers, is there any
compatibility issues in trying to open that same solution in VB .NET on the
customers' server?
Thanks.I would think the easiest way would be to build a quick app to do this using
the CreateReport SOAP Api. You could then make this app as simple or
complex as you need it and not need to worry about your customers having any
VS components. We shipped a sample app (RSExplorer I believe) that does
allow you to deploy but it would have to be modified if you wanted to easily
upload a directory of rdls.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Belak" <nospam@.nospam.com> wrote in message
news:OrhITzzmEHA.3264@.TK2MSFTNGP12.phx.gbl...
> Our situation is that we are developing a set of "master" reports locally
> using Visual Studio .NET 2003 (and, of course, the Reporting Services
> designer). Once the master reports are finished, we will need to install
> these reports to our customers' computers (their computers are not a part
of
> our network, we don't have access to them to deploy from our computers and
> the Visual Studio .NET 2003 solution/project). And then we will need to
> deploy to the ReportServer on their server.
> Additionally, the customers' server will have VB .NET installed (the basic
> edition to allow RDL development).
> So, should we simply copy the solution, project, RDS, and RDL files to the
> customers' server, then open the solution in VB .NET, and deploy? Or is
> there a better way?
> Also, since we are developing the master reports in a solution/project in
> Visual Studio .NET on our local development servers, is there any
> compatibility issues in trying to open that same solution in VB .NET on
the
> customers' server?
> Thanks.
>
how to deploy reporting services into different folders
Hi,
can i deploy reporting services rdl files into different folders in RS?
will it be able to create the folders by itself or do i need to create them beforehand?
thanks for any answers.
-
HY
We set up multiple configurations (such as Dev, QA, UAT, Production) in VS allowing us to specify the server and folder that the RDL files were deployed to. Go to Project -> Properties to specify the targets - there's a button for configuration manager there as well to add multiple configurations.
Scott
|||If you're talking about deploying directly from visual studio then you specify the target folder for deployment from the project properties.
You can't set up a folder structure within a reporting services project. To deploy reports to specific folders you can connect through management studio or the report manager web inteface and do it manually.
How to deploy report from QA to PROD without changing data source
in VS2005. Then deploy them to my QA server and, when that passes testing,
put it into my PROD environment. That all works very nicely.
I have defined 2 data sources, one for QA and one for PROD. What gets to me
is that after deploying to QA I have to go into Report Manager and select the
QA data source for each of my reports. Then, once deployed to PROD I have to
do the same. This becomes a major headache when I have to make many small
changes to a report and repeat the process each time.
Is there a way to specify an alias of some form that can point to my
development server data source when on my machine, and to the appropriate
databases when on QA and PROD?
Thanks.It's not exactly clear but do you have 2 shared datasources? If so why? If
you have a shared datasource on your QA server and one on your PROD server
with the same name and location (and the same as in your project) then you
wouldn't have to do this. When reports are deployed to qa/prod they would
just work. A shared datasource seems to be exactly what you want but from
the sound of it you are already using one?
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Mike Kelly" <MikeKelly@.community.nospam> wrote in message
news:14B8552A-AFB7-42C9-AB9B-9F70A8D44763@.microsoft.com...
> Hi. I love the time-saving features of Reporting Services. I desing my
> report
> in VS2005. Then deploy them to my QA server and, when that passes testing,
> put it into my PROD environment. That all works very nicely.
> I have defined 2 data sources, one for QA and one for PROD. What gets to
> me
> is that after deploying to QA I have to go into Report Manager and select
> the
> QA data source for each of my reports. Then, once deployed to PROD I have
> to
> do the same. This becomes a major headache when I have to make many small
> changes to a report and repeat the process each time.
> Is there a way to specify an alias of some form that can point to my
> development server data source when on my machine, and to the appropriate
> databases when on QA and PROD?
> Thanks.|||We do what Jasper is suggesting.
We create a data source (maybe called Prod) in the project. The first time
we deploy, we go into report manager and change the connection information to
whatever it needs to be. Since redeployment does NOT change the connection (
unless you change the config), everything works fine.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Mike Kelly" wrote:
> Hi. I love the time-saving features of Reporting Services. I desing my report
> in VS2005. Then deploy them to my QA server and, when that passes testing,
> put it into my PROD environment. That all works very nicely.
> I have defined 2 data sources, one for QA and one for PROD. What gets to me
> is that after deploying to QA I have to go into Report Manager and select the
> QA data source for each of my reports. Then, once deployed to PROD I have to
> do the same. This becomes a major headache when I have to make many small
> changes to a report and repeat the process each time.
> Is there a way to specify an alias of some form that can point to my
> development server data source when on my machine, and to the appropriate
> databases when on QA and PROD?
> Thanks.|||Thanks Jasper and Wayne.
I am using shared data sources, but incorrectly. I was deploying them each
time. But was blind as to their inteded use. The word "Shared" threw me off
course. Now I see. I'll replace the two I was using (one for test and one for
prod) with a single one (since I only have a single database) and change the
definition for that one depeding on the environment it is running in. So
simple, once you get it!
"Wayne Snyder" wrote:
> We do what Jasper is suggesting.
> We create a data source (maybe called Prod) in the project. The first time
> we deploy, we go into report manager and change the connection information to
> whatever it needs to be. Since redeployment does NOT change the connection (
> unless you change the config), everything works fine.
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Mike Kelly" wrote:
> > Hi. I love the time-saving features of Reporting Services. I desing my report
> > in VS2005. Then deploy them to my QA server and, when that passes testing,
> > put it into my PROD environment. That all works very nicely.
> >
> > I have defined 2 data sources, one for QA and one for PROD. What gets to me
> > is that after deploying to QA I have to go into Report Manager and select the
> > QA data source for each of my reports. Then, once deployed to PROD I have to
> > do the same. This becomes a major headache when I have to make many small
> > changes to a report and repeat the process each time.
> >
> > Is there a way to specify an alias of some form that can point to my
> > development server data source when on my machine, and to the appropriate
> > databases when on QA and PROD?
> >
> > Thanks.
Friday, March 9, 2012
How to deploy a report in Reporting Services without using VS 2005?
but now i have fresh installed Reporting Services and no Visual Studio
2005. How do i open a new folder?Joko ugar wrote:
> When I try to put a new report in existing folder there's no problem,
> but now i have fresh installed Reporting Services and no Visual Studio
> 2005. How do i open a new folder?
Please ignore this question :)
Sunday, February 19, 2012
how to define a parameter in reporting services to choose to show/hide not null/null values?
Hi All,
I am using SQL Server Reporting Services 2005 and in my report I want to create a parameter called "hasEmail" with 3 possible values (Yes, No, Both) to show/ hide the customers who have/don't have emails or both.
Can anyone please help?
Try Add Parameter-Choose Available Values-Non queried- there you can put in the label and values that you want to return (Yes,No,Both) Then you will have to use these parameters to filter your dataset. Hope that helps.|||You said : "Then you will have to use these parameters to filter your dataset."
The problem is the parameter doesn't exactly match the field. For example, it's not like the case that: OK the parameter chosen by user is "Bicycles" so only show me the data (WHERE the param is Bicycle). The problem I have is that some of the customers have provided their emails in the database and some haven't. I want to be able to show (or not show) the customers that have (or have not) email address. Maybe I should use "EXISTS" or something, because like I said it's not a matter of exactly matching the string (bicycle for example) with the field; It's a matter of true/false if the email exists or not.
I don't know.
Any thoughts?
|||
Yes, right click table or list- if thats what you are using - properties- filters- I don't know about your particular case but here is one that I used a parameter to filter in- same concept, but how to apply to your case I'm not sure- you'll have to play with it.
(Expression)=Fields!CONT_FREQ_CODE.Value
(Operand) =
(Value) =iif(Format(Parameters!Report_Parameter_0.value,"MM")=3 or Format(Parameters!Report_Parameter_0.value,"MM")=6 or Format(Parameters!Report_Parameter_0.value,"MM")=9 or Format(Parameters!Report_Parameter_0.value,"MM")=12,Fields!CONT_FREQ_CODE.Value,"M")
|||
Thanks Kimberly,
I found my answer at
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=494455&SiteID=1
Thank you anyway.
how to define a parameter in reporting services to choose to show/hide not null/null values?
I am using SQL Server Reporting Services 2005 and in my report I want to create a parameter called "hasEmail" with 3 possible values (Yes, No, Both) to show/hide the customers who have/don't have emails or both.
Can anyone please help?
Try using a filter with the following entries. This assumes that there is an "Email" field of type string in the data set you are using, and the parameter name with the three values is ShowOnlyWithEmail. We use Len instead of IIF and a check for Nothing, because =IIF(IsNothing(Fields!Email.Value), 0, Fields!Email.Value.Length) will throw an exception if the field value is Nothing (IIF is a function and all arguments are evaluated before the function call), and Len will return 0 if the field value is Nothing.If the parameter is set to "Yes", then the first filter entry will
remove any rows that do not have an email address and the second will
not filter any rows.
If the parameter is set to "No", the the first filter entry will not
filter any rows, and the second will filter all rows with a length less
than 1.
If the parameter is set to "Both", then both filter entries will not filter any rows.
Ian|||It works fine. Thank you. What does LEN stand for? (Like REM is remove).|||Len is a function from VB to determine the length of an string (or size of any object) that does not blow up if a null value is passed in.
how to define a parameter in reporting services to choose to show/hide not null/null values?
I am using SQL Server Reporting Services 2005 and in my report I want to create a parameter called "hasEmail" with 3 possible values (Yes, No, Both) to show/hide the customers who have/don't have emails or both.
Can anyone please help?
Try using a filter with the following entries. This assumes that there is an "Email" field of type string in the data set you are using, and the parameter name with the three values is ShowOnlyWithEmail. We use Len instead of IIF and a check for Nothing, because =IIF(IsNothing(Fields!Email.Value), 0, Fields!Email.Value.Length) will throw an exception if the field value is Nothing (IIF is a function and all arguments are evaluated before the function call), and Len will return 0 if the field value is Nothing.If the parameter is set to "Yes", then the first filter entry will remove any rows that do not have an email address and the second will not filter any rows.
If the parameter is set to "No", the the first filter entry will not filter any rows, and the second will filter all rows with a length less than 1.
If the parameter is set to "Both", then both filter entries will not filter any rows.
Ian|||It works fine. Thank you. What does LEN stand for? (Like REM is remove).|||Len is a function from VB to determine the length of an string (or size of any object) that does not blow up if a null value is passed in.