This is a migrated thread and some comments may be shown as answers.

Hide Subreport

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jack Helfrich
Top achievements
Rank 1
Jack Helfrich asked on 04 Feb 2015, 09:34 PM
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Hinata
Top achievements
Rank 1
answered on 09 Feb 2015, 02:35 PM
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.
Tags
General Discussions
Asked by
Jack Helfrich
Top achievements
Rank 1
Answers by
Hinata
Top achievements
Rank 1
Share this question
or