Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Sunday, March 25, 2012

ActiveX in Reporting Services report

Hi there. I've read on the web that Reporting Services report can support
ActiveX controls in the client area of the report (or at least that's what I
interpreted). I'm able to add an in-house developed ActiveX control to the
toolbox in Visual Studio but the control is grayed out and will not allow me
to drag it to the main area of the report. Has anyone successfully created a
VB6 ActiveX control that works in Reporting Services? If so, what do I need
to do to allow the control to be used in the report? Here's what I'm trying
to do: I've got an ActiveX control that shells out and executes an exe on
the client machine (the exe I am shelling out to start is a DDE bridge
application).Close dev studio and reopen it - if you have installed SP1 with it open,
sometimes it will gray it out.
=-Chris
"DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
news:2FD0E033-0709-49A3-B877-2C50FA1780FC@.microsoft.com...
> Hi there. I've read on the web that Reporting Services report can support
> ActiveX controls in the client area of the report (or at least that's what
> I
> interpreted). I'm able to add an in-house developed ActiveX control to
> the
> toolbox in Visual Studio but the control is grayed out and will not allow
> me
> to drag it to the main area of the report. Has anyone successfully
> created a
> VB6 ActiveX control that works in Reporting Services? If so, what do I
> need
> to do to allow the control to be used in the report? Here's what I'm
> trying
> to do: I've got an ActiveX control that shells out and executes an exe on
> the client machine (the exe I am shelling out to start is a DDE bridge
> application).|||Hi Chris. Thanks for responding. I've tried to close and re-open VS but the
control is still disabled. I'm relatively certain I've installed the latest
service pack for Reporting Services.
The version I have is
Microsoft SQL Server Report Designer
Version 8.00.878.00
I've also tried other ActiveX controls with the same results.
"Christopher Conner" wrote:
> Close dev studio and reopen it - if you have installed SP1 with it open,
> sometimes it will gray it out.
> =-Chris
> "DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
> news:2FD0E033-0709-49A3-B877-2C50FA1780FC@.microsoft.com...
> > Hi there. I've read on the web that Reporting Services report can support
> > ActiveX controls in the client area of the report (or at least that's what
> > I
> > interpreted). I'm able to add an in-house developed ActiveX control to
> > the
> > toolbox in Visual Studio but the control is grayed out and will not allow
> > me
> > to drag it to the main area of the report. Has anyone successfully
> > created a
> > VB6 ActiveX control that works in Reporting Services? If so, what do I
> > need
> > to do to allow the control to be used in the report? Here's what I'm
> > trying
> > to do: I've got an ActiveX control that shells out and executes an exe on
> > the client machine (the exe I am shelling out to start is a DDE bridge
> > application).
>
>|||Sorry, ActiveX controls in reports are not supported.
--
Albert Yen
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
news:5CF40528-C7E7-453F-81BE-C02B8D85493B@.microsoft.com...
> Hi Chris. Thanks for responding. I've tried to close and re-open VS but
the
> control is still disabled. I'm relatively certain I've installed the
latest
> service pack for Reporting Services.
> The version I have is
> Microsoft SQL Server Report Designer
> Version 8.00.878.00
> I've also tried other ActiveX controls with the same results.
> "Christopher Conner" wrote:
> > Close dev studio and reopen it - if you have installed SP1 with it open,
> > sometimes it will gray it out.
> >
> > =-Chris
> >
> > "DSlattery" <DSlattery@.discussions.microsoft.com> wrote in message
> > news:2FD0E033-0709-49A3-B877-2C50FA1780FC@.microsoft.com...
> > > Hi there. I've read on the web that Reporting Services report can
support
> > > ActiveX controls in the client area of the report (or at least that's
what
> > > I
> > > interpreted). I'm able to add an in-house developed ActiveX control
to
> > > the
> > > toolbox in Visual Studio but the control is grayed out and will not
allow
> > > me
> > > to drag it to the main area of the report. Has anyone successfully
> > > created a
> > > VB6 ActiveX control that works in Reporting Services? If so, what do
I
> > > need
> > > to do to allow the control to be used in the report? Here's what I'm
> > > trying
> > > to do: I've got an ActiveX control that shells out and executes an
exe on
> > > the client machine (the exe I am shelling out to start is a DDE bridge
> > > application).
> >
> >
> >sql

