Export to PDF question

9 posts, 0 answers
  1. Yelena
    Yelena avatar
    14 posts
    Member since:
    Jan 2013

    Posted 15 Mar 2013 Link to this post

    I use ExporttoPDF feature and follow the demo.
    I included 2 buttons on the page - server side events. 
    One button just simple RadScheduler1.ExportToPdf() statement
    Second button is the function to bind data to radgrid and then export grid to PDF

    <asp:Panel ID="customButtons" runat="server" BorderStyle="None" BorderColor="#FFFFFF">
     
     <telerik:RadButton ID="RadButton2PDF" runat="server" Text="Export to PDF" OnClick="RadButton2PDF_Click" ><Icon PrimaryIconUrl="../Images/PDF.gif"/></telerik:RadButton >
     
     <telerik:RadButton ID="Button2Print" runat="server" Text="Print the schedule" OnClick="Button2Print_Click" ><Icon PrimaryIconUrl="../Images/Printer.png"/></telerik:RadButton > </asp:Panel>

    PDF file has been generated, BUT, when I click on the button, page become inactive and never become active again, loading image is shown and page has never been reloading.
    How to eliminate the loading process.  I don't need to reload the page on these events.  Again both events are server side
    Thank you for your help.

     

     

     

     

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 20 Mar 2013 Link to this post

    Hello,

    In order the RadScheduler ExportToPdf functionality to work as expected, a full page post-back is required. Please find attached a sample project that implements very similar scenario. After the RadScheduler is successfully exported to PDF document, the user has ability to click on the printing functionality button and it works as expected - the label tag is populated with some text for demo purposes.

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Yelena
    Yelena avatar
    14 posts
    Member since:
    Jan 2013

    Posted 20 Mar 2013 Link to this post

    Thank you for your reply.  I am doing pretty much the same, but some how my page just don't want to come back from postback.
    Let me ask you for additional question.  I have scheduler object on my page
    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="wucScheduler.ascx.cs" Inherits="wucScheduler" %>
    <%@ Register Assembly="BusinessObjects" Namespace="BusinessObjects" TagPrefix="cc1" %>
     
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
     
    <link href="../App_Themes/Default/DefaultTheme2.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/MasterPage2/Scheduler.css" rel="stylesheet" type="text/css" />
     
    <telerik:RadScheduler ID="schDashBoard" runat="server"    Skin="Office2007"
         Width="463px" Reminders-Enabled="true" DataKeyField="ID" DataSubjectField="AppSubject"
         DataStartField="StartTime" DataEndField="EndTime" DataRecurrenceField="RecurrenceRule"
         DataDescriptionField="AppDescription" DataReminderField="Reminder" DataRecurrenceParentKeyField="RecurrenceParentID"
         OverflowBehavior="Auto"  ShowHeader="false" SelectedView="DayView" OnAppointmentDataBound="schDashBoard_AppointmentDataBound"
         ShowFooter="False" AppointmentStyleMode="Default" EnableExactTimeRendering="True"
         CustomAttributeNames="LinkOpen,Completion,LinkDelete" >
         <AppointmentTemplate>
            <div>
                <asp:Panel ID="RecurrencePanel" CssClass="rsAptRecurrence" runat="server" Visible="false">
                </asp:Panel>
                <asp:Panel ID="RecurrenceExceptionPanel" CssClass="rsAptRecurrenceException" runat="server"
                    Visible="false">
                </asp:Panel>
                <asp:Panel ID="ReminderPanel" CssClass="rsAptReminder" runat="server" Visible="false">
                </asp:Panel>
                <asp:Panel ID="ResImageWrapperAppTemplate" runat="server">
                 <asp:Image ID="EventImage" runat="server" ImageUrl='<%# Container.Appointment.Resources.GetResourceByType("Event") == null ? "" : Container.Appointment.Resources.GetResourceByType("Event").Attributes["AppImage"] %>'
                    ToolTip='<%# Container.Appointment.Resources.GetResourceByType("Event") == null ? " " : Container.Appointment.Resources.GetResourceByType("Event").Text%>'
                    Visible='<%# Container.Appointment.Resources.GetResourceByType("Event") == null ? false : string.IsNullOrEmpty(Container.Appointment.Resources.GetResourceByType("Event").Attributes["AppImage"]) ? false : true%>'/>
                    <%# Eval("Subject")%>
                </asp:Panel>
            </div>
        </AppointmentTemplate>
        </telerik:RadScheduler>
    and the code behind is :
    this.schDashBoard.DayStartTime = new TimeSpan(6, 0, 0);
     this.schDashBoard.DayEndTime = new TimeSpan(23, 0, 0);
     this.schDashBoard.WorkDayStartTime = new TimeSpan(6, 0, 0);
     this.schDashBoard.WorkDayEndTime = new TimeSpan(20, 0, 0);
     this.schDashBoard.FirstDayOfWeek = DayOfWeek.Sunday;
     this.schDashBoard.LastDayOfWeek = DayOfWeek.Saturday;
     this.schDashBoard.EnableDescriptionField = true;
     this.schDashBoard.ReadOnly = true;
     this.schDashBoard.AllowDelete = false;

    This is the control with read only scheduler, no header. Browser IE  9.08112.  Control is loaded and have the javascript error on the end. 
    "Microsoft JScript runtime error: Unable to get value of the property 'Popup': object is null or undefined"
    Code line is " this._originalCalendarZIndex=Telerik.Web.UI.CalendarPopup.zIndex;"

    Please, let me know what I need to do in my code to illuminate this error.

    Thank you for your help
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 25 Mar 2013 Link to this post

    Hello,

    This is a known issue with our RadScheduler control when reminder options is enabled and ShowHeader property is set to false. I am afraid that the only workaround for now is either to disable the reminders or show the RadScheduler header. In order to increase the priority of that issue and keep track of its progress, please follow this link to our public issue tracker.

    I would like to apologize for any inconveniences.

    Greetings,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Yelena
    Yelena avatar
    14 posts
    Member since:
    Jan 2013

    Posted 27 Mar 2013 Link to this post

    Thank you for your reply.  I did workaround : replaced the scheduler with radgrid since radScheduler is read only.
    Sorry , but I have one more question:

    I have scheduler with Skin="Office2007". 
    In the AdvancedInsert or Edit forms all RadComboBox,RadInput objects and recurrence editor look like they do not find the skin
    (see the attachments).  Our application has Telerik.Web.UI.Skins.dll in the bin folder (10.15.2012)
    Could you, please, tell me what do I miss to have the correct style appearance. 

    If I use css file with all radcombobox and radinput css in it everything is working fine. 
    P.S. My own trial support expired, but I am working for company that has a license with Telerik
     
    Thank you for your help.
  6. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 28 Mar 2013 Link to this post

    Hello,

    I am glad to hear that you have found a workaround to avoid that unusual behavior.

    Since we are not aware of such issue with our Skins, could you please elaborate a bit more on your scenario? Could you please clarify what version of our RadControls you are using? Could you please confirm that you are not using any custom style that might override the default controls in the advanced form appearance? I would also suggest opening a support ticket and sending us a simplified runnable page that replicates that issue.

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Yelena
    Yelena avatar
    14 posts
    Member since:
    Jan 2013

    Posted 28 Mar 2013 Link to this post

    Thank you for your reply. 
    If I include skin setting in webconfig( see attachment) then Radcombox are looking correct, recurrence editor still looks incorrect and tooltips for scheduler start to losing the skin and application start to receive error message when I try to click on the edit menu item after I see tooltip on the appointment click event. Telerik version is 2012 Q3 Net40.  I assumed that everything should be in Telerik.Web.UI.Skin.dll and I don't have to include in the application any additional css or images files, if I don't have any customization.  Let me know, please, what I am missing.  Thank you for your reply.
  8. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 02 Apr 2013 Link to this post

    Hello,

    Indeed Telerik.Web.UI.Skin.dll contains all required styles and images for all built-in skins that offer the RadControls.
    Regarding your recurrence editor broken layout - could you try the solution provided in following forum post Recurrence controls styling is broken in old advanced templates.
    Since I am not able to replicate and inspect the tool tip issue locally I would suggest reviewing our Scheduler - Using RadToolTip online demo.

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. gorp88
    gorp88 avatar
    3 posts
    Member since:
    Jul 2020

    Posted 24 Jul 2020 Link to this post

    Hi,

    I am trying to set line break in the page title of radscheduler export to PDF. It doesn't put a line break as shown in the example below. Instead, it wraps text in a single line. Please give suggestions on how to deal with this issue ?

    radscheduler.ExportSettings.Pdf.PageTitle = "Line 1 " + "<br />" + "Line 2"

     

Back to Top