Print Page | Close Window

Missing Report Parameters for .Net

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22102
Printed Date: 25 Apr 2024 at 7:12am


Topic: Missing Report Parameters for .Net
Posted By: JonQI
Subject: Missing Report Parameters for .Net
Date Posted: 29 Sep 2016 at 1:40am
I have moved from a c++ library version to Crystal Reports .Net components at Version=13.0.2000.0

I display a preview image of a report or opt to print the report, this also displays a preview of the report.

Both options still work (.net) when I add the known Parameters I need to supply whilst creating the document.

The c++ version handled parameters we did not supply by displaying the parameter entry dialog and went on to work fine once parameters were entered.

However, since going to .Net the 'preview' route still behaves the same way, but the 'print' route now displays the 'Missing parameter values' message.

Both options load parameters and set printer settings etc through the same code in the same order. The big difference, I guess, is that the print is done through CrystalDecisions.CrystalReports.Engine.ReportDocument's
.PrintToPrinter(printerSettings, pSettings, false, PrintLayout) method.

I am wondering if there is anything extra I have to do for the .Net version, perhaps the PrintToPrinter method does not do all all that is required to handle parameter data not yet provided.

I would appreciate any help on this. I'm not having any success finding examples of pertinent to this or any helpful documentation.

Thanks in advance.



Replies:
Posted By: hilfy
Date Posted: 03 Oct 2016 at 6:23am
As you've discovered, PrintToPrinter doesn't pull up the Parameter prompts. So, you will have to set the remaining parameters in your code by providing a screen so that the users can enter the remaining parameter values. Or you can remove the direct print functionality and force the users to use the preview which will prompt for the remaining parameters.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window