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

What all performance improvement techniques used in crystal reports? (Particularly cr xi)?

0 Answers  


how can we convert crystal dictionary dc5 file to another datasource format like mdb or xml schema

0 Answers   CSC,


Reports can be optimized for web viewing using which of the following strategies: a. Using subreports instead of linking tables b. Avoiding maps c. Using the Page N of M special field to help users understand how many pages are in the report d. Saving reports as version 10 e. Avoiding reports with drill-down capabilities

2 Answers  


hi.. i've one crystal report. i want the report header as "employee database". i dont want to right click->insert and goto text object and insert. i've one aspx page and aspx.cs page also. now i want the "employee database" header to be printed from .cs file. i dont want to pass by parameter also.. i.e is there any option in .cs file something like ReportDocument myreport = new ReportDocument(); myreport.Load(MapPath("~/" + "emp.rpt")); myReport.Reportheader="Employee database"; i hope u have understood this. only thing is from .cs file i want to print the header as employee database. i dont want by passing parameter also... please help....

0 Answers  


What are field expressions and what are the diff types? (I looked this up in the internet and never found anything with regards to types of field expressions)?

0 Answers  






How can i normalize a Crystal Report..??

0 Answers   HCL,


Is there a way to export the report formulas, like totals to excel?

3 Answers  


How to conditionally suppress a field based on whether a page number is odd or even?

3 Answers  


Can anyone help me with an answer to this question? Where is the image located, after you've placed it on the report?

2 Answers  


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  


Explain reporter footer contents are move depend the page footer values?

0 Answers  


How to open subreport in new ie window using hyperlink button. I used target=new; in the formula field. But it overrides the main window and show the report?

0 Answers  


Categories