Tuesday, March 6, 2012

Acessing SQL Server over the web with shared IP

I am new to setting up SQL Server and would greatly appreciate if
someone can help me out with this issue:

I have successfully set up SQL Server but want to be able for clients
of mine to be able to connect to it via the web through enterprise
manager. I have tried everything I could think of to get it to work. I
made sure the correct ports where open in the firewall (1433,1434).
Everytime I try to connecting using the IP of the box that the SQL
Server resides I get SQL Server does not exist or access denied. I
verified that the login credentials being used for the database I am
trying to correct to are correct. Still the same error message.

How I would like to set it up would be to create a subdomain on the
box and point it to SQL Server so that is what would be entered when
registering the group in enterprise manager.

I am currently running all my sites through vhost on a single IP using
IIS 2003. SQL Server is installed on the box where all of the sites
are being served up.

Is it impossible to set-up SQL Server to allow connections over the
web when using a Shared IP?

I have been researching this for over a week now and hope someone out
there can help me.

Thanks in advance!!Chris (melovepoi@.yahoo.com) writes:
> I am new to setting up SQL Server and would greatly appreciate if
> someone can help me out with this issue:
> I have successfully set up SQL Server but want to be able for clients
> of mine to be able to connect to it via the web through enterprise
> manager. I have tried everything I could think of to get it to work. I
> made sure the correct ports where open in the firewall (1433,1434).
> Everytime I try to connecting using the IP of the box that the SQL
> Server resides I get SQL Server does not exist or access denied. I
> verified that the login credentials being used for the database I am
> trying to correct to are correct. Still the same error message.
> How I would like to set it up would be to create a subdomain on the
> box and point it to SQL Server so that is what would be entered when
> registering the group in enterprise manager.
> I am currently running all my sites through vhost on a single IP using
> IIS 2003. SQL Server is installed on the box where all of the sites
> are being served up.
> Is it impossible to set-up SQL Server to allow connections over the
> web when using a Shared IP?

I'm not really sure what you mean with "connect to it via the web through
enterprise manager". Do you mean that they will connect over the Internet?
If they were to go from EM through a web site to SQL Server sounds a
little funny to me.

As for why things are not working, I don't really have much advice, but
I take the occassion to respond, because you may not want to do that
after all.

Exposing SQL Server directly on the Internet is something you should
avoid. And if you do it - make sure that you have SQL Server authentication
turned off. There is no protection in SQL Server against brute-force
attacks, other than logging, so no matter how strong password you have
for "sa", it is likely to be cracked sooner or later if someone is dead
set on doing it. I don't know if you are able to authenticate your clients
through Windows authentication. If you are, you might be safe. But it
might be a better option to offer them a VPN connection from which they
can access SQL Server that way.

What I can add about the error message "SQL Server does not exist or
access denied" is that playing with login credentials on SQL Server
is of no use. The error means that you never find the server, so it
is not able to authenticate you anyway.

This KB article discusses this message more in detail:
http://support.microsoft.com/defaul...B;EN-US;q328306.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||In article <1f86f93.0408201949.5a756cf3@.posting.google.com>,
melovepoi@.yahoo.com says...
> I am new to setting up SQL Server and would greatly appreciate if
> someone can help me out with this issue:
> I have successfully set up SQL Server but want to be able for clients
> of mine to be able to connect to it via the web through enterprise
> manager. I have tried everything I could think of to get it to work. I
> made sure the correct ports where open in the firewall (1433,1434).
> Everytime I try to connecting using the IP of the box that the SQL
> Server resides I get SQL Server does not exist or access denied. I
> verified that the login credentials being used for the database I am
> trying to correct to are correct. Still the same error message.

First, let me say one important thing - exposing your SQL server
directly to the internet is always a BAD IDEA. There is no reason to
expose it directly to the internet. You should have the users VPN into
your server and access the SQL Server through the VPN.

It was servers like yours that let slammer spread around the world in
record time.

