.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Hiding reportviewer 2010

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :ASP.Net

I'm working on upgrading reports created in 2005 using reportviewer control in local mode.  The reports have upgraded ok, but I have several reports that use the following code, or something similar:


<script runat="server">

    Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        If Not IsPostBack Then
            ReportViewer1.Visible = False
            ReportViewer1.Visible = True
        End If
        ClientScript.RegisterHiddenField("__EVENTTARGET", "Button1")
    End Sub

    'Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    'ReportViewer1.Visible = True
    'End Sub

However, after playing with it for serveral days, I cannot get the report to display after postback.  If I just run the report with all my code commented out, the report immediately opens with a default just fine.  My users generally need to enter some parameters that are sent to the objectdatasource as where clause parameters (customer name or date for instance), so I need to hide the report until the user gets a chance to enter their criteria.  How can I achieve this using reportviewer 2010?




View Complete Post

More Related Resource Links

ReportViewer webpart is not working after SharePoint 2010 upgrade


After upgrading to SharePoint 2010 and Reporting Services 2008 (separate servers), all our web part pages that have the ReportViewer web parts in them are not working.  The error we are getting is "Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe."  All the reports are working on the report server but not through the web parts.  We used Visual Studio 2005 to create these reports and they all work in MOSS 2007 that also ran Reporting Services 2005.  If we delete the web part with the error and put in the ReportViewer web part manually on the page in SharePoint 2010, the reports do work.  But there are too many reports to be doing this manually for every web part page.  We already tried making changes to the Handler Mappings but it did not resolve the errors.  As far as we can tell, all the DLLs are in the right places.  Any help or suggestions would be greatly appreciated.  Thanks.

Reportviewer 2010 redistributable export to Ms Word pagenumber problem


Hi, in my asp.net app I use the Reportviewer 2010 tot show reports (RDLC). This is working fine, but when I export to Word the pagenumbers is always 1 from 1 even when the document contains 2 or more page, while when I export to PDF it is showing the right page number.

Anyone has the same problem?

Hiding Controls According to User in Sharepoint Designer 2010


Dear All,

I created a Document library.In the library list I have added some custom columns.When user click "edit document" I need to disable some field according to user.

I tried to do this with sharepoint designer but wasn't succeeded.

How can I get user name to conditional formatting of the control......?





ReportViewer failing inside Visual WebPart in SharePoint 2010


I have a ReportViewer control inside a VS2010 Visual WebPart deployed in SharePoint 2010.

If I put the report inside an iFrame it works fine (just setting the src = the URL of the report).

If I put it into a ReportViewer I get:

The request failed with HTTP status 401: Unauthorized

There is a script error as well:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0E)
Timestamp: Thu, 25 Nov 2010 16:31:21 UTC

Message: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsCreated[3]
Line: 129
Char: 12
Code: 0
URI: http://sp1/ScriptResource.axd?d=-xH2htwpSITFBSwbFV7VDS5Q9mmVEgTgSvuk8Jnd0Aqfw1cDpd2fSDrxiYgThtNQaq_myOFBHF5amI3fSpKyzWC4_s-HZtrKUr2-4SPgMT-QTYS4o9bFW4nEbGrr672JSI6F-Bj9IwIMCeRG3jk4zDu2TszO2ivKeIwAwEZMMVRfONWH0&t=5c2f384e

I have deployed the webpart to a standard web application and it works fine.

Here's the entirety of the code (or the bit that matters)

ReportViewer 2010 control


Hi All

I am using VWD 2010 and I would like to use the ReportViewer control. I cannot seem to find it in the toolbox. Is there a download I need to do in order to get this control?


Reportviewer 2010 is coming with blank screen. Data exists on the page but not showing on the screen


17 hours, 7 minutes ago

ASP.NET, HTML, JavaScript Snippet Support (VS 2010 and .NET 4.0 Series)

This post covers another useful improvement in VS 2010 - HTML/ASP.NET/JavaScript snippet support. Snippets allow you to be more productive within source view by allowing you to create chunks of code and markup that you can quickly apply and use in your application with a minimum of character typing.

Visual Studio has supported the concept of "snippets" for VB and C# in previous releases - but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well.

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

Architecture Tools in VSTS 2010

Designing new functionality on existing applications can be daunting. There are always differences between the original design and the current implementation.

The new Architecture tools within Visual Studio Team System 2010 help you understand the application you have, design new functionality you need, and validate that your design and your implementation do not deviate.

VB and C# enhancements in VS 2010

In Visual Studio 2010, we've made several enhancements to our two most popular languages, Visual Basic and C#, to give programmers all the tools they need to build great software no matter which language they prefer.

The Visual Basic team focused on adding productivity features to the language so developers can get more done in fewer lines of code. The most common customer request for Visual Basic is to remove the underscore ("_") character when breaking a code statement across multiple lines in most cases. Visual Basic 10 introduces implicit line continuation, which removes the need for the underscore character in most cases.

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

VS 2010 and .NET 4 Series

VS 2010 and .NET 4 are the next major releases of our developer tools and framework. Together they contain a ton of new functionality and improvements that I think you'll really like, and which make building applications of all types easier, faster and better. The improvements range from nice small tweaks to major, major enhancements - and can be found across the .NET Framework, the languages, and the IDE.

ASP.NET 4 and Visual Studio 2010 Web Development Beta 2 Overview

Many exciting changes for ASP.NET are coming in the .NET Framework version 4. This document gives an overview of many of the new features that are included in the Beta 2 release of the .NET Framework 4 and of Visual Studio 2010.

Visual Studio 2010 Beta 2

This is a big deal. This isn't ".NET 3.6" - there are a lot of improvements of .NET 4, and it's not just "pile on a bunch of features so you get overwhelmed." I've been working with and talking to many of the teams involved and even though it's a cheesy thing to say, this is a really customer-focused release.

ASP 4 - Whirlwind Tour around .NET 4 (and Visual Studio 2010) Beta 1

There's a lot of stuff that's new and added in .NET 4, but not in that "overwhelming-I-need-to-relearn-everything" way. More in that, "oh, this is way easier/simpler now" way. Like, moving data around with ADO.NET DataServices is easy, binding with client templates is easy, there's F# if you need it, the "dynamic" keyword if you need it, Silverlight's already installed, oh, and the parallel stuff will freak you out, but in a good way.

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

How to get more information about the exceptions that can happen in SharePoint 2010 projects?

In case there is an exception anywhere in the SharePoint 2010 project (most common place an exception would happen is during deployment of your SharePoint project, custom deployment configuration or custom deployment steps), there's a registry key EnableDiagnostics available for you to use.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend