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

CrossTab Calendar View

8 Answers 160 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amir
Top achievements
Rank 1
Amir asked on 17 Mar 2011, 07:08 AM
Hi

I want to create a Calendar report wich shows the teacher names and Class time and the student who in that class as shown in the attached file which is a mockup of what I tend to have.



Thank you

8 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 28 Mar 2011, 03:04 PM
Hello Amir,

You can create a time sheet reports with our Crosstab item. Just follow the steps:
  1. Set up a Column Group for the Teachers and a Row Group for the time.
  2. To display the subjects you have to nest them in a Crosstab cell Panel - List - Textbox
  3. Set the List.DataSource with Bindings to the =ReportItem.DataObject expression
Check out the CrossTab Wizard. It is introduced as guide through the process of creating a CrossTab for your reports. Their intuitive step by step instructions would get you going in no time as no previous experience is needed when using the wizards.

I have attached a sample report to illustrate the above approach.

Regards,
Peter
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Amir
Top achievements
Rank 1
answered on 02 Jun 2011, 04:18 AM
Hi Peter
Thank you for the reply it seems it should do what I expected, but the problem is when i bound the datasource of list to =ReportItem.DataObject   I get an error which is "Index was outside the bounds of the array."
Is there any way to fix this problem?

Regards,
Amir
0
Steve
Telerik team
answered on 03 Jun 2011, 02:07 PM
Hello Amir,

Where is the List item placed i.e. what is its parent? The ReportItem keyword is evaluated at runtime to the Data Item in which context the data source is used i.e. in our case Table item. The DataObject keyword specifies the data context in which the current data item is executed (which is what we need to know).

Greetings,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Amir
Top achievements
Rank 1
answered on 07 Jun 2011, 04:50 AM
Hi Steve
Thank you for the reply. I have attached 2 snapshot which shows my current situation.
As it is shown in first picture I created a crosstab and grouped the column by Teacher ID(TID) and the row by SessionTime(StartTime) then I add an event (needDataSource) which can be seen in second picture.
I also added a list in the gray cell of cross tab(as you suggested in previous posts)  and add another textbox which should show the student's name (can be up to 5 student per session).
First I added the ReportItem.DataObject from the properties section and i got  "Index was outside the bounds of the array."  I add it at the end of my NeedDataSource Event and i still get the same error
As you see in snapshot 2 I also add a Parent to the ReportItem.DataObject but it didn't change anything

Please let me know if you need more detail.
Thank you in advance for your kind help
Amir
0
Peter
Telerik team
answered on 08 Jun 2011, 04:42 PM
Hi Amir,

We have noticed in the provided code snippet that you had used the Report Parameter definition item instead of the processing counterpart. The definition report parameter value is actually the default value. The sender of the event is always the processing counterpart of the data item and you can use it to access the processing report parameter. For more information check out the Using Report Parameters programmatically. Additionally in the report's ItemDataBinding you cast the sender to Telerik.Reporting.Processing.Table but the sender of the event is always the processing counterpart of the data item in this case Telerik.Reporting.Processing.Report. If you need only Telerik.Reporting.Processing.Table you should handle table.ItemDataBinding.

Still based on the provided code we don't find any reason to use events for providing datasource to the report. Instead our suggestion is to utilize our Data Source Components. If your reports display data from a database, we suggest using the SqlDataSource component that is designed to work especially with Telerik's reporting engine moreover the datasource components offer design time support for parameters. For more information and example check out the Using Stored Procedures in Telerik Reporting with the SqlDataSource Component video.

Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Amir
Top achievements
Rank 1
answered on 09 Jun 2011, 05:04 AM
Hi
Thank you for the fast reply
I have changed the whole report and used the standard way as shown in attached snapshots(2 and 3). and the result looks like snapshot 1 shows the result which is not what I am after

Questions:
1- is there anyway to create a report like i explained in my first Post (basically a day including some sessions and each sessions has some students in it )

2- if the answer of first question is yes, how can I show only students related to that specific session(which is grouped by teacher and startTime) in the list ? I already used the filter as follow
            =ReportItem.Parent.DataObject .TID = =Fields.TID
AND     =ReportItem.Parent.DataObject .StartTime = =Fields.StartTime
but it does not work

Thank you again
Amir
0
Peter
Telerik team
answered on 13 Jun 2011, 01:49 PM
Hi Amir,

Your scenario is possible as I have shown in the attached sample in my first post. Have you placed a Panel item in the cell and nest the List item in it? The Panel item is required to evaluate correctly the ReportItem at runtime to the Data Item in which context the data source is used i.e. in our case Crosstab item. Please check out the sample I have attached in my first post and elaborate if you experience any troubles with it.

Additionally we will appreciate if you elaborate on the version of Telerik Reporting you use.

Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Amir
Top achievements
Rank 1
answered on 28 Jun 2011, 04:35 AM
Hi Peter

As soon as I added Panel item in the cell and nest the List item in it, the problem is solved.

Thank you very much for your kind help and good support.
Amir
Tags
General Discussions
Asked by
Amir
Top achievements
Rank 1
Answers by
Peter
Telerik team
Amir
Top achievements
Rank 1
Steve
Telerik team
Share this question
or