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

hope the above explaination will be understood clearly..


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Crystal Reports Interview Questions

How to add Crystal Reports(Standalone) to my VB.NET project

2 Answers  


When looking at the join types in Crystal - what does it mean when you coose Enforce and Enforce To or Enforce From

3 Answers  


Where is the image located, after youve placed it on the report?

0 Answers  


How many sub-reports can report can have?

4 Answers   IBM,


What does it mean when we get the error message "Invalid report version" when try to open a Crystal Report?

3 Answers  






Is there a way to export a report definition without writing code?

2 Answers  


Is it possible to export crystal report with linked subreports in one excel sheet?If yes,then how?

4 Answers   IBM,


Suppose I have a crystal report with a linked subreport as well. Is there any way not to print the current record on the main report if no records are returned from the subreport?

0 Answers  


Where can we find the log file genertaed when we run a crystal report?

2 Answers   Microsoft, Wipro,


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 hope the above explaination will be understood clearly..

0 Answers  


One more interview question If I have the data where some columns have multiple values in a given row of data returned from the database. The stored procedure returns data as it is that is blanks values and non blank values. However, I need to suppress the blank values not by showing 0 values but by shifting the cells up. Is there a way using a formula to shift the blank cell one row up based on a selection critieria? In the example below, I want to get rid of the blank values under Exposure column without replacing with 0. example: Company Margin Exposure AB 500 3 10 7 8 ABC 200 4 2 5 10 Thanks Anita

5 Answers   Barclays,


How do we connect to the database?

6 Answers  


Categories