Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Wednesday, March 28, 2012

How To Determine Total Page Count For Report From VS.NET

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?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

Wednesday, March 21, 2012

How to detect sql servers on the net

Hi
Is there a way to detect any instances of sql server on the network.
Like all the Microsoft configuration tools do...
If there exists one, is it also possible to use it within the .net
environment?
Regards
StephanStephan Zaubzer wrote:

> Hi
> Is there a way to detect any instances of sql server on the network.
> Like all the Microsoft configuration tools do...
> If there exists one, is it also possible to use it within the .net
> environment?
> Regards
> Stephan
Use OSQL -L|||I was rather looking for a way to use it within an application
In my application I need a config window where I specify to which server
to connect to...
And I wanna show all available servers in the config window...
amish wrote:
> Stephan Zaubzer wrote:
>
>
> Use OSQL -L
>|||Stephan Zaubzer <stephan.zaubzer@.schendl.at> wrote in
news:438F2929.5030501@.schendl.at:

> I was rather looking for a way to use it within an application
> In my application I need a config window where I specify to which
> server to connect to...
> And I wanna show all available servers in the config window...
>
You can do this in two ways;
1. You can ask for a DataSourceEnumerator from your provider (the method
name may not be exactly that, but you can find it). 2. Use SMO to
enumerate the servers on the network.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||... and to my knowledge, this is still not reliable since broadcasting is u
sed. So a server might be
in another domain, might not respond in time etc and hence will not show up.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Niels Berglund" <nielsb@.develop.com> wrote in message
news:Xns971FB26F1D379nielsbdevelopcom@.20
7.46.248.16...
> Stephan Zaubzer <stephan.zaubzer@.schendl.at> wrote in
> news:438F2929.5030501@.schendl.at:
>
> You can do this in two ways;
> 1. You can ask for a DataSourceEnumerator from your provider (the method
> name may not be exactly that, but you can find it). 2. Use SMO to
> enumerate the servers on the network.
> Niels
>
> --
> ****************************************
**********
> * Niels Berglund
> * http://staff.develop.com/nielsb
> * nielsb@.no-spam.develop.com
> * "A First Look at SQL Server 2005 for Developers"
> * http://www.awprofessional.com/title/0321180593
> ****************************************
**********|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in news:uCt#Ilx9FHA.2816@.tk2msftngp13.phx.gbl:

> ... and to my knowledge, this is still not reliable since broadcasting
> is used. So a server might be in another domain, might not respond in
> time etc and hence will not show up.
>
absolutely!!!! The methods I mentioned earlier are very brittle, and you
can not rely 100% on them. Also, as they use broadcast the methods are
sloooow.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||DataSourcEnumerator exists only in .net 2.0
Since I am working in VS.net 2003 and .net 1.1 I can't use it.
What exactly is SMO and how would I use it?
regards
Stephan
Niels Berglund wrote:
> Stephan Zaubzer <stephan.zaubzer@.schendl.at> wrote in
> news:438F2929.5030501@.schendl.at:
>
>
> You can do this in two ways;
> 1. You can ask for a DataSourceEnumerator from your provider (the method
> name may not be exactly that, but you can find it). 2. Use SMO to
> enumerate the servers on the network.
> Niels
>|||Stephan Zaubzer <stephan.zaubzer@.schendl.at> wrote in
news:uDd8Y019FHA.252@.TK2MSFTNGP15.phx.gbl:
> DataSourcEnumerator exists only in .net 2.0
> Since I am working in VS.net 2003 and .net 1.1 I can't use it.
> What exactly is SMO and how would I use it?
> regards
> Stephan
> Niels Berglund wrote:
[snip]
Sorry Stephan abour DataSourceEnum. I'm afraid that SMO is in that case
not any better either. It is the new management object hierarchy in SQL
2005.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********

How to detect NULL in SQL-table with VB.net ?

Hi,
I want to check with VB.net whether a field in a SQL-table is NULL or not.
This code doesnot work:
If xxx = NULL then
<statements>
End If
I got the error, that NULL is not supported ?
How do I code the check ?
Help is appreciated, Gr.

Hi,

it would beDBNull.Value oryou can also useIsDBNull function (returns boolean based on if the given object has DBNull value)

|||Joteke, thanks a lot for you help,
regards from the North Sea, Ger.

How to detect if SQL Reporting Services is installed ?

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,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 Deploye VB.net Application Along With Database....Please Help.

