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

Poco/ObjectDataSource and table questions

1 Answer 73 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 2
Andrew asked on 05 Oct 2011, 01:44 PM
I'm evaluating reports and I'm stuck. I need to generate a report over multiple days gathering data from csv files. My plan is to read in all the data and parse it into classes. From there I create a reportbook and add a report per day. On the report I would like to show something like the attached image.

http://www.telerik.com/ClientsFiles/304709_example-report.png

Here are the two data models I was planning to use.

public class IntervalApproachModel
{
    public IntervalApproachModel()
    {
        Northbound = new ApproachCountModel();
        Eastbound = new ApproachCountModel();
        Southbound = new ApproachCountModel();
        Westbound = new ApproachCountModel();
        Unassigned = new ApproachCountModel();
    }
 
    public DateTime Time
    {
        get;
        set;
    }
 
    public ApproachCountModel Northbound
    {
        get;
        set;
    }
 
    public ApproachCountModel Eastbound
    {
        get;
        set;
    }
 
    public ApproachCountModel Southbound
    {
        get;
        set;
    }
 
    public ApproachCountModel Westbound
    {
        get;
        set;
    }
 
    public ApproachCountModel Unassigned
    {
        get;
        set;
    }
}
 
    public class ApproachCountModel
    {
        public ApproachTypes ApproachType
        {
            get;
            set;
        }
 
        public int Left
        {
            get;
            set;
        }
 
        public int Right
        {
            get;
            set;
        }
 
        public int UTurn
        {
            get;
            set;
        }
 
        public int Through
        {
            get;
            set;
        }
 
        public int Peds
        {
            get;
            set;
        }
 
        public int Total
        {
            get
            {
                return Left + Right + UTurn + Through + Peds;
            }
        }
    }

When I create the report I call a setup method that takes a model with all the count data for the date. When the report calls the NeedDataSource event I parse the data into time slices and fill an IntervalApproachModel with all the counts during that time slice. I set the data source to a list of IntervalApproachModels.

I was trying to use a crosstab but I can't seem to get it to appear like the image. Is this the correct way to achieve my goal? How can I set up the crosstab to display correctly?

1 Answer, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 2
answered on 06 Oct 2011, 01:18 PM
Nevermind, I got it to work finally.
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 2
Answers by
Andrew
Top achievements
Rank 2
Share this question
or