on 06-28-2012 1:35 PM
Visual Studio 2005
Crystal Reports 2008 (12.4.0.966)
Trying to build my project which has a pdf that will be created via Crystal Reports. Getting the following error:
Error 1 The type or namespace name 'PrintPDF' could not be found (are you missing a using directive or an assembly reference?)
Line causing the error:
using (PrintPDF reportPrint = new PrintPDF())
{
...
}
The Crystal Report file is named PrintPDF.rpt.
I have the following references (that were added automatically upon creating an .rpt file):
CrystalDevisions.CrystalReports.Engine
CrystalDevisions.Enterprise.Framework
CrystalDevisions.Enterprise.InfoStore
CrystalDevisions.ReportSource
CrystalDevisions.Shared
My .cs file has the following includes:
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
Any ideas what is causing the error? This is a project that was built successfully 10 months ago but I had to make a few changes to the .rpt file and now it won't rebuild.
I'm using the same code in another project and it's building fine. To further show what's going on here, I have created a new .rpt (CrystalReport1.rpt) file in the project and I'm able to get it to recognize that file (along with the CrystalReportBillDetail.rpt and CrystalReportBillSummary.rpt files), however it doesn't recognize my PrintPDF.rpt or PrintPDFMulti.rpt files.
CR files:
CrystalReport1.rpt recognized:
PrintPDF.rpt (or PrintPDFMulti.rpt) not recognized:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kyle
There should be an actual physical copy of the PrintPDF.rpt and PrintPDFMulti.rpt files under your project directory. If you do find these, remove the references to those reports from your project:
Then re-add the files to the project.
Also, remove your references to:
CrystalDecisions.Enterprise.Framework
CrystalDecisions.Enterprise.InfoStore
These are not needed. And add a reference to crystaldecisions.web
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
I have removed the rpt files and re-added them and also removed the references and re-added them to no luck.
Upon further investigation, the reason that this isn't working is because my .rpt files aren't auto-generating anything in their .cs files. They're simply empty. So it's missing things like:
public class CrystalReportBillSummary : ReportClass {
public CrystalReportBillSummary() {
}
How do I get the .cs files to auto-generate like they're supposed to?
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.