Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Reporting Services: Printing without displaying a report

Posted on 2007-03-20
4
Medium Priority
?
2,555 Views
Last Modified: 2007-12-19
I am working with SQL Reporting Services within a Windows Forms .NET application. Is there a way that I can print a report without displaying it first and without displaying a print dialog first? I just want to send the report to the default printer without the user doing anything other than clicking a button in my application. I actually have a set of several reports that needs to be printed when this button is clicked and I'd like to avoid forcing the user to view and print each of them separately. Thanks.
0
Comment
Question by:Paracom_Inc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:simon_kirk
ID: 18766923
Hi.
Are you using the 2000 or 2005 version of RS?
0
 

Author Comment

by:Paracom_Inc
ID: 18768120
I am using the 2005 version.
0
 
LVL 14

Accepted Solution

by:
simon_kirk earned 1500 total points
ID: 18769971
The ReportViewer control in VS2005 I think has the the ability to do this.  Try this example code: http://gotreportviewer.com/EMFPrint.zip 
0
 

Author Comment

by:Paracom_Inc
ID: 18775455
OK. The sample code works, but it includes the creation of a DataTable to use as the DataSource for the report. My report already works with the ReportViewer control for showing the report. I would like to be able to use the existing DataSource and DataSet defined in the report so that I don't create a maintenance issue by having this code in two places. If I don't add a populated table to the report's DataSources collection I get an error: A data source instance has not been supplied for the data source \"dsMain\". dsMain is the name of the DataSource defined in the report. Is there a way that I can cause this dataset to be populated for the report just like it is when the ReportViewer control displays the report?
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question