Hi Guys,
I had a little Problem With My Application Deployment.

I want To Make Setup For My Application(VB.NET) Such that When it begins To Install,The Database Of the Application Will Automaticallly Get Installed.....
Even I have Generated Script For That But I dont Know How to Execute It With Installation File.I have made Complete Setup Of My Application Exept Database.

Now,I want Few Code Lines To Execute My Database Script.
So how can i Execute My Script Through Installation..

And Also If there is another Way To Accomplish This Please Suggest Me.

All Suggestions Will be Accepted...

Thanx In Advance..WOuld C# code also be ok for you ? :-)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||yes it will be ok for me..

How to deploy SQL Server Everywhere with my windows form application?

Hello!

I've been creating a vb.net 2005 windows form application using Everywhere and it has been going pretty well. However, I haven't had much luck finding any help on how to deploy my Everywhere database file(s) and Everywhere itself. To install redistribute Everywhere, can I just add the the 8 .dlls found in the Everywhere directory into my VS setup project? Also, what database file(s) do I need to deploy in my windows setup?

Thanks!

http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx

Darren

|||

Thanks for the link Darren. This looks like it's using ClickOnce but I was hoping to deploy Everything using the Windows installer. Any thoughts on how that might happen?

Thanks!

|||

it's the same process of putting the right DLLs that belong to SQL Ev into your program's app directory.

-ds

How to Deploy SQL server Database to another PC while creating SetUP package in .Net VB

How to Deploy SQL server Database to another PC, How to create a
package that craetes Database as well as ODBC driver for accessing data
at enduser PC, using .Net VBhi,
<hitendra15@.gmail.com> ha scritto nel messaggio
news:1102241845.011857.112670@.c13g2000cwb.googlegr oups.com
> How to Deploy SQL server Database to another PC, How to create a
> package that craetes Database as well as ODBC driver for accessing
> data at enduser PC, using .Net VB

John already answered you about drivers...
as regard database installation, personally I do not like backup/restore
practice, nor detach/attach...
and Ialways go for executing the DDL scripts to recreate the dbs and related
objects as long as performing BCP in and/or INSERT INTO scripts in order to
populate pre-loaded tables...
the best "universal" approach I've seen so far explained in a public article
is
http://msdn.microsoft.com/sql/archi...er/default.aspx
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--- remove DMO to reply|||To add on to Andrea's response, we keep all of our DDL scripts under source
control and run these scripts during installation with a .Net custom action.

Depending on your requirements, you can include the scripts in a .Net
project as either content files or as embedded resources. You can then
include that project in your Setup and Deployment project. Your custom
action can read and execute the scripts from either the resource assembly or
from the file system.

--
Hope this helps.

Dan Guzman
SQL Server MVP

<hitendra15@.gmail.com> wrote in message
news:1102241845.011857.112670@.c13g2000cwb.googlegr oups.com...
> How to Deploy SQL server Database to another PC, How to create a
> package that craetes Database as well as ODBC driver for accessing data
> at enduser PC, using .Net VB

How to Deploy Reports to a Production Environment

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.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 reports on report server other then using rerport mg

hey, Is there any way to making a setup of report project, to deploy reports
on server.
I have used both vs.net and report manager, but in both ways i have to has
access to report server.
I want to deply reports on the server on which i am not having access.
How to make a setup.
thanksSee if Reporting Services Scripter helps.
http://www.sqldbatips.com/showarticle.asp?ID=62
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"vibha" <vibha@.discussions.microsoft.com> wrote in message
news:89560410-2E89-469D-85DF-695657E57E8F@.microsoft.com...
> hey, Is there any way to making a setup of report project, to deploy
> reports
> on server.
> I have used both vs.net and report manager, but in both ways i have to has
> access to report server.
> I want to deply reports on the server on which i am not having access.
> How to make a setup.
> thanks|||Even with the scripter you will have to have some sort of Access. VS.net is
using web services to deploy. As long as your account has the rights in RS
to deploy you will be able to do this. Your account does not have to be
admin on the server (if it is then it automatically has deploy rights).
I suggest you look at how RS implement roles.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"vibha" <vibha@.discussions.microsoft.com> wrote in message
news:89560410-2E89-469D-85DF-695657E57E8F@.microsoft.com...
> hey, Is there any way to making a setup of report project, to deploy
> reports
> on server.
> I have used both vs.net and report manager, but in both ways i have to has
> access to report server.
> I want to deply reports on the server on which i am not having access.
> How to make a setup.
> thanks

