Why do I get "Type of 'xxxxxxMethod' is not CLS-compliant" error

T

TS

This method has a return type of a
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument. I have
gotten this error before with a crystal object but i would think that it
would come complient from Crystal.

Does anyone know why i get this error?

thanks
 
L

Linda Liu [MSFT]

Hi,

Thank you for posting.

Microsoft only supports setup and installation for CrystalReport product
shipped with the Microsoft product.

I am sorry to say that this issue is out of the range of our support
service. Please contact Crystal Decisions (formerly Seagate Software),
which now owns and supports Crystal Report Writer.

Support for Crystal Reports is provided to registered users. To register
for Crystal Reports, visit the following Business Objects Web site:

http://www.businessobjects.com/register/content.asp

Registered users of Crystal Reports may obtain technical support for their
Crystal Reports product. To learn more about obtaining technical support,
visit the following Business Objects Web site:

http://support.businessobjects.com/

For information about developer-related support for Crystal Reports, visit
the following Business Objects Web site:

http://www.businessobjects.com/services/support/crystal_dev.asp

Thanks for your understanding and have a nice weekend!


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Bruce Wood

TS said:
This method has a return type of a
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument. I have
gotten this error before with a crystal object but i would think that it
would come complient from Crystal.

Does anyone know why i get this error?

You would have to post the method signature (definition) for us to see.

Remember that non-compliance can be something as simple of using an
unsigned type (ulong, ushort, etc) or having a parameter name begin
with an underscore. Non-CLS Compliant doesn't mean that it won't run
under the CLS; it just means that not every .NET language can call the
method because there's something about it that the syntax of other .NET
languages might not support.
 
T

TS

[CLSCompliantAttribute(false)]
public static ReportClientDocument ReportSourceInSession
{
get{ return SessionManager.GetSessionItem(Report.ReportSourceSessionKeyName)
as ReportClientDocument; }
}

note the ReportClientDocument class is named in the
CrystalDecisions.ReportAppServer.ClientDoc namespace.

also here:
[CLSCompliantAttribute(false)]
protected CrystalDecisions.Web.CrystalReportViewer crViewer;

and here:

[CLSCompliantAttribute(false)]
public void LoadCrystalViewer(Report report, CrystalReportViewer crViewer)

the Report class in the signature above is a custom class created in C# that
the first static property at the top is declared in.

The compiler won't compile without the CLS attributes i use and they seem to
all stem from the crystal assemblies.

thanks so much.
 
B

Bruce Wood

Hmm. I'm as stumped as you are. We need someone who understands CLS
compliance better than I do to explain this one....
[CLSCompliantAttribute(false)]
public static ReportClientDocument ReportSourceInSession
{
get{ return SessionManager.GetSessionItem(Report.ReportSourceSessionKeyName)
as ReportClientDocument; }
}

note the ReportClientDocument class is named in the
CrystalDecisions.ReportAppServer.ClientDoc namespace.

also here:
[CLSCompliantAttribute(false)]
protected CrystalDecisions.Web.CrystalReportViewer crViewer;

and here:

[CLSCompliantAttribute(false)]
public void LoadCrystalViewer(Report report, CrystalReportViewer crViewer)

the Report class in the signature above is a custom class created in C# that
the first static property at the top is declared in.

The compiler won't compile without the CLS attributes i use and they seem to
all stem from the crystal assemblies.

thanks so much.

Bruce Wood said:
You would have to post the method signature (definition) for us to see.

Remember that non-compliance can be something as simple of using an
unsigned type (ulong, ushort, etc) or having a parameter name begin
with an underscore. Non-CLS Compliant doesn't mean that it won't run
under the CLS; it just means that not every .NET language can call the
method because there's something about it that the syntax of other .NET
languages might not support.
 
T

TS

thanks for trying Bruce. I have seen something along the lines of it being
the actual assembly from crystal that is non-compliant, so i guess there's
nothing more to do...except move to Reporting Svcs :)

Bruce Wood said:
Hmm. I'm as stumped as you are. We need someone who understands CLS
compliance better than I do to explain this one....
[CLSCompliantAttribute(false)]
public static ReportClientDocument ReportSourceInSession
{
get{ return
SessionManager.GetSessionItem(Report.ReportSourceSessionKeyName)
as ReportClientDocument; }
}

note the ReportClientDocument class is named in the
CrystalDecisions.ReportAppServer.ClientDoc namespace.

also here:
[CLSCompliantAttribute(false)]
protected CrystalDecisions.Web.CrystalReportViewer crViewer;

and here:

[CLSCompliantAttribute(false)]
public void LoadCrystalViewer(Report report, CrystalReportViewer
crViewer)

the Report class in the signature above is a custom class created in C#
that
the first static property at the top is declared in.

The compiler won't compile without the CLS attributes i use and they seem
to
all stem from the crystal assemblies.

thanks so much.

Bruce Wood said:
TS wrote:
This method has a return type of a
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument. I
have
gotten this error before with a crystal object but i would think that
it
would come complient from Crystal.

Does anyone know why i get this error?

You would have to post the method signature (definition) for us to see.

Remember that non-compliance can be something as simple of using an
unsigned type (ulong, ushort, etc) or having a parameter name begin
with an underscore. Non-CLS Compliant doesn't mean that it won't run
under the CLS; it just means that not every .NET language can call the
method because there's something about it that the syntax of other .NET
languages might not support.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top