Thursday, March 29, 2012
Can we handle all errors within a stored proceudre.
We are calling stored procedures (sp) from our web app (asp.net). Since
using Try...Catch... in asp.net with C# or VB.net is very expensive, we are
considering to handle all database error in sp so that web app won't see any
DB error.
Do we have a way to catch all erros in sp and return back to callers
gracefully, as if nothing wrong in DB?
We tried to check IF @.@.ERROR > 0, but web app still get erros, such as
Unique contraint violation, etc.
Any ideas, reference papers, sample source code?
Thanks a lotexamnotes <Andrew@.discussions.microsoft.com> wrote in
news:0F041009-08FF-4FF1-8AC7-D74968D16C05@.microsoft.com:
> We are calling stored procedures (sp) from our web app (asp.net).
> Since using Try...Catch... in asp.net with C# or VB.net is very
> expensive, we are considering to handle all database error in sp so
> that web app won't see any DB error.
> Do we have a way to catch all erros in sp and return back to callers
> gracefully, as if nothing wrong in DB?
> We tried to check IF @.@.ERROR > 0, but web app still get erros, such as
> Unique contraint violation, etc.
> Any ideas, reference papers, sample source code?
In SQL Server 2005 you can, I've used the following code sample to
demonstrate it in my classes (Using the pubs database):
set XACT_ABORT on
begin try
begin transaction
declare @.id int;
insert into jobs values ('Testjobb',10,10)
set @.id = @.@.identity;
insert into employee values ('123456789','Gates',null,'Bill',@.id+
1,10,'0877',GetDate());
commit transaction
end try
begin catch
select error_message();
rollback transaction
end catch
I'll leave it up to you to implement this in a stored procedure.
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging|||What about SQL Server 2000? That is the one we are using.
"Ole Kristian Bang?s" wrote:
> examnotes <Andrew@.discussions.microsoft.com> wrote in
> news:0F041009-08FF-4FF1-8AC7-D74968D16C05@.microsoft.com:
>
> In SQL Server 2005 you can, I've used the following code sample to
> demonstrate it in my classes (Using the pubs database):
> set XACT_ABORT on
> begin try
> begin transaction
> declare @.id int;
> insert into jobs values ('Testjobb',10,10)
> set @.id = @.@.identity;
> insert into employee values ('123456789','Gates',null,'Bill',@.id+
> 1,10,'0877',GetDate());
> commit transaction
> end try
> begin catch
> select error_message();
> rollback transaction
> end catch
> I'll leave it up to you to implement this in a stored procedure.
> --
> Ole Kristian Bang?s
> MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging
>|||examnotes <Andrew@.discussions.microsoft.com> wrote in
news:C25DD758-622D-4CB5-A870-F112B1C337C6@.microsoft.com:
> What about SQL Server 2000? That is the one we are using.
Sorry. This feature was introduced in SQL Server 2005. In SQL Server 2000
you have to check for errors after each and every command that may cause an
error (which may happen to be almost everyone)
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messagingsql
Tuesday, March 27, 2012
can we deploy RDL files into report server without using web services through .Net
Hi vidya
It is possible, after the initial deployment and folders were created. You could do the following:
Browse to your reportserver. Normally [server]/reports
Browse to the report and click on it. Select the report's 'Properities' Tab. Under the heading 'Report Definition' are 2 options 'Edit' and 'Update'. Use the 'Update' to upload the new rdl file. This will deploy a new version.
Hope this helps
,l0n3i200n
Sunday, March 25, 2012
Can we build Web UIs with SSRS?
whole hog writing a UI in a bespoke ASP.NET application, can one take
the sole refuge of SQL Server 2005 Reporting Services to do a neat UI
along with the reports?
As in, one of the parameters for a report may be a period range. Can
SSRS help me build a form with two date pickers that I can:
1. program the events of, package the date ranges, pass it to the
report and call my report file from?
2. publish the form as a Web form?
Or, does one have to rely on a bespoke ASP.NET app to do it? What are
the limits of SSRS?SSRS has its limitations.
SSRS relies greatly on how the SQL code is written.
For example, if you are using date ranges - reporting services is there
to be the middle man between presentation and data. Nothing more. All
reporting services will require is 2 parameters(start date and end
date).
Meaning SSRS will have to TEXTBOX's where the user will just enter 2
dates and it will run the report between the 2 dates. In this case
there is no validation of the paramters but i can all be handleled on
the DB side. So reporting services doesnt have built in controls where
the user will enter dates, its only there to GET parameters. These
parameters are provided in a text box.
SSRS is not a web application where the user has easy to read UI to
enter paramters. It does have a VERY nice way of displaying the
results. Its buily to display a result of a DB call, not to present the
user with a web form.
regards,
Stas K.|||Thanks, Sorcerdon. I understood what you're saying. Now let me present
a broader picture of what I'm thinking might just be possible.
I have to build a bespoke ASP.NET app, which mostly requires to use
SSRS as a backend for reporting. So, in effect, this bespoke Web app is
just to provide UI forms and call SSRS with parameters.
I was considering if it might be possible to use any of the SQL Server
2005 services (Integration, Application, Reporting, Anything Else) to
get the UI functionality also as it is, out-of-the-box.
After all, what I'll be building a bespoke application is to get a UI
to call my reports. Surely, Microsoft, with its DSI and software
factories initiative might have as well provided with some tool to
automate that as well out-of-the-box.
Thoughts?|||Actually, in SSRS 2005, there is a better implementation of the Date type
parameters, with a calendar control and input validation controls.
Thiago
--
Regards,
"Sorcerdon" wrote:
> SSRS has its limitations.
> SSRS relies greatly on how the SQL code is written.
> For example, if you are using date ranges - reporting services is there
> to be the middle man between presentation and data. Nothing more. All
> reporting services will require is 2 parameters(start date and end
> date).
> Meaning SSRS will have to TEXTBOX's where the user will just enter 2
> dates and it will run the report between the 2 dates. In this case
> there is no validation of the paramters but i can all be handleled on
> the DB side. So reporting services doesnt have built in controls where
> the user will enter dates, its only there to GET parameters. These
> parameters are provided in a text box.
> SSRS is not a web application where the user has easy to read UI to
> enter paramters. It does have a VERY nice way of displaying the
> results. Its buily to display a result of a DB call, not to present the
> user with a web form.
> regards,
> Stas K.
>|||I was solely speaking of Reporting Services 2000. My bad.
There is a UI for reporting that is built in for reporting
services(report manager). People can log in subsrcibe to report and get
it in their mail every morning. All of that is built in. And they can
run the reports at will.
The problem is that in RS2000 (I have not yet started working with 2005
until very recently) it wasnt as nice of a UI. So, perhaps a RS 2005
PRO can answer this?
As for out-of-the-box - there is always report manager. The users input
their parameters - or they are defualted to defualt parameters. It DOES
have it built in, yes!
Here are some screenies of what the report manager looks like:
http://www.windowsitpro.com/Files/09/40529/Figure_07.gif
http://msdn.microsoft.com/library/en-us/dnhcvs04/html/408dobson5.jpg
http://www.codeproject.com/books/MSReportingServices/img005.jpg
In that last screenie you can see how the parameters are inputed - in
those text boxes.
regards,
Stas K.|||Hi,
Ofcourse RS is meant for reporting and not giving some fancy UI. But yes in
2005 they have provided what is called "Report Viewer" (comes with VS2005)
which you can use it in your Asp.Net along with your UI. Want to explore ?
search for "ReportViewer Controls (Visual Studio)" in VS 2005 documentation.
Amarnath
"Water Cooler v2" wrote:
> Thanks, Sorcerdon. I understood what you're saying. Now let me present
> a broader picture of what I'm thinking might just be possible.
> I have to build a bespoke ASP.NET app, which mostly requires to use
> SSRS as a backend for reporting. So, in effect, this bespoke Web app is
> just to provide UI forms and call SSRS with parameters.
> I was considering if it might be possible to use any of the SQL Server
> 2005 services (Integration, Application, Reporting, Anything Else) to
> get the UI functionality also as it is, out-of-the-box.
> After all, what I'll be building a bespoke application is to get a UI
> to call my reports. Surely, Microsoft, with its DSI and software
> factories initiative might have as well provided with some tool to
> automate that as well out-of-the-box.
> Thoughts?
>|||Thanks everyone.
Sorcerdon and Amarnath,
Where do I find these "Report Manager" and "Report Viewer"? I cannot
see "ReportViewer Controls" in my toolbox. Do I have to import them (as
in set a reference to some assembly containing them)?
Or, is it because I do not have the complete Visual Studio 2005
Enterprise Architect Edition. I only have SQL Server 2005 Business
Intelligence Development Studio (which is basically a stripped down
version of VS .NET 2005 with only data-centric project templates).|||This is so wrong on so many levels.
I don't usually say this sort of thing but please until you learn more about
the product DO NOT jump in and answer questions.
Let's start with the most glaring problem. You state that the date would be
text with no validation. In RS 2000 there was not a date picker. In RS 2005
there is a date picker. BUT, even assuming you are on RS 2000 you are still
totally wrong. If you go to the menu Report->Report Parameters you can set
the data type for each parameter. So, even in RS 2000 there is validation
for a date field (or an integer field etc), they cannot put in a non-date if
the field should be a date field.
To say RS is not a web app that the user can enter parameters in easily is
also so totally wrong. Yes, some people prefer to have more control over
placement of controls and other things but RS comes with a totally usable
portal called Report Manager. You can have the parameters be based on a
query (so you that pick from a dropdown list). You can have cascading
parameters where the second parameter list is based on the previous
parameter. You can set defaults for the parameters, etc etc. Each report you
can place a description with it so when the user sees the list of reports
each report has a brief description. In RS 2005 you can have multi-select
parameter lists.
So in short, your answer has set this guy off on a totally wrong tangent. It
could be that the existing portal that ships with RS would fullfill all his
needs.
I know you were trying to be helpfull but you are lacking in knowledge about
the product.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Sorcerdon" <sorcerdon@.gmail.com> wrote in message
news:1144686176.448071.239430@.i40g2000cwc.googlegroups.com...
> SSRS has its limitations.
> SSRS relies greatly on how the SQL code is written.
> For example, if you are using date ranges - reporting services is there
> to be the middle man between presentation and data. Nothing more. All
> reporting services will require is 2 parameters(start date and end
> date).
> Meaning SSRS will have to TEXTBOX's where the user will just enter 2
> dates and it will run the report between the 2 dates. In this case
> there is no validation of the paramters but i can all be handleled on
> the DB side. So reporting services doesnt have built in controls where
> the user will enter dates, its only there to GET parameters. These
> parameters are provided in a text box.
> SSRS is not a web application where the user has easy to read UI to
> enter paramters. It does have a VERY nice way of displaying the
> results. Its buily to display a result of a DB call, not to present the
> user with a web form.
> regards,
> Stas K.
>|||Hey Bruce,
Thanks for that RS2000 validation control re-answer. I seem to have
never known it existed - perhaps because I am running all my reports of
a web app.
Same for the second answer.
regards,
Stas K.|||I have noticed other posts of yours after my harsh response here and you
have good answers in other areas. I got a little excitable on my post.
You obviously do know other areas of the product, just not Report Manager.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Sorcerdon" <sorcerdon@.gmail.com> wrote in message
news:1144787538.172402.57350@.g10g2000cwb.googlegroups.com...
> Hey Bruce,
> Thanks for that RS2000 validation control re-answer. I seem to have
> never known it existed - perhaps because I am running all my reports of
> a web app.
> Same for the second answer.
> regards,
> Stas K.
>|||Bruce,
I am actually a software developer not a report writer although I do
both.
So I really should go answer questions in other forums. In these forums
I hope to help myself learn and perfect my technique when writing
reports.
Although some questions here come from N-Users... So I am able to think
of solutions.
As for Report Manager, in this case I am the N-user ^_^ - I dont like
how it looks as a matter of fact. I want a whole new look for the whole
thing. I like a sharepoint type of look(if your familiar).
regards,
Stas K.
Monday, March 19, 2012
Can the transaction log be turned off?
ThanksNo
Why what the problem?
Waht's your recovery model set to?|||Recovery model is 'Simple'. Just thought I'd be able to cut down overhead. I've been getting timeouts and am grasping at straws.|||Originally posted by grahamt
Recovery model is 'Simple'. Just thought I'd be able to cut down overhead. I've been getting timeouts and am grasping at straws.
When you say timeouts, what do you mean by that?
From QA, from the application layer?
Are you blocking yourself (sp_lock)
How many connections are open (sp_who2)
How big is the database?
How often do you take backups?|||Setting recovery model is nothing to do with blocks or timeouts on the database. Ensure there are no issues with network, client connections and query conditions involved which may help causing timeouts.
Whatever the recovery model ensure to maintain & schedule full backup of the database.|||The SQL Server timeouts are reported by the ASP.
A bit of config info.
Hardware
SQL Server 2000
Dual Xeon 2.4GHz CPU
Ultra 320 SCSI controller
Two Ultra 320 18GB, 15000 RPM Hard Disks (C: and D:)
Two GB RAM (1.5GB assigned to SQL Server)
Windows 2000 Server
WEB Server connected to SQL server by Gigabit Ethernet.
Two databases involved. One has a single table of perhaps 2000 records (Session state info for WEB users) and is heavily used (Insert, Delete, and Select). It resides on drive C:.
Second DB residing on drive D: has one Master table and 26 others (A-Z). Master table has about 16000 6K records, Primary key on a varchar(50) and a char(2) column. Other tables run from 1000 to 50000 records 70 bytes/record (PK on a varchar(50) field). No updates are ever done (well, every few months maybe) and the Selects are done using stored procedures, one for the Master table (2 parameters) and 26 for the other tables (1 parameter).
Every few minutes (time varies as does the DB with the DB on drive D: getting the most) the WEB app logs an SQL Server timeout. With this horsepower driving these small DBs (and nothing else running) I wouldn't expect any timeouts at all.
Since I don't care about the data in one table and the data in the other never changes, I don't bother with backups.
Any thoughts?|||What are the timeout settings on SQL & ASP script?
IT may be worth if you enable DBCC DBREINDEX and other maint.plan checks on database which will addup performance.
And also consider network settings and take help of netadmin.|||http://vyaskn.tripod.com/sql_odbc_timeout_expired.htm - a useful guide to troubleshoot timeouts when using SQL & ASP.|||I've been monitoring network traffic with 3COMs Network Monitor and everything seems fine. The WEB server showed high FTP traffic so I've shut that service down but there's no perceptable load on SQL server. Performance monitor shows Disk Idle Time averaging 98% or better on both drives and the CPU load never exceeds 3-4%. I've run the SPs through QA and because they are so basic the execution cost is almost nil. The two SPs are
CREATE PROCEDURE [DBO].[prGetOrigins_A]
@.SomeVar Varchar(50)
AS
SET NOCOUNT ON
SELECT Code, Master FROM A Where SomeVar = @.Somevar
GO
and
CREATE PROCEDURE [DBO].[prGetMasterRec]
@.master varChar(20),
@.code varCHar(3)
AS
SET NOCOUNT ON
SELECT id, code,SomeData,
FROM Masters WHERE Master = @.master AND Code = @.Code
GO
and still I get random timeouts.
Personally I am not concerned. A timeout every 5 minutes or so with 250 users on the WEB server probably shouldn't happen but I can live with it. It's the boss who panics and worries that he may have lost a $5.00 sale. 8-)
Sunday, March 11, 2012
Can start new database from Web Matrix
I am running Web Matrix version 0.5, .Net version 1.1 on a computer with XP Pro.
Web Matrix works fine and returns forms properly.
I installed MSDE from the website (SQL2KDeskSP3a.exe) Ibelieve that SQL Server IS running, because I see the tower icon with agreen arrow; when I double-click that I get a message that it isrunning SQL Server.
When I click the "data" tab in Web Matrix I get the blankworkspace. Then I click the New Connection icon at the top left,which opens up a dialog box. I change "Windows Authentication" to"SQL Authentication." That opens up the Username/Passwordprompt. I am entering "sa" for the username (I AM NOT SURE IFTHAT IS CORRECT) and "**secret**" for the password (that's what Ientered in the command prompt when I setup the MSDE). Then Iclick "Create a New Database." I am asked to enter a name.
After a pause, I get an error message: "Unable to connect tothe database server. SQL Server does not exist or access denied.Connection Open (Connect ( )). OK
Do you have any ideas?
I installed the newer (version 0.6) Matrix and now I can find the database.Can SSIS work with an XML web service? (Verisign Payflow Pro)
I'm trying to figure out a solution for posting financial transactions against our Payflow Pro (Verisign) payment gateway (web service) using SSIS. The process I have in my mind goes like this...
1.) Select the appropriate records from our financial system DB.
2.) Iterate through each record and post the pertinent values against the payment gateway web service.
3.) Create log files for successful and failed transactions.
The log files would then be manually imported into our financial system.
Thanks in advance.
There is no web service or XML data flow destination, unfortunately. You could write a custom destination component to call your web service.|||jwelch wrote:
There is no web service or XML data flow destination, unfortunately. You could write a custom destination component to call your web service.
Not entirely true... You can stick a Web service task in a foreach loop that spins through the recordset. Then you merely map the appropriate variables to the Web service.
This is done on the control flow, though, so you'd need to perhaps stage your data first in the data flow and then select it with an Execute SQL task to load up your ADO recordset.|||My bad, I was focused on the data flow. Good approach.|||Great info! I'll look into that.
Wednesday, March 7, 2012
Can SQL server 2000 Enterprise Edition run in Windows XP?
1. I'm not connected in a network.
2. When I try to connect to sql server 2000 using this code:
<%
Dim CN
Dim RS
Set CN=Server.CreateObject("ADODB.Connection")
CN.Open "Provider=SQLOLEDB.1;uid=sa;Initial Catalog=Planetchow;"
Set RS = CN.Execute ("SELECT Restaurant_Id FROM RestaurantInfo")
While Not RS.EOF
Response.Write "<TR>"
Response.Write "<TD>" & RS.Fields("Restaurant_Id") & "</TD>"
Response.Write"</TR>"
RS.MoveNext
Wend
%>
I get this error message:
"Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection."
3. How come? What configurations do I have to make to be able to avoid this...
4. How do I connect to SQL server 2000 in ASP vbscript code?
Please I really need some help here...thank you!Go to enterprise manager and right click on the server and select properties then go to the tab that says security and make sure "SQL Server and Windows" is checked.
Can SQL Reporting and Crystal Web go on same web server?
hosting Crystal Web? Curious if this will work. Thanks!Haven't installed them on the same server however there is absolutely no
reason not to... it's just another web site - it's like saying would there be
a problem installing my own personal web site on the same server as RS or
CE... it's just another site in IIS.
"janda" wrote:
> Has anyone installed SQL Reporting Services on a web server that's already
> hosting Crystal Web? Curious if this will work. Thanks!
Saturday, February 25, 2012
Can someone solve this?
I am trying to create a local report that retrieves the data from a web
service in my business layer application but I can't figure out how to get
this dataset into my report.
Here is what I do:
I have 3 projects in my solution:
Project1.
A class library which contains a typed dataset 'myTypedDataSet'.
Project2.
A web service application with one method that returns 'myTypedDataSet'
Project3.
A windows application that contains one form and one report.
- I open my report in the designer
- Added a new datasource based on my webservice method (and 'myTypedDataSet'
showed up in the data source explorer view)
- I added the fields from 'myDataSet' to my report.
- I created a button with a click event where I call my web service that
returns an object of 'myTypedDataSet'.
Now - how can I assign this dataset to the report? I can't see anything
documented about how to do this.
Kind Regards
ThomasAhh, this is different than I thought you were asking. The thread
2005 SQL Reporting Service XML Data Source (WebService)
talks about using a web service as a source for a server based report. Your
question really has nothing to do with a web service, rather if I understand
you correctly you are wanting to use the Winform control and give it the
dataset. I have just started using this control but so far in server mode. I
know that the way the control works in local mode is you give it the dataset
and the report to use. If no one answers I suggest posting with the subject:
How do you assign dataset for Winform Control
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Thomas Andersson" <1qa2ws3ed4rf5tg6yh@.newsgroup.nospam> wrote in message
news:8B4AD63D-6CF0-4BCB-A3E0-0B1EDE447659@.microsoft.com...
> Hi,
> I am trying to create a local report that retrieves the data from a web
> service in my business layer application but I can't figure out how to get
> this dataset into my report.
> Here is what I do:
> I have 3 projects in my solution:
> Project1.
> A class library which contains a typed dataset 'myTypedDataSet'.
> Project2.
> A web service application with one method that returns 'myTypedDataSet'
> Project3.
> A windows application that contains one form and one report.
> - I open my report in the designer
> - Added a new datasource based on my webservice method (and
> 'myTypedDataSet'
> showed up in the data source explorer view)
> - I added the fields from 'myDataSet' to my report.
> - I created a button with a click event where I call my web service that
> returns an object of 'myTypedDataSet'.
> Now - how can I assign this dataset to the report? I can't see anything
> documented about how to do this.
> Kind Regards
> Thomas|||Hi Bruce,
> I have just started using this control but so far in server mode. I
> know that the way the control works in local mode is you give it the dataset
> and the report to use.
But how do you do this in runtime with a dataset retrieved from a web
service? This must be a very common scenarion when you use the report in
local mode.
Actually - I have implemented a solution that does this but I am not happy
with the way I do it.
On my winform button click event:
//Create an inctance of my web service proxy class and get the dataset
wsASPService myService = new wsASPService();
DataSet ds = myService.GetSalesName();
//Loop through the records of the first tables in the returned dataset and
add those
//records to my report's dataset 'dsSalesName'
//('dsSalesName' is a dataset created in this winform project)
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
dsSalesName.Tables[0].Rows.Add(ds.Tables[0].Rows[i].ItemArray[0],
ds.Tables[0].Rows[i].ItemArray[1]); //Only 2 columns in my table
reportViewer2.Refresh();
This works ok but in this solution I have created my typed dataset in my win
forms project and this is a poor design. I want to keep this dataset in a
separate project so I can share my typed dataset definitions to be used
across my solution (see my first post in this thread where I have the dataset
in a class library project).
Any ideas?
Thanks
Thomas Andersson|||I would not think you should have to copy from one dataset to another. I
would think you could just set the data source for the control to this
dataset.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Thomas Andersson" <1qa2ws3ed4rf5tg6yh@.newsgroup.nospam> wrote in message
news:D78561C5-D531-409D-93EB-48AAFBA386CD@.microsoft.com...
> Hi Bruce,
>> I have just started using this control but so far in server mode. I
>> know that the way the control works in local mode is you give it the
>> dataset
>> and the report to use.
> But how do you do this in runtime with a dataset retrieved from a web
> service? This must be a very common scenarion when you use the report in
> local mode.
> Actually - I have implemented a solution that does this but I am not happy
> with the way I do it.
> On my winform button click event:
> //Create an inctance of my web service proxy class and get the dataset
> wsASPService myService = new wsASPService();
> DataSet ds = myService.GetSalesName();
> //Loop through the records of the first tables in the returned dataset and
> add those
> //records to my report's dataset 'dsSalesName'
> //('dsSalesName' is a dataset created in this winform project)
> for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
> dsSalesName.Tables[0].Rows.Add(ds.Tables[0].Rows[i].ItemArray[0],
> ds.Tables[0].Rows[i].ItemArray[1]); //Only 2 columns in my table
> reportViewer2.Refresh();
> This works ok but in this solution I have created my typed dataset in my
> win
> forms project and this is a poor design. I want to keep this dataset in a
> separate project so I can share my typed dataset definitions to be used
> across my solution (see my first post in this thread where I have the
> dataset
> in a class library project).
> Any ideas?
> Thanks
> Thomas Andersson|||> I would not think you should have to copy from one dataset to another. I
> would think you could just set the data source for the control to this
> dataset.
I get this error message when I try to do that: "Value does not fall within
the expected range."
wsASPService myService = new wsASPService();
DataSet ds = myService.GetSalesName();
reportViewer2.LocalReport.DataSources[0] = new
Microsoft.Reporting.WinForms.ReportDataSource("dsSalesName", ds);
Is this the right way of doing it? Can you get it to work if you do a quick
sample?
Kind Regards
Thomas|||Hi Thomas,
You may use the code like below
reportViewer.LocalReport.DataSources.Add(
new ReportDataSource("DataSet1_Orders", LoadOrdersData()));
LocalReport.SubreportProcessing Event
http://msdn2.microsoft.com/en-us/library/microsoft.reporting.winforms.localr
eport.subreportprocessing.aspx
Sincerely yours,
Michael Cheng
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.|||Got it to work. First, the datasource needs to be a table, not a dataset
(remember, datasets can have multiple tables).
Here is working code (in my case I have a dataset with a single table that
gets the data from Sybase, doesn't matter though, works the same once you
have a dataset).
Dim dsReport As New Microsoft.Reporting.WinForms.ReportDataSource()
dsReport.Value = ds.Tables(0) 'ds is your dataset
dsReport.Name = "DatasourcenameYourReport is expecting"
Me.ReportViewer1.LocalReport.DataSources.Add(dsReport)
Me.ReportViewer1.RefreshReport()
If you add it by the wrong datasource name the reportviewer will tell you.
If you are not sure of the datasource name then add a break point and use
this in immediate window:
?me.ReportViewer1.LocalReport.GetDataSourceNames(0).ToString
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Thomas Andersson" <1qa2ws3ed4rf5tg6yh@.newsgroup.nospam> wrote in message
news:A6EFD849-F73F-4435-A7FF-118319B16449@.microsoft.com...
>
>> I would not think you should have to copy from one dataset to another. I
>> would think you could just set the data source for the control to this
>> dataset.
> I get this error message when I try to do that: "Value does not fall
> within
> the expected range."
> wsASPService myService = new wsASPService();
> DataSet ds = myService.GetSalesName();
> reportViewer2.LocalReport.DataSources[0] = new
> Microsoft.Reporting.WinForms.ReportDataSource("dsSalesName", ds);
> Is this the right way of doing it? Can you get it to work if you do a
> quick
> sample?
> Kind Regards
> Thomas
Friday, February 24, 2012
Can somebody explain this event in Sql Server Profiler?
Sql Server 2005; debugging a web application that accesses multiple databases.
I'm debugging some tsql in my web application using Profiler. Every once in awhile an Audit Login event will show up. This event contains the following text data:
-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed
When this event shows up, there is a noticable lag in the time it takes for the query to return. I'm wondering if anybody can tell me
1) What causes this event
2) How often can I expect this to happen. I.e., it happens once per application instance, once per application instance touching a database for the first time, once every X minutes, once every x queries executed, etc.
TIA!
Every time a new connection is made by a client -and is very normal and necessary.Sunday, February 19, 2012
Can set anonymous to ReportServer
my web page.
I set the virtual directory ReportServer's access to anonymous.
If there any dangers to do that?It can be depending on how you plan to manage your server and what rights
you set. When anonymous is on all users are seen as the same user. This
means you must give this user rights to everything you want people to
access. This means you can not have certain people access one folder and
other another. If you also want to do management type task as anonymous
then everyone will be able to do it. You could grant the anonymous account
rights to only certain folders and then every time you need to manage the
server, turn anonymous off.
Another option for you might be to use Forms authentication and then give
your users a user name and password. This would allow you more control over
security.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:eVgfnJ9nEHA.2948@.TK2MSFTNGP11.phx.gbl...
> I want to all user can see my reports in the server just like they can see
> my web page.
> I set the virtual directory ReportServer's access to anonymous.
> If there any dangers to do that?
>|||Thank,
Your another option is the answer.
But another question:
I use Forms authentication , how can I pass the user name and password to
rpeorting service from a login form ?
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D
:exGB5t$nEHA.1800@.TK2MSFTNGP15.phx.gbl...
> It can be depending on how you plan to manage your server and what rights
> you set. When anonymous is on all users are seen as the same user. This
> means you must give this user rights to everything you want people to
> access. This means you can not have certain people access one folder and
> other another. If you also want to do management type task as anonymous
> then everyone will be able to do it. You could grant the anonymous
account
> rights to only certain folders and then every time you need to manage the
> server, turn anonymous off.
> Another option for you might be to use Forms authentication and then give
> your users a user name and password. This would allow you more control
over
> security.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "ad" <ad@.wfes.tcc.edu.tw> wrote in message
> news:eVgfnJ9nEHA.2948@.TK2MSFTNGP11.phx.gbl...
> > I want to all user can see my reports in the server just like they can
see
> > my web page.
> > I set the virtual directory ReportServer's access to anonymous.
> > If there any dangers to do that?
> >
> >
>|||This is not really my area, but I believe there is a logon/logoff api that
you used. There should be a Forms example that you can look at.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:OmepgkBoEHA.3172@.TK2MSFTNGP10.phx.gbl...
> Thank,
> Your another option is the answer.
> But another question:
> I use Forms authentication , how can I pass the user name and password to
> rpeorting service from a login form ?
>
>
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D
> :exGB5t$nEHA.1800@.TK2MSFTNGP15.phx.gbl...
> > It can be depending on how you plan to manage your server and what
rights
> > you set. When anonymous is on all users are seen as the same user. This
> > means you must give this user rights to everything you want people to
> > access. This means you can not have certain people access one folder
and
> > other another. If you also want to do management type task as anonymous
> > then everyone will be able to do it. You could grant the anonymous
> account
> > rights to only certain folders and then every time you need to manage
the
> > server, turn anonymous off.
> >
> > Another option for you might be to use Forms authentication and then
give
> > your users a user name and password. This would allow you more control
> over
> > security.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "ad" <ad@.wfes.tcc.edu.tw> wrote in message
> > news:eVgfnJ9nEHA.2948@.TK2MSFTNGP11.phx.gbl...
> > > I want to all user can see my reports in the server just like they can
> see
> > > my web page.
> > > I set the virtual directory ReportServer's access to anonymous.
> > > If there any dangers to do that?
> > >
> > >
> >
> >
>
Can RS export word document?
Hello,
There are many posts about this in this forum, but a Word export isn't supplied by Microsoft. You will have to write your own or purchase a 3rd party tool. Take a look here, a couple 3rd party tools are mentioned.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=946719&SiteID=1
Jarret
Tuesday, February 14, 2012
Can Not View Report Server Web Pages
problems creating a report, but when I go to http:\\localhost\reportserver,
I just see a directory listing in the browser instead of the web interface.
Where should I look to troubleshoot?
TIA
Dean> Where should I look to troubleshoot?
No place -- you're prolly fine.
Try http://localhost/reports if you want the Report Manager interface...
>L<
"Dean" <deanl144@.hotmail.com.nospam> wrote in message
news:%23p6kzVcqHHA.1220@.TK2MSFTNGP04.phx.gbl...
>I have installed the Business Intelligence Studio on my PC and had no
>problems creating a report, but when I go to http:\\localhost\reportserver,
>I just see a directory listing in the browser instead of the web interface.
>Where should I look to troubleshoot?
> TIA
> Dean
>
can not view certain web pages
when viewing certain web pages. i do not know what to doFirst change your settings on IE to show you the error.
Under Tools
quote:
>Internet Options
Click on Advance Tab
Scroll down and uncheck show friendly HTTP errors
Then navigate to the page. See if you get a more useful error msg.
Friday, February 10, 2012
can not login my database when published to IIS
hi,
i am tring to use the 'xcopy' way to deploy my web site, this is the connection string i am using:
"Data Source=.\SQLEXPRESS;INITIAL CATALOG=;AttachDbFilename='|DataDirectory|\HotStage.mdf';Integrated Security=True;User Instance=True"
it works when in debug mode, but after i depoly it to my XP's IIS, it can not login the database, the error message is :
Cannot Login to the default user database. Login Failed. Login Failed for user xxx\ASPNET
'xxx' is my computer.
i think this problem is cause of improper setting of security, but i really do not know how to set it in this situation, because the database is attached to the db system dynamically.
plz someone help, thx
when you use userinstance in sql server express, once the applicaiton is connected to the database you can not connect to the database using SSMO Express. If you donot want to use userinstance change the connection string . "AttachDbFilename='|DataDirectory|\HotStage.mdf' " this is the part where u are attaching the db in connection string. change it if not needed
refer :
http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx
Madhu
|||hi,
yes, after i remove the 'User Instanct' clause, and did some permission adjustment, i do connected to my database.
but now i have another strange problem... it says my database is read-only
i have set that folder to hava 'write' permission in IIS.
any idea about this?
can not login my database when published to IIS
hi,
i am tring to use the 'xcopy' way to deploy my web site, this is the connection string i am using:
"Data Source=.\SQLEXPRESS;INITIAL CATALOG=;AttachDbFilename='|DataDirectory|\HotStage.mdf';Integrated Security=True;User Instance=True"
it works when in debug mode, but after i depoly it to my XP's IIS, it can not login the database, the error message is :
Cannot Login to the default user database. Login Failed. Login Failed for user xxx\ASPNET
'xxx' is my computer.
i think this problem is cause of improper setting of security, but i really do not know how to set it in this situation, because the database is attached to the db system dynamically.
plz someone help, thx
when you use userinstance in sql server express, once the applicaiton is connected to the database you can not connect to the database using SSMO Express. If you donot want to use userinstance change the connection string . "AttachDbFilename='|DataDirectory|\HotStage.mdf' " this is the part where u are attaching the db in connection string. change it if not needed
refer :
http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx
Madhu
|||hi,
yes, after i remove the 'User Instanct' clause, and did some permission adjustment, i do connected to my database.
but now i have another strange problem... it says my database is read-only
i have set that folder to hava 'write' permission in IIS.
any idea about this?
Can not install SP4 for SQL Server 7.0 on Win2k
exceptions persistently whiles connecting to SQL Server
7.0. I gathered from the web the problem is a known issue
with SQL Server 7.0 and is fixed in SP4. However,
whenever I try installing the service pack it gets stuck
in the first step and would not continue.
Could somebody offer me some assistance.
Thanks advance.* Look at the sqlsp.log for error messages
* It's a good idea to turn off all 3rd party and non-essential services
before you prform the Service Pack upgrade.
Thanks,
Vikram
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||In my case this is a SP4 install on a reinstall of SQL 7.0 with no user databases
I have followed all the tips about turning off all non-essential services, etc., per the kb article and various other docs, but the 7.0 sp4 installation still fails with the messag
"One or more of your user databases have been marked read only, offline or suspect (not recovered). Correct the problem and restart setup.
The log files seem to show everything is ok but the install still fails
I did try one additional test -- running the scm and osql commands shown at the end of the sqlsp.log file.
When I ran the osql command, I get the expected results of 0 but also get an additional message for the ODBC driver manager: "The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
I suspect that this additional message is causing the failure
(Running on W2k / SP4)
-- Vikram Jayaram [MS] wrote: --
* Look at the sqlsp.log for error message
* It's a good idea to turn off all 3rd party and non-essential services
before you prform the Service Pack upgrade
Thanks
Vikra
Vikram Jayara
Microsoft, SQL Serve
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups|||How are you installing the setup for sp4. What does the sqlsp.log say? Are
you sure there are no other sql70 instances on the box?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.