|
-
Sep 29th, 2010, 05:11 AM
#1
Thread Starter
Junior Member
without saving the pdf file showing the print preview
hi ...
i've created one crystal report in windows form and one crystalreportviewer ..
the following is my code..
in form1.cs file
try
{
ExportOptions CrExportOptions;
DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
CrDiskFileDestinationOptions.DiskFileName = "c:\\csharp.net-informations.pdf";
CrExportOptions = cryRpt.ExportOptions;
{
CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
CrExportOptions.FormatOptions = CrFormatTypeOptions;
}
cryRpt.Export();
}
the above code is saving the file into pdf into specified path..
but i dont want to save a file i should get direct print preview and
have a option to print ..
As we do in web application using crystal report viewer clicking print
and report will be opened in pdf.. and the click print..
i want the same function as we do in web application...
i'm writing code in c#.net if the code is vb also its ok
hope the above explaination will be understood clearly..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|