> How I would like to set it up would be to create a subdomain on the
> box and point it to SQL Server so that is what would be entered when
> registering the group in enterprise manager.
> I am currently running all my sites through vhost on a single IP using
> IIS 2003. SQL Server is installed on the box where all of the sites
> are being served up.
> Is it impossible to set-up SQL Server to allow connections over the
> web when using a Shared IP?

Since you have a router with port-forwarding (or a firewall with port
forwarding) you need to tell people to use your PUBLIC ip address when
they are outside of your network - external people access the SQL Server
using the Public IP that you forwarded to the internal IP.

One other thing - don't give users access to the SA account and don't
give them access to any other database (just their own). We did some
work for a company that let users access the DB over the net, the
company had created super user accounts for people to manage their
database remotely - as it turns out, the accounts had access to every
database in their system - some 30 databases on the server. It was
interesting to run an audit, find personal financial info on the other
databases, and then contact the ISP and the Owners of the databases to
let them know that anyone with access to any database could see all of
them as SA. The entire thing was taken off-line for a week while they
figured out how to manage it (should have taken about an hour).

I strongly suggest, even BEG, that you have users VPN into the
network/server and then gain access to the SQL server - do not expose it
directly to the internet.

--
--
spamfree999@.rrohio.com
(Remove 999 to reply to me)|||Hi Chris

It is possible to allow access via the web. You need to use Enterprise
Manager from 2000 upwards and to check that TCP/IP is the connection
protocol. I would suggest not using the standard port but moving it
much higher up the range to a more 'random' port (purely to reduce
risk of hacking).

I'm not exactly sure what you mean by creating a sub-domain on the
box. My interpretation is that you want to create something like
subdomain.mydomain.com and use that to connect to the database. This
you can do, but not on the box. You will need to talk to your ISP and
get them to create the subdomain and point it to the IP address of
your server. Then I think you will be able to register the server by
entering subdomain.mydomain.com in EM.

Hope this helps

Sam

Friday, February 24, 2012

Accessing web.config from stored procedure

I want to access a key from appSettings section of web.config.

I have the number of days allowed for a user to activate his/her account as a key in appSettings.

I have a maintenance procedure to delete all accounts that are not activated before that many days.

In this context, i have to access web.config from stored procedure. The procedure will be scheduled as a JOB in sql server.

Thanks.

Hi,

Are you having problem to access the appSettings secion in the web.config file? If so, you can use ConfigurationManager.AppSettings property to achieve that.

Here is a link for your reference.

http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings.aspx

If your stored procedure, that is running as a job, is trying to access the value, you might need to save the value to a database table or somewhere. Then your stored procedure can get that. It cannot get the web.config value directly.

|||

Thanks Kevin.

My requirement is to access appSettings from a stored procedure of SQL Server. So that whenever I change web.config, the procedure must

automatically access the new value.

Is there any way to access any XML file from a stored procedure. May be that could solve my problem. I heard about XML support in SQL Server. What does that do?

Thanks again.

Srikanth.

|||

Hi Srikanth,

Teh SQL Server 2005 support for Xml is for Xml column type and Xml manipulation. It stays in the database level, but not for reading an external file.

A traditional stored procedure does not read from a file. In this case, I think you have 2 options.

1. Make your app write that appSetting to a certain place in the database timely. The stored procedure can get that as a parameter.

2. Write a CLR stored procedure. Since SQL Server 2005 supports running .NET code, you can write a method and put it in assembly. Each time, you can have the assembly read from certain file, parse the xml and get the setting value.

There are many articles talking about how to create a CLR stored procedure. Here are some of them.

http://msdn2.microsoft.com/en-us/library/ms131094.aspx
http://msdn2.microsoft.com/en-us/library/5czye81z(VS.80).aspx

Sunday, February 19, 2012

accessing sql7 database using ADO and ASP web page.

Hello all!

I am kinda new to using sql 7.0 and am trying to set up a web page that will access a sql7 database. I have a database with several tables in it created on my machine. My asp page uses a connection string that looks like:

"strConnect = "Provider=SQLOLEDB; PersistantSecurity Info= False; User ID = sa; password = 1234; Initial Catalog=equip;Initial file Name =c:\mssql7\data\tracking_data.mdf""

When I try to load this page my web browser displays the "page cannot be displayed error" and shows an error type of

