473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Printing Crystal Reports in a Windows Forms App

Hello,

I have an application that uses the version of CR.NET that came with VS.NET
2003. The CrystalReportViewer control prints the report fine when initiated
by the user on the form, but I have problems when I try to call PrintReport()
or PrintToPrinter(1, false, 1, 2).

Calling either meathod, I get the following error:

" '-1' is not a valid value for 'value'. 'value' must be greater than or
equal to 0. "

and blank reports print out.

I googled this error, but did not find any sites with my problem.

Has anyone here seen this?

Thanks in advance for your help,

Paul
Nov 22 '05 #1
2 3977
Don
Did you ever find an answer for this problem?
If so, I am having this problem and would like your help.

Thanks,
Don
Nov 22 '05 #2
I guess you give a reportdocument object to crystal report viewer as report
source. I got this error too, what I did was instead of using Print method
of the crystal report viewer using the "PrintToPrinter" method of the report
document. Like:

reportDocument.PrintToPrinter(1,false,0,0);

The methods takes the following parameters:
PrintToPrinter (int nCopies, bool collated, int startPage, int endPage)
Nov 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
1
by: DCraig | last post by:
I'm having problems printing to a line printer from both Crystal Reports and SQL Server reporting services using dotnet. When I try and print a report from an application with Crystal I get the...
9
by: Robert Schuldenfrei | last post by:
Hello NG, After a bit of a wait my bookstore, SoftPro of Waltham, MA, got in the Brian Bischof book: Crystal Reports .NET Programming. I have read a few books on CR, but I am very new to it,...
0
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the...
0
by: Nigel | last post by:
I successfully create a .NET Component (Visual Basic .NET) that would print, unfortunately when used within a web browser it appears that .NET security doesn't allow you to run code that interacts...
1
by: Dreamtime | last post by:
Hi I am using Visual Studio 2005 and the bundled Crystal Reports (previously I used .net 2003 and bundled Crystal Reports for 2 years - same issues!) I have a report which is displayed in the...
2
by: Diogo Alves - Software Developer | last post by:
Hi, I'm desesperate, for long 4 days that I am trying to deploy an application with crystal reports, and it fails... I checked the documentation and it says the merge modules necessary to...
2
by: Code Monkey | last post by:
I've just developed an Windows application that uses Crystal Reports (v10 ? - the version that ships with VS2005). Whilst the application works fine - reports can be viewed on the development...
0
by: John Smith | last post by:
Hello, I have 7 different crystal reports that need to be collated. Since I want to end up with a page of each (which all together make a single report), I created a blank main report and then...
0
by: Andy Baker | last post by:
All of the reports in our VB.NET 2003 application are printed on blank A4 paper, and Crystal Reports XI is used to create all the forms, logos etc on the report. We have a new user who wants to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.