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

Discussion in 'ASP .Net' started by Richard, Jul 26, 2004.

  1. Richard

    Richard Guest

    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>
     
    Richard, Jul 26, 2004
    #1
    1. Advertising

  2. 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
     
    Steven Cheng[MSFT], Jul 27, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack Wright
    Replies:
    3
    Views:
    1,658
    Chris Jackson
    Jan 5, 2004
  2. Murphy
    Replies:
    6
    Views:
    4,876
    Murphy
    Apr 20, 2004
  3. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    ItemTypes' is not accessible in this context because it is 'Privat

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,037
    Martin Dechev
    Oct 5, 2004
  4. Peri
    Replies:
    1
    Views:
    3,088
    =?Utf-8?B?Um90aGFyaWdlcg==?=
    Jul 21, 2005
  5. Murphy
    Replies:
    2
    Views:
    272
    Murphy
    Apr 26, 2004
Loading...

Share This Page