• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3106
  • Last Modified:

turn off warning "not CLS-compliant"



I get this error over and over: Return type of function 'ReportHeaderSection1' is not CLS-compliant

is there a way to turn this warning off?

What does it mean?
0
brokeMyLegBiking
Asked:
brokeMyLegBiking
  • 5
  • 3
1 Solution
 
Bob LearnedCommented:
What is this in relation to?  Crystal Reports?  Where is 'ReportHeaderSection1' defined?

Bob
0
 
brokeMyLegBikingAuthor Commented:
I get this warning for Crystal Reports and also for some ReportViewer objects. Mostly for Crystal reports.

Does Crystal Reports not conform to the CLS standard?
0
 
Bob LearnedCommented:
1) Crystal Reports version?

2) http://msdn2.microsoft.com/en-US/library/x97t56y6.aspx

3) .NET version?

Bob
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
brokeMyLegBikingAuthor Commented:
ok, that is a good explination, unfortunately, in the project properties, there is no way to turn off this particular warning.

I have 9 conditions on the compile tab of the project properties page, but none of them is CLS related.
0
 
Bob LearnedCommented:
That didn't quite answer all the questions.  If you can give me more information, I can ask my Crystal Reports friends if they have seen that exception.

Bob
0
 
brokeMyLegBikingAuthor Commented:
crystal reports 10

2 does addresses the issue, yes, that was helpful.

3) .net 2.0
0
 
Bob LearnedCommented:
1) Is this a single report giving you this error or every report?

If it's a single report you can probably open the [reportname].vb module that Visual Studio creates (it's just a class wrapper for the report) and go to the ReportHeaderSection1 Property and debug further.  In .Net 1.1 it should be returning a value of the type: CrystalDecisions.CrystalReports.Engine.Section  - I assume it hasn't changed in .Net 2.0 but I haven't verified that.

I've seen the CrystalDecisions.CrystalReports.Engine reference lose its binding in Visual Studio on occassion, for reasons I cannot explain.  Removing the reference from my project and re-adding it again seems to correct the binding and eliminates the compile errors that had been found.  Since that's the dll that contains the return type for the section in question this may be worth a few seconds to attempt.

2) Can you share a code snippet on your process to load the Crystal report?

Bob
0
 
Bob LearnedCommented:
I didn't notice that you accepted my comment above.  Did you find a solution?

Bob
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now