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

hi...to all i want to generate the two crystal reports one is employee and another is project. now i want to display the two reorts in a single crystal report viewer. i've tried using sub-reports but the page header is not avaliable in a sub reports.. so i want to display two separate crystalreports in a single viewer.. can anybody help me.. plz

1 Answers  


hi... i've two crystal reports one is in D: drive name employee.rpt with 5 textobject and another report is in E: drive name employee.rpt with 15 textobject... now i want to write a program to overwrite the D drives report with E drives reports i.e i want to replace the 5 textobject with 15 textobject.. overwriting the reports while it is executing .. is there any code for it please help me.. its urgent..

0 Answers  


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

0 Answers   CSC,


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

0 Answers  


Can we call or add subreport within subreport?

10 Answers  






How to refresh the crystal report from the application ?

6 Answers   Satyam,


Is there a way to be able to change an image(company logo) dynamically in a report? Example if you have 100 reports, and with the market uncertainty if you anticipate that the company logo might change, how can you change the image just in one place and have this reflected in all the reports at run time?

0 Answers  


hi.. i've created one crystal report. and one global resource file .. in crystal report there's one text object with id Text1. and i want to take the values of resource file i've got it CrystalDecisions.CrystalReports.Engine.TextObject Dtemp1 = ((CrystalDecisions.CrystalReports.Engine.TextObject)myreport .ReportDefinition.Sections["section1"].ReportObjects["Text1" ]); Dtemp1.Text = Resources.Resource.ResourceManager.GetString("Dsec1"); it is showing the correct value want i want but when i give print it is disappearing.. how to solve this please help me..

0 Answers  


How the data expert of flash object(after inserting flash object_right click-data expert) is useful in crt?

0 Answers  


What are Crystal Reports and Crystal Reports Explorer?

1 Answers  


what is the "refresh" button suppose to do on the crystal report viewer?

2 Answers  


Is it possible to join more than one universe in Busniess Objects BOE XI ? If its so Please explain how is that possible ? Thanks in advance for the people posting the answers

3 Answers   Wipro,


Categories