By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,028 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,028 IT Pros & Developers. It's quick & easy.

Error When using Crystal Reports: 'C' is not accessible in this context because it is 'Private'.

P: n/a
I keep getting this error and i dont know how 2 fix it. If someone knows
how, please tell me :D

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: BC30389: 'C' is not accessible in this context
because it is 'Private'.

Source Error:
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <form id="Form1" method="post" runat="server">
Line 14: <cr:CrystalReportViewer id=CrystalReportViewer1 style="Z-INDEX:
101; LEFT: 16px; POSITION: absolute; TOP: 16px" runat="server" Width="966px"
Height="977px" ReportSource="<%# C:\Inetpub\wwwroot\personeel\World Sales
Report.rpt %>" SelectionFormula="{Customer.Last Year's Sales}>0">
Line 15: </cr:CrystalReportViewer>
Line 16: </form>
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Richard,

From your description, you encountered the
================
Compiler Error Message: BC30389: 'C' is not accessible in this context
because it is 'Private'.
================
compile error when try running the asp.net web page which has contained a
crystal report Viewser in it ,yes?

based on the checking in the Source you provided, I think the error is
likely due to the following setting in the page source:
=========================
<cr:CrystalReportViewer id=CrystalReportViewer1 style="Z-INDEX:
101; LEFT: 16px; POSITION: absolute; TOP: 16px" runat="server" Width="966px"
Height="977px" ReportSource="<%# C:\Inetpub\wwwroot\personeel\World Sales
Report.rpt %>" SelectionFormula="{Customer.Last Year's Sales}>0">
=========================

You set the absolute physical path of the report file on the server in the
<%# %> block , but you haven't used the quote "" to wrap the path , so when
complie the page, the asp.net will process it as a variable and get the
preceding error.
In addition, I recommend that you use the "Server.MapPath()" function to
get the physcial path of file from its virutal url path rather than
directly hard code the physical path in page source.
If you have any further questions, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.