How to deploy reports from my pc to my client's server?

Hi Guys,

I am using MS Visual Studio .Net 2003 to design reports from the data in MS SQL Server.

I have no problem to deploy, view or run the reports in my pc with MS SQL Reporting Services installed.

Now, my client's server with MS SQL Reporting Services only installed, but no MS Visual Studio installed.

How to deploy all my reports in my pc into my client's server so that user can view the reports in the server thru IE?

Thanks.

Yes, you can upload the .RDL file into Server.

You need to open http://<servername>/Reports page and press Upload File Button on the command bar. Then you can browse for your .RDL files (files that are copied from your home computer) and after you upload these reports to your server you may consider to change the Data Source.

For changing the Data Source you must open the report and go to the Properties Tab, than select Data Sources. You can choose from Shared Data source or Custom Data source, after you make your selection you need to press Apply button (on the bottom of the page).

Good luck.

|||

Thanks for your reply.

Just manage to get the server up.

But when I open http://<servername>/Reports I can't see any Upload File Button. I got only "Home | My Subscriptions | Help" on right top corner.


|||

Hi,

#1. go to Control Panel->Administrative Tools -> IIS , open Internet Information Services.

#2. Double click your server name-> goto web sites-> Default WebSite

#3. right click on report server goto directory security tab click edit button and deselect the anonymous acces check box.

do the step 3 for "Reports" also,.

and go to http://<servername>/Reports ull be able to see the upload button now.

Hope this solves your problem.

|||Yupe.. I see it now.. Thanks to both PFerns and Pavel Cristian Gabriel!

How to deploy report in C# with ADO XML datasources

HI,

i m creating CR in C# and ADO.net XML file as data source. my application is calling CR in exe file for viewing report. although i hav work out the setup and deployment project, yet its still need to install Crystalreport in MS.Visual studio 2003.

any others way to solve this problem?

plz don hesitate to reply me k.

emiliecan you please clarify the question? You don't know what you need to package to get crystal working on the deployment machine?

Sunday, February 19, 2012

How to delete (drop) a database with OSQL

Hi,
I imported DBF files into a new SQL server database and I've been
developing a VB.Net application.
Now I would like to delete the current database and re-import a more
current set of DBF files into SQL.
Only problem, I can't seem to find a way to delete the database from
MSDE. I tried the OSQL 'drop database <name>' but it complains the
'database is in currently in use'.
I must be missing something simple.
Thanks
Richard
Hi ,
You might be in the same database while you are trying to execute the
command.
connect to the server and change the context to the master database and
also make sure that you dint have any sessions currently accessing the
database either remotely or from the same machine. This time the command
should go ahead fine
girish sundaram
This posting is provided "AS IS" with no warranties, and confers no rights.
|||It is possible that there are still connections to the database. If you are
on MSDE 2000 the following is a sure way to drop a database:
-- Kick everyone out of the database
ALTER DATABASE <database name> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
-- Go somewhere else yourself as well
USE master
-- Now drop it
DROP DATABASE <database name>
Jacco Schalkwijk
SQL Server MVP
"Richard Fagen" <no_spam@.my_isp.com> wrote in message
news:eBGaP5K3EHA.2676@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I imported DBF files into a new SQL server database and I've been
> developing a VB.Net application.
> Now I would like to delete the current database and re-import a more
> current set of DBF files into SQL.
> Only problem, I can't seem to find a way to delete the database from MSDE.
> I tried the OSQL 'drop database <name>' but it complains the 'database is
> in currently in use'.
> I must be missing something simple.
> Thanks
> Richard
|||Thanks guys, you were right, there was a connection to the database.
At first I tried a 'use master' in qsql but got the same results. Then
it dawned on me that Visual Studio itself had a connection to the
database. Once I closed it, I could delete the database.
To be sure I understood it, I restored the database, checked in VS.Net
to see it, then I deleted it in osql while VS.Net was open (but no
connection), this also worked.
Thanks for you help!
Richard
Jacco Schalkwijk wrote:
> It is possible that there are still connections to the database. If you are
> on MSDE 2000 the following is a sure way to drop a database:
> -- Kick everyone out of the database
> ALTER DATABASE <database name> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
> -- Go somewhere else yourself as well
> USE master
> -- Now drop it
> DROP DATABASE <database name>
>