"Microsoft OLE DB Provider for SQL Server (0x80004005)
Device activation error. The physical file name 'c:\mssql7\data\tracking_data.mdf' may be incorrect.
/tracking/rptsvrc.asp, line 22"

Line 22 of the page rptsvrc.asp contains the code:
"objCommand.ActiveConnection = strConnect"
I am at a lose as to why this doesn't work. The file name and path are correct and they do exist.

ANy suggestions here?

Thanks CVC505Your connection string should be something like this:

"provider=SQLOLEDB;server=SQLServerName;uid=userid; password=password;database=DatabaseName;Trusted_Co nnection=No"

DatabaseName points to the logical db name not the filename.

Hope this helps...|||Thanks for the suggestion but it still does not work. I have changed my programs to that list 23 reads:

objConn.Open "Provider=SQLOLEDB; Server=rick2; User ID = sa; Database = equip; Trusted_connection = no"

Where rick2 is the server name ( I changed servers for the weekend)
equip is the database name as it appears in the EM list.

and line 24 is now:
objRS.Open "user1", objConn, adOpenForwardOnly, adLockReadOnly, adCmdTable

where user1 is the table name in the equip database.

When I try to make the connection now I get an error that says:

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E37)
Invalid object name 'user1'.
/tracking/rptsvrc.asp, line 24

This has me stumped because it will work about once then quit.
One other thing I have noticed; when I created this database in the EM, I had named it Tracking ( In the data subdirectory the file is named tracking_data.mdf). The first time I ran the program the name in the EM changed to equip. ( still is named Tracking_data.mdf in the dat subdirectory). I am so new to this I don't have a clue what to look for.
cvc505|||Your connection seems to be working now but it is not finding the table user1.

Try changing you recordset open to a simple query:

'SELECT * FROM syscolumns'

See if that returns anything.

You can also try prefixing user1 with its owner. I.E. dbo.user1

Thursday, February 16, 2012

Accessing SQL Svr 2000 on NT4 box

We have recently upgraded our web server to Windows 2000 and loaded the .net platform. I have starte creating ASP.net programs, but our database server that houses the Sequel Server 2000 database is running on NT4. We are waiting for the money to be approved for a new database server with Windows 2000. Is it OK to be accessing sequel server on a NT4 machine from an ASP.net program? I have the connection to the server set up in the web.config file.

This database server hung up for no apparent reason this weekend and had to be rebooted. Only I have access to the new ASP.net pages and was testing them for the first time this last friday.

Thanks for your help!
JimHi Jim,

Sure, it's fine. I run ASP.NET apps that access NT boxes with no problem. I'd love to upgrade them, but such things are not always under my control, alas.

Don

Accessing SQL Server on another machine

Hello all.

I am currently running a web server with Windows 2000 Server installed. It is a Pentium II 400 MHz, and also acts as the router on our network. I am worried that installing MSDE on this same server might drain the server resources, so I installed MSDE on one of the computers in our internal network. How do I set up my connection string to access the database on another machine in the same network?

Currently I use: Server="AnotherComputer";TrustedConnection="True";Database="MyDatabase"

When I use that, it tells me that the server can't be found. All computers behind the router have static IP addresses, but even when I type the IP address it still can't find the server. Any suggestions?First thing: It would be better to use the SQL Servers IP address than the name.

Second: Trusted Connectivty will be a problem unless you do some sort of impersonation. ASP.NET runs under the guise of a process which requires an account for credentialing. Normally this is the ASPNET user in Windows 2000 and NETWORK SERVICE in 2003. For trusted connection to work this user must have db access.

Third: Can you even see/ping the SQL Server from the web server? Is TCP/IP enabled or just named pipes?

Monday, February 13, 2012

Accessing reportviewer from web

Hi,
apologies for what I know is a very basic question. We have a very simple ASP.NET page that includes a report viewer object. The site containing the page is on a public server, and the report server is on an internal server (actually the same physical machine, but running on a different IP) - we are referencing the report server via a 10.x.x.x address and it's not connecting from outside. The report server is not accessible from the public address, and I don't believe there's firewall issues - can someone please point me in the right direction?

thanks,
Steve.

<snip>
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Security;

