BC30389: C is not accessible in this context because it is Private.
I have made a web application and m using crystal reports for the reports.
But when i run the application i get the following error:
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 15: <form id="Form1" method="post" runat="server">
Line 16: <uc1:NavigatewithoutFooter id="NavigatewithoutFooter1" runat="server"></uc1:NavigatewithoutFooter>
Line 17: <CR:CrystalReportViewer id=CrystalReportViewer2 style="Z-INDEX: 101; LEFT: 80px; POSITION: absolute; TOP: 176px" runat="server" DisplayGroupTree="False" ReportSource="<%# C:\Inetpub\wwwroot\DTS\Reports\rptWorkProductWiseDefectsDetected.rpt %>" Height="1073px" Width="773px">
Line 18: </CR:CrystalReportViewer>
Line 19: </form>
Source File: http://localhost/DTS/Screens/frmWorkProductWiseDefectsDetected.aspx Line: 17
I have given all rights to ASPNET user and Everyone on my C: drive.
Pls Help in finding the answer..
[1327 byte] By [
Protocool] at [2007-11-11 6:42:26]

# 1 Re: BC30389: C is not accessible in this context because it is Private.
The ReportSource property should not be a fully-qualified path; it should be a relative path from the root folder of your application. So, if your app is in the wwwroot\DTS folder, ReportSource should simply be "/Reports/rptWorkProductWiseDefectsDetected.rpt".
Also, I don't think you should have data-binding tags (<%# %>) around the ReportSource value. It should simply read: ReportSource="/Reports/rptWorkProductWiseDefectsDetected.rpt"
# 2 Re: BC30389: C is not accessible in this context because it is Private.
Hey thanx!
It is working now..
Just changed the reportsource path and put the path inside the <%# %> tag inside ""
so the reportsource now reads.
<cr:CrystalReportViewer id="CrystalReportViewer2" style="Z-INDEX: 101; LEFT: 80px; POSITION: absolute; TOP: 208px" runat="server" DisplayGroupTree="False" ReportSource='<%# "C:\inetpub\wwwroot\DTS\reports\rptCategoryCauseWiseDefects.rpt" %>' Height="1073px" Width="773px">
</cr:CrystalReportViewer>
Thanx a lot for the help..