Expert: Srini Nagarajan Date: 8/22/2005 Subject: Making Reports in C#
Question -------------------------
Followup To
Question -
Hi
I am a beginner at C# programming.
I have a small project with a dataset connected to a sql server database.everything is good.
but I want to create some simple report, and I have installed crystal report 9.
I do this steps:
1- Add a crystal report Item to the project
2- Add a datasource to crystal report and create report in crystal report(and my report name is rpt1.rpt)
3- Add a crystal viewer control to the project
4- the problem is here:
I want to Just write the following two lines on my Forms load event handler.
but it shows these 3 errors:
1-Cannot find custom tool 'CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator' on this system.
2- The type or namespace name 'rpt1' could not be found (are you missing a using directive or an assembly reference?)
3- The custom tool 'CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator' failed while processing the file 'BookInsurance_ReportFirst.rpt'.
what is wrong?could you help me pleas?
Thanks.
Answer -
Hi
Where did you keep your 'BookInsurance_ReportFirst.rpt' file?
Happy Programming
-Srini
**********************************************
Dear Srini
thanks for your attention,
sorry,I've typed it wrong,please ignore error number3.I could correct it.
the main problem is number2 , where it can't detect rpt1 class.
what can i do?
thanks.
**********************************************
Answer Hi
Sorry for the delay
rpt1 custReport = new rpt1(); You can't use the rpt1 directly..