Hide Subreport

2 posts, 1 answers
  1. Jack Helfrich
    Jack Helfrich avatar
    10 posts
    Member since:
    Feb 2009

    Posted 04 Feb 2015 Link to this post

    I have been searched and read many forum posts on hiding subreports. The problem I am having is that all I see is the following code snippet:

     private void subReport1_ItemDataBound(object sender, EventArgs e) 
                Processing.SubReport subReport = (Processing.SubReport)sender; 
                Processing.Report detailReport = (Processing.Report)subReport.InnerReport; 
                Processing.Report mainReport = (Processing.Report)subReport.Report; 
                     mainReport.Visible = detailReport._filteredCount > 0; 

    I am assuming I put this code in the subreport cs file. However, when I add it, visual studio gives me "The type or namespace 'Processing' could not be found" error. Could someone please give me a more complete example (e.g. Do I need to add a using, and if so which one? Do I need to add a reference, and if so which one? Do I need to add event handlers?)?

    Thanks in advance for your help.
  2. Answer
    Hinata avatar
    146 posts
    Member since:
    Dec 2013

    Posted 09 Feb 2015 in reply to Jack Helfrich Link to this post

    Hi Jack,

    The error you get is due to missing Telerik.Reporting assembly.
    The whole namespace is called Telerik.Reporting.Processing. You might want to use the full name instead of adding a using.
    I guess the rest (declaring and subscribing to events) is clear.
Back to Top