namespace WebReportTest2
{
/// <summary>
/// Summary description for WebForm2.
/// </summary>
public class WebForm2 : System.Web.UI.Page
{
protected System.Web.UI.HtmlControls.HtmlForm Form1;
protected System.Web.UI.WebControls.DropDownList DropDownList1;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.DropDownList Dropdownlist2;
protected System.Web.UI.HtmlControls.HtmlForm Form2;
protected System.Web.UI.WebControls.DropDownList Dropdownlist3;
protected System.Web.UI.WebControls.Button btnLogOut;
protected Microsoft.Samples.ReportingServices.ReportViewer ReportViewer1;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
//this.DropDownList1.Items.Add(new ListItem("report1,"report1"));

string param = DropDownList1.SelectedValue;
ReportViewer1.ReportPath = "/Development/report1" + param ;
ReportViewer1.ServerUrl = "http://10.72.x.x/reportserver";

}
If you log onto the console of the web server are you able to access the report server using the 10.x.x.x address? My guess would be that it is an IP/subnet issue, but I'm not really an expert in that area.|||Yep, it's actually the same server but sites running on different addresses. It looks to me like the reportviewer object is being created on the client side, and therefore can't resolve the internal 10.x.x.x address. It's not my code, and I'm no ASP.NET guru, but the object seems to be created in the ASPX page correctly, with "runat=server", but is then also created in a C# code behind page, and it's this object that's actually being created, and it's client, not server side...if all that makes sense...

cheers,
STeve.
|||

I have not done that much with the report viewer in ASP.NET, most of my experience with this control has been with the Windows Forms edition. But my understanding with the ASP.NET version was that most of the rendering takes place on the server side.

One thing thing you could checked is the permissions. If you are running the ASP.NET app from a public server I assume that you are running the standard impersonation mode which would mean that the account accessing the report server would either be the ASPNET account if you are running IIS 5 or the account that is configured for the app pool if you are running IIS 6. The account in question would need to have permission to access the report server and run the report(s) in question.

Accessing Reports through a web application?

Hi All,

I have developed few reports in SQL Server 2005 Reporting Services and deployed them on a reporting server.

These reports are accessed through a web application that is deployed on a different server. I am using the Report Viewer control in my web application.

The problem is when I access the reports through my web application, it gives me a Page not found error.

If I have both web server and reporting server on the same machine, then this problem does not come.

I need to have separate web and reporting server. Can anyone please provide help on how to solve this authentication issue. My web application is taking the credentials but the credentials are not getting passed if the reports are deployed on a different server.

Any help will be greatly appreciated!!!

Has anyone tried this before?

Regards!!!

Accessing reports from a ASP.NET 2.0 web site

Though I would beleive it to not be an issue I thought I would bounce this
off the group.
We are looking at deploying a web site that will be created under 2.0
Framework. Resources such as SQL Server Reporting Services and SMS are still
under the 1.1 Framework. I would think that this wouldn't be an issue since
the connections established between these resrouces will be outside the
bounds of the different frameworks.
Is there a problem that I'm no seeing with this deployment picture?
Ken...Let me make sure this is clear.
The relationship that I am facing would have a 2.0 Framework web server
sitting on one web server, 1.1 framework on the SMS and SQL Server Reporting
Services server.
"Ken Carter" wrote:
> Though I would beleive it to not be an issue I thought I would bounce this
> off the group.
> We are looking at deploying a web site that will be created under 2.0
> Framework. Resources such as SQL Server Reporting Services and SMS are still
> under the 1.1 Framework. I would think that this wouldn't be an issue since
> the connections established between these resrouces will be outside the
> bounds of the different frameworks.
> Is there a problem that I'm no seeing with this deployment picture?
> Ken...|||On Mon, 5 Dec 2005 12:37:02 -0800, "Ken Carter"
<KenCarter@.discussions.microsoft.com> wrote:
>Though I would beleive it to not be an issue I thought I would bounce this
>off the group.
>We are looking at deploying a web site that will be created under 2.0
>Framework. Resources such as SQL Server Reporting Services and SMS are still
>under the 1.1 Framework. I would think that this wouldn't be an issue since
>the connections established between these resrouces will be outside the
>bounds of the different frameworks.
>Is there a problem that I'm no seeing with this deployment picture?
I'm sure its workable. RS exposes a web service and ASP.NET2 certainly
has ways of consuming a web service although I'm not sure if the
ASP.NET viewer control can talk to the old RS.
If its a public web site then you better hope that your visitors are
using Internet Explorer. RS is almost useless in FireFox. I don't know
about other non IE browsers. At least that's my experience, even with
2005. I'm curious to hear if anyone is having better luck than me.|||This is inside our network and yes, all IE browsers. I didn't think it would
be a problem but who ever knows what's going to bite ya.
Thanks for the response.
"Ross" wrote:
> On Mon, 5 Dec 2005 12:37:02 -0800, "Ken Carter"
> <KenCarter@.discussions.microsoft.com> wrote:
> >Though I would beleive it to not be an issue I thought I would bounce this
> >off the group.
> >
> >We are looking at deploying a web site that will be created under 2.0
> >Framework. Resources such as SQL Server Reporting Services and SMS are still
> >under the 1.1 Framework. I would think that this wouldn't be an issue since
> >the connections established between these resrouces will be outside the
> >bounds of the different frameworks.
> >
> >Is there a problem that I'm no seeing with this deployment picture?
> I'm sure its workable. RS exposes a web service and ASP.NET2 certainly
> has ways of consuming a web service although I'm not sure if the
> ASP.NET viewer control can talk to the old RS.
> If its a public web site then you better hope that your visitors are
> using Internet Explorer. RS is almost useless in FireFox. I don't know
> about other non IE browsers. At least that's my experience, even with
> 2005. I'm curious to hear if anyone is having better luck than me.
>
>

Sunday, February 12, 2012

accessing report server programmatically

Hi friends
I have .net app ,where i display reports from my report server in a screen .,which works fine.
I added a web reference to my report server ,to my solution to get it work.

since i know my report server name on machine i added webreference to my project. but when i deploy at site ,as you can guess, the server name can be different.

is it possible add web reference programmaically so that i dont need to hard code report server name ?

am using sql server standard 2005,VS2005 standard edition.
Thank you very much for your help

in the place where you instantiate the webservice client:

MyReportServer rs = new MyReportServer();
rs.Url = "http://myservername/reportserver/blabla.asmx";

|||

Alexandre

Thanks for the post.

do you happen to know any sample code i can refer to.

Thanks for your help again.

|||Alexandre
i cant find "MyReportServer" namespace!
what library i need to give reference to?
Thanks for your help
|||try web.config file... i think u got it... define it in web.config file and change it whenever the server name changes|||

When you add a web reference VS will add a C# file to your project with web service endpoint definition. Then in some place in your program you make a call to the web service. the web service will be represented by an object. I refered to the type of the object MyReportServer, mostlikely it will be called differently in your app. This object has Url property that you may assign any new report server URL you want. Just find the place where the object is created.

By default, "MyReportServer" class pulls webservice URL from your config file. You can reset it by assigning new url via Url property

|||

You can use the following in your web.config:

<appSettings>
<add key="ServerURL" value=http://someServer/path/method.aspx />

</appSettings>

And in your code:


reportService.Url = ConfigurationSettings.AppSettings["ServerURL"];

|||Alexandre
if i understood you correctly, i just need to add a web reference to one of in-house report servers ,to our solution but when using it at client sites i need update "URL" property of the web service object by reading either from a config file or from a database field.
is this correct ?
Thanks for your help|||Hi Jay
its a windows app and i dont have a web.config.|||

>> if i understood you correctly

yes.

|||Thanks Alexandre
i already tried and it works nicely.
Thank you very much for your help :)

