how to create crystal reports in .net

Answer Posted / santosh kumar

Firstly Create report. Then use crystal report viewer that
will be docked or normal view in any form.

U have to create object of created report and form that
contain report viewer.

dim crp_MyReport= new crp_ReportTest
Dim frm_Viewer=new frm_ViewerTest
If u want to pass parameter
dim parameter system.crystaldecision.shared.parameter
dim parameters system.crystaldecision.shared.parameters
dim parameters=crp_myreport.parameters
for each parameter in parameters
select .parameterfieldname
case "parametername1"
.currentvalue.addvalue(value)
end case
next
frm_viewer.crv_viewer.refresh()
frm_viewer.crv_viewer.reportsource=crp_Myreport
frm_viewer.show()

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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....

2550


How do you add a subreport to a report in Crystal Reports?

811


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?

736


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?

782


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?

720






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

767


Why do we use crystal reports when we have reporting tools in bo itself?

796


Kindly Help for this Below Scenario, I am going to implement Power BI into our internal software. I’m familiar with the fact that each user can pay $9.99 a month to build and view reports but what I need to know is how can we embed Power BI into our application so that any users that log into our application can see the reports without the monthly fee. I’ve researched enough that it can be done. What I am not familiar with is how to do it or the pricing of embedding it into an application. I think they do pricing on how many renders you do or something. Would you be able to look into how we could embed it into our software and the cost?

1494


How can we improve the performance of a crystal report?

796


If we create reports in Crystal Reports using the UCAR Data Warehouse database, which tables should be used?

2354


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

719


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

755


Explain basic steps required to display a simple report in crystal?

760


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..

3301


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

787