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

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

Automatic Batch Printing in ReportViewer Remote Mode

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Please help me, i have a properly working codes that is capable of the following:

1. Printing of Reports from ReportViewer without using the build-in print ICON in the actual ReportViewer. to view the working for the printing alone please click here.

2. Batch Printing by making a loop and placing a checkbox on the gridview where the needed paramerter (DataKeyNames ID) is retrieved then pass to the ReportViewer

This is my Code

foreach (GridViewRow row in GridView1.Rows)
            CheckBox chk = (CheckBox)row.FindControl("CheckBox2");
            if (chk.Checked)
                ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://TestServer/ReportServer");
                ReportViewer1.ServerReport.ReportPath = @"/Tavern/StudPaymentReport";
                ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                ReportParameter[] rptParams = new ReportParameter[1];

                rptParams[0] = new ReportParameter("ClientID", GridView1.DataKeys[row.RowIndex].Value.ToString());


View Complete Post

More Related Resource Links

Calling remote batch file using Execute Process Task



The requiement is to create excel file. I cannot run this code using SSIS vbscript task because this requires Microsoft.Office.Interop DLL which can not be installed on the dev / prod server. Hence using the SQL task the data exported to excel.

But now the excel is required to be updated to merge some cells. The approach we are thinking is to keep VBS file with required code to UNC path. Keep the BAT file running VBS file using CSCRIPT command in same location. Call the BAT file from SSIS package using Execute Process Task. This approach is tested in local system and also works on dev server. But somehow the sample code used to create excel is not creating excel to UNC path.

VBS code below

Const xlSaveChanges = 1
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.Cells(1, 1).Value ="Test value"

The BAT used to call above VBS file is given below

cscript \\server.com\folder$\Demo\Excelfile.vbs

The above UNC path is used in execute process task package which runs fine. But the file is not yet created.


Sql Server 2008 logs Authentication mode incorrectly avoids remote login


Im trying to connect SQL server 2008 Express R2 installed on XP sp3 pc through ODBC SQL Server driver with a Windows 7 PC. I managed to define static IP ports and setup firewall. Now the ODBC connection successfully gets created by accepting uid : sa and my password given.

Now Im getting "login failed for user ". " msg from my application. When I run the same application with same ODBC connection created in the SQL server PC it works fine. The two pcs operate in a workgroup.

Following  is the error log. Im surprised to note that the server logs its in Mixed mode initially and later makes a cry that its in Windows Authentication mode. !!!!

010-07-25 15:19:53.76 Server      Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)
    Apr  2 2010 15:53:02
    Copyright (c) Microsoft Corporation
    Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3, v.3311)

2010-07-25 15:19:53.76 Server      (c) Microsoft Corporation.
2010-07-25 15:19:53.76 Server      All rights reserved.
2010-07-25 15:19:53.76 Server      Server process ID is 3552.
2010-07-25 15:19:53.76 Server      Auth

Help printing .rdl reports using the asp ReportViewer control from a web page to the users client pr


I have developed a set of ssrs .rdl reports and am trying to display them from the reportviewer control embeded in my asp web page. The problem is that when I select the print icon on the reportviewer control I am prompted to install ms sql server. I need help here. What is the best way to print .rdl reports from the web page's embeded reportviewer control to the client's local network printer.





rendering xml:space in remote mode


I am trying to indent the first value of certian rows.

col1   col2   col3
  val1  val2   val3
  val4  val5   val6
  val1  val2   val3

I tried adding a few spaces ahead of the field reference. This worked very nicely, but only when previewing in local mode. In remote mode the server seems to trim the leading white space. It seems the xml:space="preserve" option is ignored in remote mode.

Is there a better way to achieve this?

The remote server returned an error: 227 Entering Passive Mode (67,228,53,42,12,130)


I have writen a ftp client to download files from ftp. while downloading the files from the ftp I;m getting the same error  (The remote server returned an error: 227 Entering Passive Mode (67,228,53,42,12,130)). Particularly I am getting this error in the line
Using response As System.Net.FtpWebResponse = CType(ftp.GetResponse, FtpWebResponse)

I hope you can help me out to solve this problem.


Printing on dot matrix printer using ReportViewer


Hi all,
I'm developing a Windows application in C#. It generates reports using ReportViewer. These reports should be printed on a dot matrix printer. However, there is a problem.
The application runs on multiple computers connected in a local network, the dot matrix printer is connected to the network also. When the report is generated and the Print button from the toolstrip of the ReportViewer control is pressed, the default Print dialog appears. When the matrix printer is selected and Print is pressed, the application crashes showing the Windows error message.
However, there are some things I noticed:
1. The error appears only on some computers in the network. From the other computers, the printing on dot matrix printer from my application runs fine.
2. If I try to print the report on a laser printer (which is also a network printer), it runs fine.  
3. Printing on the dot matrix printer is succesful from other applications on these computers.
4. All computers have the same operating system (Win XP) and the same version of my application.
Could anyone give me advise on how to approach the problem? I cannot debug this one because I'm using the functionality of the ReportViewer control for printing and actually don't have any source code to debug Smile

RS Integrated Mode ReportViewer Webpart not working





I have setup RS in integrated mode, and i can access and view the reports by clicking on them in the SharePoint document library. However i would like to view some of the reports in webparts elsewhere on the site.  When i click to add a webpart i have the following selection of RS related webparts:


1. Report Explorer

2. Report Viewer

3. ReportViewerWebpart

4. ReportViewWebpart

5. SPExplorer

6. SPViewer

7. SQL Server Reporting Services Report Viewer


Number 2,3 and 6 all appear to be exactly the same, and in the toolpane for all 3 it asks me the URL for the report Manager and the path to the report.  The Manager no longer exists in Integrated Mode and i cant figure out therefore what i should enter here to display the report. (this worked fine to display the report when in Native Mode...)


Number 1 and 5 are a similar story.


Number 7 doesnt work at all - when i try and add the webpart it says:


"Unable to add selected webpart(s).

SQL Server Reporting Services Report Viewer:

save and load RDL/RDLC with Data(offline mode with reportviewer), load RDL/RDLC with saved data in r

Hello every one
We are new to SSRS.
we have a client server application and have reports in crystal report, for each request to report from client we run report in server and then send saved rpt(crystal report file that data is embedded in file ) to client and after that load it to client crystal report viewer. clients can saved report file with data and load it in another time(truly we don't use crystal as report server and our application manage reports ).
we plan to use SSRS in our application instead of crystal report(for problems that there are in crystal version and deployment of crystal report packages ). in our scenario we need use RDL without server truly just application use server but client just receive report file and load it to RDL/RDLC ReportViewer and reportviewr run in local mode without communicate with server like crystal previous solution we need clients can save report with data and reload it in another time. we can't find any solution for it.

Are there any solution to save RDL/RDLC file with Data and load it again in Reportviewer?

Can use *.rdl.data for it?

Why there is not any easy way to embed data in Rdl  or Rdlc file and reload them with data?

Is it a weakness of SSRS and SSRS has any plan t

Automatic vs Explicit Properties

If the reason that motivated the change from automatically implemented property to explicitly implemented property was to change the semantics of the property then you should evaluate whether the desired semantics when accessing the property from within the class are identical to or different from the desired semantics when accessing the property from outside the class.

Bluetooth Printing Guide using Windows Mobile Pocket Pc

FieldSoftware Products printing products use the Bluetooth "Serial Port Profile" (SPP). Unfortunately, there is no standard method to find your Bluetooth printer and begin printing... each device contains a Bluetooth stack/driver that determines the steps. There are two main stacks currently available... one from Microsoft and one from WIDCOMM/Broadcom. Below are step-by-step instructions for printing with the Microsoft and WIDCOMM stacks. Note that these may change for different versions of the Bluetooth stacks or for different manufacturers. Consult the documentation for your device for specific details on your device.

Identifying your device''s Bluetooth stack: There is no sure steps to identify a Bluetooth stack on a device. Below are steps for identifying current WIDCOMM and Microsoft stacks at the time this page is published. Note that these may not identify earlier or later versions of the same BT stacks.

ASP.net Ajax TabContainer -- Printing All tabs



Can  anyone help me with this?. I want to print all the tabs in ajax tab container. The tab container has around 10 tabs. I dont want to goto each tab and print the page. Instead is there any way by which I can tweek the print.css file to print all the tabs at a single stretch?.  So that I will get all the contents of the tab in single print.  Is there any other way in which I can print all the tabs all together?.

Thanks in Advance...


How to Acess VSS from a remote Computer


i acess vss from lan with no problems and now i want acess from a remote computer not in a Lan

I need access over the Internet

What are settings i need to set up in the server and my client machine

VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project


Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.


  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,


Printing resource files



I have some resource files for localization and would like to print them. When I try to print them in Visual Studio (with File -> Print...) the button is disabled. Does anyone know how to print them? (Without copying each into word or excel)

Thanks and regards,

How do I preserve __viewstate between cross domain posts or how do I get a __viewstate of a Remote S


Here is what I want to do:
I have a local site in which I want to display data from a remote site
Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost

Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.

The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself

How can I accomplish it?

Security negotiation failed because the remote party did not send back a reply in a timely manner. T



Dear All i have created one simple service

like this

namespace WcfService2
        public class Service1 : IService1
        public string ShowEmpName(string strFirstName, string strLastName)
            return strFirstName + strLastName;

after executing in .net command promt i got 2 files

service.cs & output.config

after that i create one class file like this

namespace WcfService2
    public class clientcs

        static void Main(string[] args)
            Service1Client client = new Service1Client();
            string strResult = client.ShowEmpName("Pradeep", "Deokar");

Web Deployment with IIS settings of remote server


Im trying to deploy a web application project (VS 2010) via team build (TFS 2010), i got to use IIS settings of development server for deployment. So from the project properties I configured the web projects to use Custom web server, (enabled radio button), once i do this the Option in the tab Package/Publish Web "Include all IIS Settings as configured in IIS manager" gets disabled and as a result the deployed web project does not have this IIS settings.

What am I missing here, Im not using the option "Use local IIS Web Server" because the build happens in a build server and would try to take local IIS settings for packaging which is not present.

If this is not possible, suggest me any workaround. Any help on this is greatly appreciated.

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