Accessing Report Parameters Class through Web Service

I am using ASP .NET along to render my reports. I've extended the web
service class such that I specify the report folder, and I get all
reports and their respective parameters. I then dyncamically create
the controls (such as datepicker, textbox, etc...) based on the
Parameter Name, and Type. The drop down list is the one giving me the
hardest time though.
My problem is this: I have a Report with 3 parameters. The first 2
are dates. I can retrive all info on them just fine. The name,
prompt, and type (datetime). The third parameter (AppUserKey) however
is a dropdown list of all the users. I wrote a stored procedure that
does this called spGetAppUsers. Here is the structure of this
parameter as per the RDL file:
</ReportParameters>
...
...
<ReportParameter Name="AppUserKey">
<DataType>Integer</DataType>
<DefaultValue>
<DataSetReference>
<DataSetName>spGetAppUsers</DataSetName>
<ValueField>AppUserKey</ValueField>
</DataSetReference>
</DefaultValue>
<Prompt>AppUserKey</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>spGetAppUsers</DataSetName>
<ValueField>AppUserKey</ValueField>
<LabelField>AppUserName</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
</ReportParameters>
I can get the Name, and even from the ValidValues, the ValueField and
LabelField, however, I want the <DataSetName> entry.
This is so that after I dynamically create the drop down list, I'm
able to populate it via the stored procedure. Recall that the
ReportParameter class is defined here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_ir_5zec.asp
ReportParameter::QueryParameter is a boolean property. Doesn't
actually return the name. Just whether or not you are using a query.
ReportParameter::DefaultValues is a string but is empty, since the
report hasn't executed the stored procedure (makes sense).
I want this to be a generic solution. Hence all this trouble to get
all the "givens" from the Report, and to reconstruct it in ASP .NET.
I need that DataSetName!!! :-S
Any help is appreciated.
Thanks for your time,
RoyThere are 2 ways to do what I want:
1. Instead of trying to get the stored procedure of my query based
parameter, I should've set forRendering = True in my
GetReportParameters function. That will actually return the query
based parameter set. Then I can populate the drop down list with that.
2. Load the .RDL (report definition in XML) in memory and use XPATH to
get the name of the parameter:
Dim reportDefinition As Byte() = Nothing
Dim doc As New System.Xml.XmlDocument
Try
reportDefinition = rs.GetReportDefinition(ReportsFolder &
strReportName)
Dim stream As New MemoryStream(reportDefinition)
doc.Load(stream)
In this scenario, assuming you have forRedering=True or False, you
still need to know the name of the parameter. So you'ld probably get
then name of the parameter and then check the value of QueryParameter
to see if it's true.
Then base your XPATH query on the following XML:
"/ReportParameter/ValidValues/DataSetReference/DataSetName[@.text]"
Or something similar. I forget. The above is proabably wrong and
could be written in a million different ways.
<ReportParameter Name="AppUserKey">
<DataType>Integer</DataType>
<DefaultValue>
<DataSetReference>
<DataSetName>spGetAppUsers</DataSetName>
<ValueField>AppUserKey</ValueField>
</DataSetReference>
</DefaultValue>
<Prompt>AppUserKey</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>spGetAppUsers</DataSetName>
<ValueField>AppUserKey</ValueField>
<LabelField>AppUserName</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
</ReportParameters>
Roy Assaly wrote:
> I am using ASP .NET along to render my reports. I've extended the
web
> service class such that I specify the report folder, and I get all
> reports and their respective parameters. I then dyncamically create
> the controls (such as datepicker, textbox, etc...) based on the
> Parameter Name, and Type. The drop down list is the one giving me
the
> hardest time though.
> My problem is this: I have a Report with 3 parameters. The first 2
> are dates. I can retrive all info on them just fine. The name,
> prompt, and type (datetime). The third parameter (AppUserKey)
however
> is a dropdown list of all the users. I wrote a stored procedure that
> does this called spGetAppUsers. Here is the structure of this
> parameter as per the RDL file:
> </ReportParameters>
> ...
> ...
> <ReportParameter Name="AppUserKey">
> <DataType>Integer</DataType>
> <DefaultValue>
> <DataSetReference>
> <DataSetName>spGetAppUsers</DataSetName>
> <ValueField>AppUserKey</ValueField>
> </DataSetReference>
> </DefaultValue>
> <Prompt>AppUserKey</Prompt>
> <ValidValues>
> <DataSetReference>
> <DataSetName>spGetAppUsers</DataSetName>
> <ValueField>AppUserKey</ValueField>
> <LabelField>AppUserName</LabelField>
> </DataSetReference>
> </ValidValues>
> </ReportParameter>
> </ReportParameters>
> I can get the Name, and even from the ValidValues, the ValueField and
> LabelField, however, I want the <DataSetName> entry.
> This is so that after I dynamically create the drop down list, I'm
> able to populate it via the stored procedure. Recall that the
> ReportParameter class is defined here:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_ir_5zec.asp
> ReportParameter::QueryParameter is a boolean property. Doesn't
> actually return the name. Just whether or not you are using a query.
> ReportParameter::DefaultValues is a string but is empty, since the
> report hasn't executed the stored procedure (makes sense).
> I want this to be a generic solution. Hence all this trouble to get
> all the "givens" from the Report, and to reconstruct it in ASP .NET.
> I need that DataSetName!!! :-S
> Any help is appreciated.
> Thanks for your time,
> Roy

