Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic calendar reports (Read 7481 times)
mustafa
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Aug 3rd, 2010
calendar reports
Aug 3rd, 2010 at 1:48pm
Print Post  
Hello,

I am now porting my salon reservation system to Silverlight. In the planner.net control I have a reporting module but not in the Silverlight scheduling control.

1. Can you give me example of using the Silverlight MindFusion.Reporting to print the schedule report.

2. Can I get discount if will be using this reporting control only with the schedule reports.

Thanks a ton,
Mustafa Koç
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: calendar reports
Reply #1 - Aug 3rd, 2010 at 2:57pm
Print Post  
The following simple report can print out a sequence of MindFusion.Scheduling items. Simply assign the Schedule.Items collection of your Calendar control as a DataContext of the report before running it.

Code
Select All
<r:Report x:Name="plannerReport">
      <r:Page>
            <r:Label Text="Scheduling Report" AutoSize="True" FontSize="20" />
            <r:DataRange Location="0,60" Size="100%,20" AlternatingBackground="AliceBlue">
                  <r:DataRange.HeaderTemplate>
                        <DataTemplate>
                              <r:ItemContainer Size="100%,20" Background="LightSteelBlue" r:Report.FontWeight="Bold">
                                    <r:Label Location="0,0" Size="10%,20" Text="#" />
                                    <r:Label Location="10%,0" Size="40%,20" Text="Subject" />
                                    <r:Label Location="50%,0" Size="25%,20" Text="Start Time" />
                                    <r:Label Location="75%,0" Size="25%,20" Text="End Time" />
                              </r:ItemContainer>
                        </DataTemplate>
                  </r:DataRange.HeaderTemplate>
                  <r:DataRange.ItemTemplate>
                        <DataTemplate>
                              <r:ItemContainer>
                                    <r:Label Location="0,0" Size="10%,20" Text="[RangeItemCurrent()]" />
                                    <r:Label Location="10%,0" Size="40%,20" Text="[HeaderText]" />
                                    <r:Label Location="50%,0" Size="25%,20" Text="[StartTime]" TextFormat="{}{0:dddd, MMMM dd}" />
                                    <r:Label Location="75%,0" Size="25%,20" Text="[EndTime]" TextFormat="{}{0:dddd, MMMM dd}" />
                              </r:ItemContainer>
                        </DataTemplate>
                  </r:DataRange.ItemTemplate>
            </r:DataRange>
      </r:Page>
</r:Report> 


The report can be vastly improved in many aspects. For example the report can be redesigned to print out resources and the individual items associated with them by using master-detail relationships.

Regarding the discount you should contact my colleagues at sales@mindfusion.eu.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
mustafa
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Aug 3rd, 2010
Re: calendar reports
Reply #2 - Aug 3rd, 2010 at 3:37pm
Print Post  
Hello,

Thanks for quick answer. My appointments are set for one custom Resource, for example tanning bed. Custom resource is named by the client. Can I display the appointment's one resource name in a column, on the same row where appointment is printed?

Best Regards,
Mustafa Koç
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: calendar reports
Reply #3 - Aug 4th, 2010 at 6:33am
Print Post  
This is possible through the use of an embedded DataRange object. The following code illustrates the modified report:

Code
Select All
<r:Report x:Name="plannerReport">
	<r:Page>
		<r:Label Text="Scheduling Report" AutoSize="True" FontSize="20" />
		<r:DataRange Location="0,60" Size="100%,20" AlternatingBackground="AliceBlue">
			<r:DataRange.HeaderTemplate>
				<DataTemplate>
					<r:ItemContainer Size="100%,20" Background="LightSteelBlue" r:Report.FontWeight="Bold">
						<r:Label Location="0,0" Size="10%,20" Text="#" />
						<r:Label Location="10%,0" Size="30%,20" Text="Subject" />
						<r:Label Location="40%,0" Size="20%,20" Text="Start Time" />
						<r:Label Location="60%,0" Size="20%,20" Text="End Time" />
						<r:Label Location="80%,0" Size="20%,20" Text="Tanning bed" />
					</r:ItemContainer>
				</DataTemplate>
			</r:DataRange.HeaderTemplate>
			<r:DataRange.ItemTemplate>
				<DataTemplate>
					<r:ItemContainer>
						<r:Label Location="0,0" Size="10%,20" Text="[RangeItemCurrent()]" UseDesignOrder="True" />
						<r:Label Location="10%,0" Size="30%,20" Text="[HeaderText]" UseDesignOrder="True" />
						<r:Label Location="40%,0" Size="20%,20" Text="[StartTime]" TextFormat="{}{0:dddd, MMMM dd}" UseDesignOrder="True" />
						<r:Label Location="60%,0" Size="20%,20" Text="[EndTime]" TextFormat="{}{0:dddd, MMMM dd}" UseDesignOrder="True" />
						<r:DataRange r:Name="ResourceRange" Location="80%,0" Size="20%,20" UseDesignOrder="True">
							<r:DataRange.ItemTemplate>
								<DataTemplate>
									<r:ItemContainer>
										<r:Label Location="0,0" Size="100%,20" Text="[Name]" />
									</r:ItemContainer>
								</DataTemplate>
							</r:DataRange.ItemTemplate>
						</r:DataRange>
					</r:ItemContainer>
				</DataTemplate>
			</r:DataRange.ItemTemplate>
		</r:DataRange>
	</r:Page>
</r:Report> 


To provide details for the embedded data range, handle the QueryDetails event and use the following as content of the event handler:

Code
Select All
var range = s as DataRange;
if (range != null)
{
	if (range.Name == "ResourceRange")
	{
		Item master = args.MasterRow as Item;
		args.Details = master.Resources;
	}
} 


Let me know if this works.

Regards,
Meppy
  
Back to top
 
IP Logged
 
mustafa
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Aug 3rd, 2010
Re: calendar reports
Reply #4 - Aug 4th, 2010 at 7:32am
Print Post  
It works! Thanks!

Best Regards,
Mustafa Koç
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint