Showing posts with label control. Show all posts
Showing posts with label control. Show all posts

Friday, March 30, 2012

Locking

Hi all,
SQL server doesnt provide any kind of configuration to
control granularity of locking on tables. As per books
online it is managed dynamically.
I have a major problem with my SQL Server, during
execution of one SP, on one table with 400+ rows it
acquires 600,000 locks. My profiler shows
whooping 'Lock:Acquired' on this particular table.
Can somebody please throw some light on this? Why SQL
server doesn't promote it to single table level lock? Is
there any bug in SQL?
thanks very much
Himanshu JaniYou probably want to keep working on why this happens in the first place (although there's not much
to go on for us), but here are a couple of options for immediate fix:
Specify lock hint in the query (TABLOCK, for instance).
Configure the index used to not allow row locks (sp_indexoption).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Himanshu Jani" <anonymous@.discussions.microsoft.com> wrote in message
news:2c84301c393cd$c746cab0$a601280a@.phx.gbl...
> Hi all,
> SQL server doesnt provide any kind of configuration to
> control granularity of locking on tables. As per books
> online it is managed dynamically.
> I have a major problem with my SQL Server, during
> execution of one SP, on one table with 400+ rows it
> acquires 600,000 locks. My profiler shows
> whooping 'Lock:Acquired' on this particular table.
> Can somebody please throw some light on this? Why SQL
> server doesn't promote it to single table level lock? Is
> there any bug in SQL?
> thanks very much
> Himanshu Jani

Wednesday, March 7, 2012

Local Report not changing back to original report

Hi
I have an aspx page which contains the report viewer control. I am using
this control in local processing mode.
Everything is working correctly except the following case
If I view a report (Report1) and then click on a hyperlink which drills down
to another report (Report2), the new report loads corectly and the
parameters are passed.
However, If I then select my generate report button on the form, it seems to
create the correct datasource and pass the right parameters, but instead of
displaying Report1 again, Report2 is still displayed and the data in the
report is incorrect.
I have dubugged the code and it all seems correct to me.When the generate
report button is clicked, the report path for Report1 is set, the new
collection of report parameters are created (which are correct) and the
datasources are setup.
The only thing that is not changing correctly is the report being rendered.
Here is some of my code
'btnGenerateReport_Click Method
rptReportViewer.LocalReport.ReportPath = MapPath("../Reports/" &
objReport.URL & ".rdlc")
rptReportViewer.LocalReport.DisplayName = objReport.Name
rptReportViewer.LocalReport.DataSources.Clear()
rptReportViewer.LocalReport.DataSources.Add(New
Microsoft.Reporting.WebForms.ReportDataSource("myDataset",
dsData.Tables(0)))
rptReportViewer.LocalReport.SetParameters(objReportParameters)
rptReportViewer.LocalReport.Refresh()
rptReportViewer.Visible = True
Is there anything else I need to do to refresh the report?
Any help would reeally be appreciated as I cannot find any help or examples
on how to do this.
Thanks
Lewis HolmesHi Lewis,
Thank you for your post.
This behavior is by design for the WebForm.ReportViewer control.
It is possible to change the DataSource of the localreport
It is not possible to change the report definition in the WebForms control
in LocalReport mode after it has been set once.
To work around the design limitation of the WebForms ReportViewer control,
you can remove the existing instance and create a new one which uses the
new report definition.
Here is a sample:
//Get the new report definition
StreamReader tr = new StreamReader( < your rdlc file path>);
string sDef = tr.ReadToEnd();
tr.Close();
//Create the new viewer and remove the old one
ControlCollection col = ReportViewer1.Parent.Controls;
int index = col.IndexOf(ReportViewer1);
ReportViewer newReportView = new ReportViewer();
col.AddAt(index, newReportView);
col.Remove(ReportViewer1);
newReportView.Visible = false;
newReportView.ProcessingMode = ProcessingMode.Local;
StringReader sr = new StringReader(sDef);
newReportView.LocalReport.LoadReportDefinition(sr);
newReportView.LocalReport.DataSources.Clear();
newReportView.LocalReport.DataSources.Add(new
Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_DataTable1",
ObjectDataSource1));
newReportView.LocalReport.Refresh();
newReportView.Visible = true;
Hope this will be helpful!
Thank you!
Sincerely,
Wei Lu
Microsoft Online Community 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.

Local Report Confusion

