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

public property in report class

1 Answer 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 10 Sep 2008, 01:39 PM
Hi,
This wont work! :(
ASPX:
protected void Page_Load(object sender, EventArgs e) 
        { 
            //Response.Write(TaskBL.GetSimpleReport(PageInfo.CurrentObjectId).Count.ToString()); 
 
            PPS.Report.SimpleTaskReport rep = new SimpleTaskReport(); 
            rep.ObjectId = PageInfo.CurrentObjectId; 
            ReportViewer1.Report = rep; 
 
        } 

REPORT.CS:
public partial class SimpleTaskReport : Telerik.Reporting.Report 
    { 
        public Guid ObjectId { getset; } 
 
        public SimpleTaskReport() 
        { 
            /// <summary> 
            /// Required for telerik Reporting designer support 
            /// </summary> 
            InitializeComponent(); 
 
             
            TaskBL taskBL = new TaskBL(); 
            this.DataSource = taskBL.GetSimpleReport(ObjectId); 
 
        } 

The report isn't showing any result.
(but the response.write says 14)

1 Answer, 1 is accepted

Sort by
0
Mattias
Top achievements
Rank 1
answered on 10 Sep 2008, 02:35 PM
Fixed! :)

Of course it didn't work, trying to get a property in the contructor!
Moved datasource to needdatasource event and now it works.

 
Tags
General Discussions
Asked by
Mattias
Top achievements
Rank 1
Answers by
Mattias
Top achievements
Rank 1
Share this question
or