Accessing Remote SQL Server Management Console from the web browser?

How does one access a remote SQL Server from the web browser?

Thanks,

-Conrad

There is no builtin functionality for that. But Microsoft offers a Web Administrator (don′t knwo if that one is also capable for SQL Server 2005)

http://www.microsoft.com/downloads/details.aspx?FamilyID=c039a798-c57a-419e-acbc-2a332cb7f959&DisplayLang=en

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Accessing QueryString from within a report.

I have a situation where MSRS is being used as a part of a number of web
based applications.
One of the requirements of these applications is that a SessionID can be
logged with every call made to an application component. The purpose of
this is to allow end-to-end auditing of all the user actions that have been
taken during the course of a session
The strategy that we were going to take with MSRS was to include a dummy
parameter SessionID in every report and then extract that parameter from the
MSRS logs. This strategy comes unstuck when snapshots are used. Parameters
in request for the rendering of a report based on a snapshot are discarded,
and the original parameters are placed in the execution log.
I was wondering if anyone else had come across a way to access the
querystring or user entered report parameters on a snapshot based report.
regards,
Adrian.Hello Adrian,
Based on my scope, it seems this behavior is as designed and we are not
able to access the query string when execution the report.
The workaround is to use a Web appliatoin and a proxy to reporting services
so that you will get more customized features. Also, it will bring more
coding work. The following link is just for your reference:
http://www.codeproject.com/useritems/SQLRSViewer.asp
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
| Reply-To: "Adrian Russell" <adrianru@.avanade.com>
| From: "Adrian Russell" <adrianru@.avanade.com>
| Subject: Accessing QueryString from within a report.
| Date: Wed, 20 Apr 2005 09:25:19 +1000
| Lines: 22
| Organization: Avanade
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <OtdNRcTRFHA.3496@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: 220-245-208-182-act.tpgi.com.au 220.245.208.182
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.reportingsvcs:48136
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I have a situation where MSRS is being used as a part of a number of web
| based applications.
|
| One of the requirements of these applications is that a SessionID can be
| logged with every call made to an application component. The purpose of
| this is to allow end-to-end auditing of all the user actions that have
been
| taken during the course of a session
|
| The strategy that we were going to take with MSRS was to include a dummy
| parameter SessionID in every report and then extract that parameter from
the
| MSRS logs. This strategy comes unstuck when snapshots are used.
Parameters
| in request for the rendering of a report based on a snapshot are
discarded,
| and the original parameters are placed in the execution log.
|
| I was wondering if anyone else had come across a way to access the
| querystring or user entered report parameters on a snapshot based report.
|
| regards,
|
| Adrian.
|
|
|

Thursday, February 9, 2012

Accessing MS SQL DB on own server?

Hi

If my site is hosted with an external company web host can I use ASP.NET pages to connect to a MS SQL DB that is on my company's internal server if I had MS SQL installed on it?

My company's server is always on and always connected to the internet.

I have access to my company's server if I need to set anything up on it for this to happen.

There will not be any kind of overload as the site is not accessed constantly.

Also, would this cause any kind of security leak? If so how would I go about plugging this hole?

Our server does have confidential info on it.

Cheers

kefi2927Since you haven't received a reply I'll post my thoughts. As someone who knows little about networking and security I personally would not do this, although it would be possible. Exposing a server to the internet is not something to be taken lightly, and will require diligence in keeping up with patches and security issues.

My 2 cents,
Terri