Okay, so I'm working with a local report via the Web ReportViewer
control, and there is something going on that I don't quite get. I
created my object datasource and it was available to me via the "data
source" window when i created my RDLC report. All good here. Well along
the way, I have made changes to the class that represents my data
source object, and here is what I'm seeing being auto-inserted into my
ASPX file:
<rsweb:ReportViewer ID="ReportViewer1" runat="server" >
<LocalReport ReportPath="MyReport.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="MyObject" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="MyObject1" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="MyObject2" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="MyObject3" />
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="MyObject4" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
SelectMethod="GetMyObjects" TypeName="Merchant"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetMyObjects" TypeName="Merchant"></asp:ObjectDataSource>
By the time the "MyObject3" I started wondering if there is some hidden
(or at least not obvious) versioning going on with my object data
class, in that each time I change it and rebuild it, it is given a new
name in the data source pane. What's really odd though, is that only
the most recent appears to be available (assuming that is what is going
on). So why do all these new <rsweb:ReportDataSource /> rows keep
appearing in my ASPX? Am I somehow creating multiple connections to my
datasource? Is this a result from each time I change the class that
represents my underlying data source object? Do I need to keep all
these entries, or can I dump all the old ones and just keep the newest
one? Finally, how did I end up with multiple "OjectDataSource" objects?
I started deleting them, and then having to repoint the reportviewer
control to an existing ObjectDataSource control.
If anyone can clarify what is going on, I would be very grateful.
Thanks!
ChrisQuick update: I see that changing my class isn't what causes the
insertion of new <rsweb:ReportDataSource /> items in my ASPX. Just now
I added a new table, and now when I run it I get the error "A data
source instance has not been supplied for the data source 'MyObject5'."
If you look at my previous post, there was no "MyObject5". Now when I
click on the smart tag for the reportviewer object in design view and
select "Choose Data Sources" I get the pop up grid that now asks me to
associate an ObjectDataSource with this new MyObject5. So again, in
this dialog, I have a column called "Report Data Source" and a column
called "Data Source Instance". Right now my grid (after associating
this latest one) looks something like this:
Report Data Source Data Source Instance
MyObject ObjectDataSource1
MyObject1 ObjectDataSource1
MyObject2 ObjectDataSource1
MyObject3 ObjectDataSource1
MyObject4 ObjectDataSource1
MyObject5 ObjectDataSource1
Thanks!

Local processing, ReportViewer and PDF

I hope this is the right Newsgroup, if not I'd be glad for directions to the
right one.
Regarding the ReportViewer control shipped with VS.NET 2005 Beta 2, I've
seen that in local processing mode the only renderer is Excel. Does anybody
know if this will be like that also in the final version of VS.NET 2005 ?
Does anybody know any commercial PDF rendering extension for the
ReportViewer?
Thanks,
Ethem AzunAfter writing this, I just run into these;
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=b5f3f1cf-4614-474e-b423-0fa9c35f09e1
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=7acce9a3-35f5-4f6b-8789-236db4b45a03
Ethem Azun
"Ethem Azun" wrote:
> I hope this is the right Newsgroup, if not I'd be glad for directions to the
> right one.
> Regarding the ReportViewer control shipped with VS.NET 2005 Beta 2, I've
> seen that in local processing mode the only renderer is Excel. Does anybody
> know if this will be like that also in the final version of VS.NET 2005 ?
> Does anybody know any commercial PDF rendering extension for the
> ReportViewer?
> Thanks,
> Ethem Azun

Monday, February 20, 2012

LoadSnapshot: Item with session: ...

I have a application that uses the Report Viewer control. I ran across a
strange error executing a report.
What does this error message mean and how do you fix it?
w3wp!session!5!04/13/2007-22:38:55:: i INFO: LoadSnapshot: Item with
session: yzyevt45bsjnhi55g1tpso45, reportPath: , userName: MY_NET_1\DB not
found in the database
w3wp!library!5!04/13/2007-22:38:55:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException:
Execution 'yzyevt45bsjnhi55g1tpso45' cannot be found, ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException:
Execution 'yzyevt45bsjnhi55g1tpso45' cannot be foundHello Parker,
I would like to know this issue more detailed.
1. Did you use the ReportingViewer to connect to the Server report?
2. Have you applied the latest services pack 2 on the report server?
3. If you restart the IIS in the report server, did this issue still
occured?
4. What's the Application pool identity you use of the Application pool for
Reporting Services? If you change it to the Domain admin, did this issue
still occur?
Please let me know the result and so that I can provide further assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community 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.|||Sorry I haven't had a chance to get back sooner.
1. Yes I did use the ReportViewer to connect to the Server report.
2. No, SP2 has not been applied. We are scheduling this for the weekend.
3. This only happened once so far. But there is not normal production use
yet.
4. We will change pool identity Domain admin this weekend.
So for now, we will make the changes and wait to see if it occurs again.
Thanks for the help.
"Wei Lu [MSFT]" wrote:
> Hello Parker,
> I would like to know this issue more detailed.
> 1. Did you use the ReportingViewer to connect to the Server report?
> 2. Have you applied the latest services pack 2 on the report server?
> 3. If you restart the IIS in the report server, did this issue still
> occured?
> 4. What's the Application pool identity you use of the Application pool for
> Reporting Services? If you change it to the Domain admin, did this issue
> still occur?
> Please let me know the result and so that I can provide further assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community 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.|||Wei Lu,
I am seeing this same behavior in a completely different environment.
1) application that uses the Report Viewer connect to the Server report.
2) SP2 is applied
3) I restarted IIS on the RS server, but it did not correct the issue. I
also restarted the RS server, but the issue continues.
4) I don't currently have the capability to adjust the Application pool
identity, but am trying to get that changed now.
Do you have any further information on what might be causing this error?
thanks.
"Wei Lu [MSFT]" wrote:
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community 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.
>|||Hi Wei Lu --
I too am experiencing the Execution 'xxx' cannot be found error. I am
using ReportViewer, with SP2 is installed. This is a local RS install
using the Network account on XP SP2.
The problem is very intermittent -- occurred 3 times today. Twice when
setting report parameters and clicking 'View Report', another when
clicking the double-arrows to show/hide the parameter area. There was
no length of inactivity (some users reported problems after 10 minutes
of inactivity -- I think this is a different issue).
Any help would be appreciated!
Thanks,
Chris