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

print scheduler with all data on it

10 Answers 119 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 27 Sep 2013, 03:09 PM
I'm having problems printing the scheduler with all resources on it.  I have a day view scheduler with 6 resources.  you can see 4 on the screen and then have to scroll right to see the other 2.  
when i print the scheduler i have 2 issues. 
1.  only the visible page of the first 4 resources show on the printout.  I need all 6
2.  how do i get the actual resource columns to show on the printout?  right now i only see the appointments.

Thanks!

10 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 02 Oct 2013, 01:56 PM
Hi John,

Thank you for contacting us.

In order to show all the resources you need to change the End Date in the Print Settings Form (see settingsForm.png), this dialog can be accessed from the PrintDialog (see settingsButton.png).

You can also group by Resource from that same Print Settings Form, this will show the resources also.

I hope this helps.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
John
Top achievements
Rank 1
answered on 02 Oct 2013, 02:32 PM
Thanks George.  I'm using all code to do the printout, but i found the properties from your shots in code.  That gets me closer.

I have a couple issues now i need help with please.

1.  each resource gets its own page when i group by resources.  How do i get them all on 1 page, or say something like 4 per page if there's a bunch?

2.  I use the telerik markup text stuff to show text on the appointments.  When printed it shows as the markup not the colored/formatted text like the scheduler shows.  see the example image upload.  how do i fix that.

3.  how do i make the print out match the number of divisions on the hour schedule.  for example, the printout is by 1/2 hours, but my schedule lines are by 1/4 hours.  The schedule shows the first 2 appointments correctly, one's from 8 to 845 the other 845 to 10 but the print out overlaps them.  see the example for this too.

Thanks!
0
Accepted
George
Telerik team
answered on 07 Oct 2013, 08:34 AM
Hello John,

Thank you for contacting us.

Regarding your first question we have a feature request in our Public Issue Tracking System. You can find it at http://www.telerik.com/support/pits.aspx#/details/Issue=13538. Feel free to add your vote in order to increase its priority.

As for your second question I have added a new bug report. You can find it on the following URL - http://www.telerik.com/support/pits.aspx#/public/winforms/15889. As a workaround for the time being, you can strip the html tags:
void scheduler_AppointmentPrintElementFormatting(object sender, PrintAppointmentEventArgs e)
{
    string replaceBr = e.AppointmentElement.Text.Replace("</br>", " ");
    string result = Regex.Replace(replaceBr, @"<[^>]*>", string.Empty);
    e.AppointmentElement.Text = result;
}

We also have a bug already reported regarding your third question - http://www.telerik.com/support/pits.aspx#/details/Issue=15198. Meanwhile you can handle the CellElementPaint method and customize your TimeScale. In the sample code below I have implemented a 30 minutes TimeScale:
private void dailyStyle_CellElementPaint(object sender, PrintSchedulerCellPaintEventArgs e)
{
    Rectangle bounds = e.Bounds;
    if (bounds.X == 100 && bounds.Width == 40)
    {
        using (Pen pen = new Pen(Color.Black))
        {
            Point p1 = new Point(bounds.X, bounds.Y + bounds.Height / 2);
            Point p2 = new Point(bounds.X + bounds.Width , bounds.Y + bounds.Height / 2);
            e.Graphics.DrawLine(pen, p1, p2);
        }
  
        using (StringFormat format = new StringFormat())
        {
            using (SolidBrush brush = new SolidBrush(Color.Black))
            {
                format.Alignment = e.CellElement.GetHorizontalAlignment(e.CellElement.TextAlignment);
                format.Alignment = e.CellElement.GetHorizontalAlignment(e.CellElement.TextAlignment);
                format.LineAlignment = e.CellElement.GetVerticalAlignment(e.CellElement.TextAlignment);
                format.Trimming = e.CellElement.StringTrimming;
                format.FormatFlags = e.CellElement.StringFormatFlags;
  
                Padding padding = e.CellElement.TextPadding;
                if (padding != null)
                {
                    bounds.X += padding.Left;
                    bounds.Y += padding.Top;
                    bounds.Width -= padding.Horizontal;
                    bounds.Height -= padding.Vertical;
                }
                Rectangle rect = new Rectangle(bounds.X, bounds.Y + bounds.Height / 2, bounds.Width, bounds.Height);
                TimeSpan time = TimeSpan.Parse(e.CellElement.Text);
                time = time.Add(new TimeSpan(0, 30, 0));
                e.Graphics.DrawString(string.Format("{0}:{1}", time.Hours.ToString("00"), time.Minutes), e.CellElement.Font, brush, rect, format);
            }
        }
    }
}

Your Telerik Points were updated in accordance with your report.

Let me know if I can help you further.
 
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
John
Top achievements
Rank 1
answered on 08 Oct 2013, 05:03 PM
Thanks again George.  My appointments still aren't aligned though using your solution for #3.  in my original example the appointments were at 815 and 845but the schedule shows them at 830 for appt 2 and 8 for appt 1 and overlaps them.  i got my schedule time scale like i need now, but the appointments don't reflect the real time they're at still.

0
George
Telerik team
answered on 11 Oct 2013, 10:59 AM
Hello John,

Thank you for replying.

On my end appointments appear on the right place. I also tried to set their end to be at HH:45 or HH:15, however they were still not overlapping or anything of this sort. Please refer to the below image for reference.

Let me know If I can be of further assistance.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
John
Top achievements
Rank 1
answered on 11 Oct 2013, 11:49 AM
George, your screen shot has them all at perfect 1/2 hours that's the problem.

add 2 appointments, both on the same resource.  one at 815 and ending at 845.  another at 845 ending at 930 and then print the schedule.  they do not come out right.  On the print out they print at 8 to 9 and 830 to 930 like the attachment i provided.  that is not correct, they should print out at the same time as they are on the schedule.
0
George
Telerik team
answered on 16 Oct 2013, 11:28 AM
Hello John,

Thank you for writing.

By default the scheduler is rounding the time, to achieve the behavior you desire you would need to create your own PrintStyle. Below you can find attached a .cs file with the class in it. You can replace the print style as follows:
this.scheduler.PrintStyle = new MyPrintStyle();

I have also logged a new feature request in order to allow easy access to the print methods. You can find the request at - http://www.telerik.com/support/pits.aspx#/public/winforms/15944.

Your Telerik Points were once again updated accordingly.

I hope this will help you to achieve the desired effect.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
John
Top achievements
Rank 1
answered on 04 Nov 2013, 09:22 PM
Thanks that worked great.
0
Bert
Top achievements
Rank 1
answered on 12 Jun 2019, 07:52 AM
Is it possible in the latest version of the Radscheduler to print the appointments on their exact start time or will there still be some overlap due to the rounding of the time as described in the case above?
0
Hristo
Telerik team
answered on 13 Jun 2019, 10:52 AM
Hi Bert,

The feature is still not implemented. Here is the correct link on the new feedback portal: ADD. RadScheduler - add exact time rendering when printing. A possible solution is to use the custom print style already attached in the thread. The attached custom implementation inherits the abstract SchedulerPrintStyle class which will cause an error if it is used with the latest assemblies. In order the avoid the error the custom print style should inherit any of the other not abstract print styles, e.g. the SchedulerDailyPrintStyle class: 
public class MyPrintStyle : SchedulerDailyPrintStyle
{
    //...
}

I hope this will help.

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler and Reminder
Asked by
John
Top achievements
Rank 1
Answers by
George
Telerik team
John
Top achievements
Rank 1
Bert
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or