Hi,
Getting to love this control a lot! We are now at a point that we need to print out the scheduler for each resource, This can be done in portrait but have found some discrepancies that hopefully can be sorted out.
1. I am having no luck with printing the scheduler in a landscape format. None of the CSS @page commands seem to work. Is there an example that you can provide which will work?
2. The stylesheet I use has the tag "media='print'". When this is displayed on screen the appointments which are color coded by resource go missing but do display in the print preview. Why is this?
3. This may be a bizarre request, but could we have some form of print control, for example an orientation option on the control for landscape/portrait. This way we dont have to fudge the page to print in landscape, it nativley shows the scheduler sideways? Because we want it in landscape mode it is nativley read-only... (weird question I know, but may be useful...)
Look forward to your feedback.
Regards,
JK
Getting to love this control a lot! We are now at a point that we need to print out the scheduler for each resource, This can be done in portrait but have found some discrepancies that hopefully can be sorted out.
1. I am having no luck with printing the scheduler in a landscape format. None of the CSS @page commands seem to work. Is there an example that you can provide which will work?
2. The stylesheet I use has the tag "media='print'". When this is displayed on screen the appointments which are color coded by resource go missing but do display in the print preview. Why is this?
3. This may be a bizarre request, but could we have some form of print control, for example an orientation option on the control for landscape/portrait. This way we dont have to fudge the page to print in landscape, it nativley shows the scheduler sideways? Because we want it in landscape mode it is nativley read-only... (weird question I know, but may be useful...)
Look forward to your feedback.
Regards,
JK
8 Answers, 1 is accepted
0
Hi Jon,
Straight to your inquiries:
1. At present Opera is the only browser which supports @page CSS rules. Internet Explorer and Firefox do not apply them, so you will be forced to choose landscape orientation manually when printing. I found a page, which demonstrates how to set page orientation with ActiveX, but this will work only in Internet Explorer with the website added as a trusted one in "Internet Options" > "Security". I personally would not use this approach, except for some in-house or intranet web applications.
http://isaacschlueter.com/tests/landscape.html
2. If a stylesheet has media="print", it is applied only when printing or previewing. If you want the styles to be applied on the screen as well, you should remove the media attribute.
3. This would be an interesting feature, however, this print control should rely on some client-side functionality and as we discovered, this is not supported by browsers yet.
Let us know if you have any other questions.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Straight to your inquiries:
1. At present Opera is the only browser which supports @page CSS rules. Internet Explorer and Firefox do not apply them, so you will be forced to choose landscape orientation manually when printing. I found a page, which demonstrates how to set page orientation with ActiveX, but this will work only in Internet Explorer with the website added as a trusted one in "Internet Options" > "Security". I personally would not use this approach, except for some in-house or intranet web applications.
http://isaacschlueter.com/tests/landscape.html
2. If a stylesheet has media="print", it is applied only when printing or previewing. If you want the styles to be applied on the screen as well, you should remove the media attribute.
3. This would be an interesting feature, however, this print control should rely on some client-side functionality and as we discovered, this is not supported by browsers yet.
Let us know if you have any other questions.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
JK
Top achievements
Rank 1
answered on 06 Nov 2007, 05:50 PM
Hi Dimo,
Understood. I dont want to contradict you guys as you are all at telerik, the best support team I have used. (coming from 12 years in support/training background myself, I can tell who's good and whos bad!).
BUT (yes there has to be a but :o) ), I have found a page which controls the page orientation and just want to clarify the following link...
http://home.tampabay.rr.com/bmerkey/examples/landscape-test.html
If you go to print preview in IE7, the page does print sideways (not sideways) on the 3rd page, I have had no luck applying this with the scheduler. This is why I asked the question about the scheduler being able to be displayed sideways.
I think the answer has already been said in your post, but would like you to take a look and tell me if the above page makes any difference.
Thanks,
JK
Understood. I dont want to contradict you guys as you are all at telerik, the best support team I have used. (coming from 12 years in support/training background myself, I can tell who's good and whos bad!).
BUT (yes there has to be a but :o) ), I have found a page which controls the page orientation and just want to clarify the following link...
http://home.tampabay.rr.com/bmerkey/examples/landscape-test.html
If you go to print preview in IE7, the page does print sideways (not sideways) on the 3rd page, I have had no luck applying this with the scheduler. This is why I asked the question about the scheduler being able to be displayed sideways.
I think the answer has already been said in your post, but would like you to take a look and tell me if the above page makes any difference.
Thanks,
JK
0
Hello Jon,
Thank you for this link, I haven't thought of this option.
I managed to make Internet Explorer apply the described technique ( writing-mode: tb-rl; does the trick, you have to add it to some parent element of the Scheduler), but the Scheduler looked awfully both on the print preview screen and on paper (see attached screenshot). Apparently, this hack (actually this is what it is) is not suitable for controls and interfaces featuring advanced CSS positioning, floats, etc.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for this link, I haven't thought of this option.
I managed to make Internet Explorer apply the described technique ( writing-mode: tb-rl; does the trick, you have to add it to some parent element of the Scheduler), but the Scheduler looked awfully both on the print preview screen and on paper (see attached screenshot). Apparently, this hack (actually this is what it is) is not suitable for controls and interfaces featuring advanced CSS positioning, floats, etc.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
JK
Top achievements
Rank 1
answered on 07 Nov 2007, 03:45 PM
Dimo,
LOL..... erm doesn't work as it should does it ;o)
Oh well, just trying to take the "idiot user" of of the equation when it come to printing.
Cannot complain, with the use of your rad window I have sucessfully managed all other printouts.
Thanks for trying.
JK
LOL..... erm doesn't work as it should does it ;o)
Oh well, just trying to take the "idiot user" of of the equation when it come to printing.
Cannot complain, with the use of your rad window I have sucessfully managed all other printouts.
Thanks for trying.
JK
0
Wayne
Top achievements
Rank 1
answered on 04 Apr 2008, 01:25 PM
I have hit this problem too,
what is the solution, you mention using the RAD Window ?
Could you please upload a sample or tell me how ?
what is the solution, you mention using the RAD Window ?
Could you please upload a sample or tell me how ?
0
JK
Top achievements
Rank 1
answered on 04 Apr 2008, 01:59 PM
Hi Wayne,
I am afriad I got nowhere fast on this, it required so much client setup in regards page setup alterations I gave up in the end. It relies on IE coding to work but never came out as expected. I still think this is something that Telerik could implement.
Here is my code on the specific page but I cannot be much more help than that. Good Luck!
asp code
c# code
CSS
I am afriad I got nowhere fast on this, it required so much client setup in regards page setup alterations I gave up in the end. It relies on IE coding to work but never came out as expected. I still think this is something that Telerik could implement.
Here is my code on the specific page but I cannot be much more help than that. Good Luck!
asp code
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="SchedulerReportWindow.aspx.cs" Inherits="NewStyle_Reports_SchedulerReportWindow" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| <script language="javascript" type="text/javascript"> |
| function showPrintPreview() { |
| var objPrintPreview = '<object id="printPrev" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>'; |
| document.body.insertAdjacentHTML('beforeEnd', objPrintPreview); |
| printPrev.ExecWB(7, 2); |
| printPrev.outerHTML = ""; |
| } |
| </script> |
| <link href="../../Style/LandscapePRINTautogasqc.css" rel="stylesheet" type="text/css" media="print"/> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <asp:SqlDataSource id="dsAppointments" runat="server" UpdateCommand="UPDATE [SchedulerAppointments] SET [StartDate] = @StartDate, [EndDate] = @EndDate, [Subject] = @Subject, [RecurrenceStorage] = @RecurrenceStorage, [RecurrenceParentKey] = @RecurrenceParentKey, [ServiceHistoryID] = @ServiceHistoryID, [EmployeeID] = @EmployeeID WHERE [AppointmentID] = @AppointmentID" SelectCommand="SELECT CAST(SchedulerAppointments.AppointmentID AS int) AS AppointmentID, SchedulerAppointments.StartDate, SchedulerAppointments.EndDate, SchedulerAppointments.Subject, SchedulerAppointments.RecurrenceStorage, SchedulerAppointments.RecurrenceParentKey, CAST(SchedulerAppointments.EmployeeID AS int) AS EmployeeID, ServiceHistory.ServiceHistoryID, CAST(SchedulerAppointments.AppointmentType AS varchar) AS AppointmentType FROM SchedulerAppointments LEFT OUTER JOIN ServiceHistory ON SchedulerAppointments.AppointmentID = ServiceHistory.ServiceHistoryAppointmentID WHERE (SchedulerAppointments.EmployeeID = @EmployeeID) AND (CAST(@SchedulerAppointments AS varchar) = CAST(@SchedulerAppointments AS varchar) OR CAST(@SchedulerAppointments AS varchar) = 'All') OR (@EmployeeID = 0) AND (CAST(SchedulerAppointments.AppointmentType AS varchar) = CAST(@SchedulerAppointments AS varchar) OR CAST(@SchedulerAppointments AS varchar) = 'All')" InsertCommand="INSERT INTO SchedulerAppointments(StartDate, EndDate, Subject, RecurrenceStorage, RecurrenceParentKey, ServiceHistoryID, EmployeeID) VALUES (@StartDate, @EndDate, @Subject, @RecurrenceStorage, @RecurrenceParentKey, @ServiceHistoryID, @EmployeeID)" DeleteCommand="DELETE FROM [SchedulerAppointments] WHERE [AppointmentID] = @AppointmentID" ConnectionString="<%$ ConnectionStrings:GasConnectionString %>"> |
| <DeleteParameters> |
| <asp:Parameter Name="AppointmentID" Type="Int64" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="StartDate" Type="DateTime" /> |
| <asp:Parameter Name="EndDate" Type="DateTime" /> |
| <asp:Parameter Name="Subject" Type="String" /> |
| <asp:Parameter Name="RecurrenceStorage" Type="String" /> |
| <asp:Parameter Name="RecurrenceParentKey" Type="Int64" /> |
| <asp:Parameter Name="ServiceHistoryID" Type="Int64" /> |
| <asp:Parameter Name="EmployeeID" Type="Int32" /> |
| <asp:Parameter Name="AppointmentID" Type="Int64" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="StartDate" Type="DateTime" /> |
| <asp:Parameter Name="EndDate" Type="DateTime" /> |
| <asp:Parameter Name="Subject" Type="String" /> |
| <asp:Parameter Name="RecurrenceStorage" Type="String" /> |
| <asp:Parameter Name="RecurrenceParentKey" Type="Int64" /> |
| <asp:Parameter Name="ServiceHistoryID" Type="Int64" /> |
| <asp:Parameter Name="EmployeeID" Type="Int32" /> |
| </InsertParameters> |
| <SelectParameters> |
| <asp:QueryStringParameter Name="EmployeeID" QueryStringField="emp" /> |
| <asp:QueryStringParameter DefaultValue="all" Name="SchedulerAppointments" QueryStringField="sch" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" |
| Transparency="30" Width="75px"> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" /> |
| </telerik:RadAjaxLoadingPanel> |
| <div class="hide" style="text-align: center"> <asp:Button ID="btPrint" OnClientClick="showPrintPreview();" runat="server" Text="Print" /><br /></div> |
| <telerik:RadScheduler id="RadScheduler1" runat="server" Width="100%" Height="425px" Font-Size="8pt" Font-Names="Trebuchet MS" DataSourceID="dsAppointments" MonthVisibleAppointmentsPerDay="1" WorkDayStartTime="08:00:00" WorkDayEndTime="18:00:00" TimeZoneOffset="00:00:00" TimeLabelRowSpan="1" StartEditingInAdvancedForm="False" Skin="WebBlue" SelectedView="WeekView" SelectedDate="2007-10-04" MinutesPerRow="60" LastDayOfWeek="Sunday" HoursPanelTimeFormat="HH:mm" FirstDayOfWeek="Monday" DayStartTime="06:00:00" DayEndTime="20:00:00" DataSubjectField="Subject" DataStartField="StartDate" DataRecurrenceParentKeyField="RecurrenceParentKey" DataRecurrenceField="RecurrenceStorage" DataKeyField="AppointmentID" DataEndField="EndDate" CustomAttributeNames="ServiceHistoryID,AppointmentType" CausesValidation="false" ShowAllDayRow="False" ShowFooter="False" OverflowBehavior="Expand" ReadOnly="True"> |
| <AppointmentTemplate> |
| <pre style="font-family: Verdana, Sans-Serif;color:Black;"><%# Eval("Subject") %></pre> |
| </AppointmentTemplate> |
| </telerik:RadScheduler> |
| </div> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| public partial class NewStyle_Reports_SchedulerReportWindow : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| DateTime TodaysDate; |
| TodaysDate = DateTime.Today.ToLocalTime(); |
| RadScheduler1.SelectedDate = RadScheduler1.UtcToDisplay(TodaysDate); |
| } |
| } |
| } |
| * { |
| font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; |
| } |
| body { |
| margin: 5px 0 5px; |
| padding: 0; |
| background: white; |
| font-size: 12px; |
| color: #6B6B6B; |
| } |
| .RadScheduler_WebBlue .AppointmentGeneral .rsAptWrap |
| { |
| background: #c1adc8 url(../Images/General.png) repeat-x; |
| border: solid 1px #9b8fa3; |
| border-top: solid 1px #c4bdc9; |
| } |
| .RadScheduler_WebBlue .AppointmentJobCard .rsAptWrap |
| { |
| background: #d1bfa5 url(../Images/JobCard.png) repeat-x; |
| border: solid 1px #d1bfa5; |
| border-top: solid 1px #e3d8c8; |
| } |
| .RadScheduler_WebBlue .YourAppointment .rsAptWrap |
| { |
| background: #FFFF80 url(../Images/YourAppointment.png) repeat-x; |
| border: solid 1px #FFFF80; |
| border-top: solid 1px #FFFF80; |
| } |
| h1, h2, h3, h4, h5, h6 { |
| margin: 0; |
| padding: 0; |
| font-weight: normal; |
| color: #000000; |
| } |
| h2 { |
| margin-bottom: 10px; |
| border-bottom: 1px solid #F4F4F4; |
| font-size: 20px; |
| } |
| h3 { |
| margin-bottom: 15px; |
| padding-bottom: 5px; |
| font-size: 20px; |
| border-bottom: 1px solid #F4F4F4; |
| color:blue; |
| } |
| p, ol, ul, blockquote { |
| line-height: 24px; |
| } |
| ul { |
| margin-left: 0; |
| padding-left: 0; |
| list-style: none; |
| } |
| a { |
| text-decoration:none; |
| font-size:12px; |
| } |
| a:hover { |
| text-decoration: none; |
| background: #FBFBFB url(../images/img7.gif) repeat-x; |
| font-size:12px; |
| } |
| img { |
| border: none; |
| } |
| #textfield1 { |
| width: 185px; |
| margin-bottom: 10px; |
| border: 1px solid #E0E0E0; |
| border-right-color: #F6F6F6; |
| border-bottom-color: #F6F6F6; |
| } |
| #submit1 { |
| border: 0px solid #EBEBEB; |
| border-bottom-color: #DDDDDD; |
| background: #FBFBFB url(../images/img7.gif) repeat-x; |
| text-transform: lowercase; |
| font-size: 12px; |
| color: #7A7A7A; |
| } |
| /* Posted */ |
| .posted { |
| height: 33px; |
| margin: 0 0 30px 0; |
| padding: 10px 15px 0 15px; |
| background: url(../images/img6.gif) repeat-x; |
| border-bottom: 1px solid #F2F2F2; |
| } |
| .posted p { |
| float: left; |
| margin: 0; |
| } |
| .posted .comments { |
| float: rightright; |
| } |
| .posted a { |
| color: #717171; |
| } |
| /* Header */ |
| #header { |
| width: 917px; |
| height: 50px; |
| margin: 0 auto; |
| background: url(../images/img2.gif) repeat-x; |
| display:none; |
| } |
| /* Content */ |
| #content { |
| width: 847px; |
| height:525px; |
| margin: 0 auto; |
| padding: 10px 35px 0px 35px; |
| background: #FFFFFF url(../images/img8.gif) no-repeat left bottombottom; |
| } |
| /* Logo */ |
| #logo { |
| float: left; |
| height: 80px; |
| padding: 0 0 0 0; |
| background: url(../images/img1.gif) no-repeat; |
| } |
| #logo * { |
| text-decoration: none; |
| } |
| #logo h1 { |
| float: left; |
| padding: 20px 0 0 30px; |
| font-size: 20px; |
| } |
| #logo h1 a { |
| color: #000000; |
| } |
| #logo h1 span { |
| font-weight: bold; |
| } |
| #logo h2 { |
| float: left; |
| padding: 72px 0 0 8px; |
| font-size: 12px; |
| border: none; |
| } |
| #logo h2 a { |
| color: #B4B4B4; |
| } |
| /* Menu */ |
| #menu { |
| float: rightright; |
| height: 80px; |
| padding: 20px 25px 0 0; |
| background: url(../images/img3.gif) no-repeat rightright top; |
| } |
| #menu ul { |
| margin: 0; |
| padding: 0; |
| list-style: none; |
| } |
| #menu li { |
| display: inline; |
| } |
| #menu a { |
| padding: 0 10px 0 10px; |
| border-left: 1px solid #DBDBDB; |
| text-decoration: none; |
| font-size: 13px; |
| color: #3B3B3B; |
| } |
| #menu .first a { |
| border: none; |
| } |
| /* Splash */ |
| #splash { |
| width: 877px; |
| height: 170px; |
| margin: 0 auto; |
| background: url(../images/img5.gif) repeat-x left bottombottom; |
| border-right: 20px solid #FFFFFF; |
| border-left: 20px solid #FFFFFF; |
| } |
| #colOne { |
| float: left; |
| width: 662px; |
| } |
| #colTwo { |
| float: rightright; |
| width: 185px; |
| padding: 5px 0 0 0; |
| } |
| #colTwoFooter { |
| border-bottom: 1px solid #F2F2F2; |
| } |
| /* Footer */ |
| #footer { |
| } |
| #footer p { |
| text-align: center; |
| color: #777777; |
| } |
| #footer a { |
| color: #5D5D5D; |
| } |
| A.LinkButton |
| { |
| font-size: 12px; |
| font-weight:bold; |
| color: White; |
| font-family: Arial, Geneva, Tahoma, Verdana, Helvetica, sans-serif; |
| text-decoration: none; |
| background-color: Transparent; |
| } |
| A.LinkButton:hover |
| { |
| color:Black; |
| background:transparent; |
| } |
| A.LinkButton:active |
| { |
| background-color: #ff99cc; |
| } |
| A.LinkButton:selected |
| { |
| background-color: #ff99cc; |
| } |
| .modalPanelTitle td |
| { |
| padding: 3px; |
| text-align:center; |
| font-weight: bold; |
| font-size: 0.9em; |
| background-image: url(../images/greypanel-toptile.gif); |
| cursor: hand; |
| color: White; |
| font-family: Verdana; |
| width:100%; |
| height: 15px; |
| } |
| .modalPanel |
| { |
| border-right: 1px outset; |
| border-top: 1px outset; |
| z-index: 1000000; |
| width:500; |
| border-left: 1px outset; |
| border-bottom: 1px outset; |
| position:relative ; |
| top: 50px; |
| left:50px; |
| vertical-align:middle; |
| border-collapse: collapse; |
| background-color: White; |
| border-color:Black; |
| } |
| .modalPanel td |
| { |
| vertical-align:top; |
| } |
| /* Rating */ |
| .ratingStar { |
| font-size: 0pt; |
| width: 13px; |
| height: 12px; |
| margin: 0px; |
| padding: 0px; |
| cursor: pointer; |
| display: block; |
| background-repeat: no-repeat; |
| } |
| .ratingStarReadOnly { |
| font-size: 0pt; |
| width: 13px; |
| height: 12px; |
| margin: 0px; |
| padding: 0px; |
| display: block; |
| background-repeat: no-repeat; |
| } |
| .filledRatingStar { |
| background-image: url(../Images/FilledStar.png); |
| } |
| .emptyRatingStar { |
| background-image: url(../Images/EmptyStar.png); |
| } |
| .savedRatingStar { |
| background-image: url(../Images/SavedStar.png); |
| } |
| .hide |
| { |
| display: none; |
| } |
| .hide1 |
| { |
| display: none; |
| } |
| .showme |
| { |
| display:inline ; |
| } |
0
JK
Top achievements
Rank 1
answered on 04 Apr 2008, 01:59 PM
Hi Wayne,
I am afriad I got nowhere fast on this, it required so much client setup in regards page setup alterations I gave up in the end. It relies on IE coding to work but never came out as expected. I still think this is something that Telerik could implement.
Here is my code on the specific page but I cannot be much more help than that. Good Luck!
asp code
c# code
CSS
I am afriad I got nowhere fast on this, it required so much client setup in regards page setup alterations I gave up in the end. It relies on IE coding to work but never came out as expected. I still think this is something that Telerik could implement.
Here is my code on the specific page but I cannot be much more help than that. Good Luck!
asp code
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="SchedulerReportWindow.aspx.cs" Inherits="NewStyle_Reports_SchedulerReportWindow" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| <script language="javascript" type="text/javascript"> |
| function showPrintPreview() { |
| var objPrintPreview = '<object id="printPrev" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>'; |
| document.body.insertAdjacentHTML('beforeEnd', objPrintPreview); |
| printPrev.ExecWB(7, 2); |
| printPrev.outerHTML = ""; |
| } |
| </script> |
| <link href="../../Style/LandscapePRINTautogasqc.css" rel="stylesheet" type="text/css" media="print"/> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <asp:SqlDataSource id="dsAppointments" runat="server" UpdateCommand="UPDATE [SchedulerAppointments] SET [StartDate] = @StartDate, [EndDate] = @EndDate, [Subject] = @Subject, [RecurrenceStorage] = @RecurrenceStorage, [RecurrenceParentKey] = @RecurrenceParentKey, [ServiceHistoryID] = @ServiceHistoryID, [EmployeeID] = @EmployeeID WHERE [AppointmentID] = @AppointmentID" SelectCommand="SELECT CAST(SchedulerAppointments.AppointmentID AS int) AS AppointmentID, SchedulerAppointments.StartDate, SchedulerAppointments.EndDate, SchedulerAppointments.Subject, SchedulerAppointments.RecurrenceStorage, SchedulerAppointments.RecurrenceParentKey, CAST(SchedulerAppointments.EmployeeID AS int) AS EmployeeID, ServiceHistory.ServiceHistoryID, CAST(SchedulerAppointments.AppointmentType AS varchar) AS AppointmentType FROM SchedulerAppointments LEFT OUTER JOIN ServiceHistory ON SchedulerAppointments.AppointmentID = ServiceHistory.ServiceHistoryAppointmentID WHERE (SchedulerAppointments.EmployeeID = @EmployeeID) AND (CAST(@SchedulerAppointments AS varchar) = CAST(@SchedulerAppointments AS varchar) OR CAST(@SchedulerAppointments AS varchar) = 'All') OR (@EmployeeID = 0) AND (CAST(SchedulerAppointments.AppointmentType AS varchar) = CAST(@SchedulerAppointments AS varchar) OR CAST(@SchedulerAppointments AS varchar) = 'All')" InsertCommand="INSERT INTO SchedulerAppointments(StartDate, EndDate, Subject, RecurrenceStorage, RecurrenceParentKey, ServiceHistoryID, EmployeeID) VALUES (@StartDate, @EndDate, @Subject, @RecurrenceStorage, @RecurrenceParentKey, @ServiceHistoryID, @EmployeeID)" DeleteCommand="DELETE FROM [SchedulerAppointments] WHERE [AppointmentID] = @AppointmentID" ConnectionString="<%$ ConnectionStrings:GasConnectionString %>"> |
| <DeleteParameters> |
| <asp:Parameter Name="AppointmentID" Type="Int64" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="StartDate" Type="DateTime" /> |
| <asp:Parameter Name="EndDate" Type="DateTime" /> |
| <asp:Parameter Name="Subject" Type="String" /> |
| <asp:Parameter Name="RecurrenceStorage" Type="String" /> |
| <asp:Parameter Name="RecurrenceParentKey" Type="Int64" /> |
| <asp:Parameter Name="ServiceHistoryID" Type="Int64" /> |
| <asp:Parameter Name="EmployeeID" Type="Int32" /> |
| <asp:Parameter Name="AppointmentID" Type="Int64" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="StartDate" Type="DateTime" /> |
| <asp:Parameter Name="EndDate" Type="DateTime" /> |
| <asp:Parameter Name="Subject" Type="String" /> |
| <asp:Parameter Name="RecurrenceStorage" Type="String" /> |
| <asp:Parameter Name="RecurrenceParentKey" Type="Int64" /> |
| <asp:Parameter Name="ServiceHistoryID" Type="Int64" /> |
| <asp:Parameter Name="EmployeeID" Type="Int32" /> |
| </InsertParameters> |
| <SelectParameters> |
| <asp:QueryStringParameter Name="EmployeeID" QueryStringField="emp" /> |
| <asp:QueryStringParameter DefaultValue="all" Name="SchedulerAppointments" QueryStringField="sch" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" |
| Transparency="30" Width="75px"> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <br /> |
| <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" /> |
| </telerik:RadAjaxLoadingPanel> |
| <div class="hide" style="text-align: center"> <asp:Button ID="btPrint" OnClientClick="showPrintPreview();" runat="server" Text="Print" /><br /></div> |
| <telerik:RadScheduler id="RadScheduler1" runat="server" Width="100%" Height="425px" Font-Size="8pt" Font-Names="Trebuchet MS" DataSourceID="dsAppointments" MonthVisibleAppointmentsPerDay="1" WorkDayStartTime="08:00:00" WorkDayEndTime="18:00:00" TimeZoneOffset="00:00:00" TimeLabelRowSpan="1" StartEditingInAdvancedForm="False" Skin="WebBlue" SelectedView="WeekView" SelectedDate="2007-10-04" MinutesPerRow="60" LastDayOfWeek="Sunday" HoursPanelTimeFormat="HH:mm" FirstDayOfWeek="Monday" DayStartTime="06:00:00" DayEndTime="20:00:00" DataSubjectField="Subject" DataStartField="StartDate" DataRecurrenceParentKeyField="RecurrenceParentKey" DataRecurrenceField="RecurrenceStorage" DataKeyField="AppointmentID" DataEndField="EndDate" CustomAttributeNames="ServiceHistoryID,AppointmentType" CausesValidation="false" ShowAllDayRow="False" ShowFooter="False" OverflowBehavior="Expand" ReadOnly="True"> |
| <AppointmentTemplate> |
| <pre style="font-family: Verdana, Sans-Serif;color:Black;"><%# Eval("Subject") %></pre> |
| </AppointmentTemplate> |
| </telerik:RadScheduler> |
| </div> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| public partial class NewStyle_Reports_SchedulerReportWindow : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| DateTime TodaysDate; |
| TodaysDate = DateTime.Today.ToLocalTime(); |
| RadScheduler1.SelectedDate = RadScheduler1.UtcToDisplay(TodaysDate); |
| } |
| } |
| } |
| * { |
| font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; |
| } |
| body { |
| margin: 5px 0 5px; |
| padding: 0; |
| background: white; |
| font-size: 12px; |
| color: #6B6B6B; |
| } |
| .RadScheduler_WebBlue .AppointmentGeneral .rsAptWrap |
| { |
| background: #c1adc8 url(../Images/General.png) repeat-x; |
| border: solid 1px #9b8fa3; |
| border-top: solid 1px #c4bdc9; |
| } |
| .RadScheduler_WebBlue .AppointmentJobCard .rsAptWrap |
| { |
| background: #d1bfa5 url(../Images/JobCard.png) repeat-x; |
| border: solid 1px #d1bfa5; |
| border-top: solid 1px #e3d8c8; |
| } |
| .RadScheduler_WebBlue .YourAppointment .rsAptWrap |
| { |
| background: #FFFF80 url(../Images/YourAppointment.png) repeat-x; |
| border: solid 1px #FFFF80; |
| border-top: solid 1px #FFFF80; |
| } |
| h1, h2, h3, h4, h5, h6 { |
| margin: 0; |
| padding: 0; |
| font-weight: normal; |
| color: #000000; |
| } |
| h2 { |
| margin-bottom: 10px; |
| border-bottom: 1px solid #F4F4F4; |
| font-size: 20px; |
| } |
| h3 { |
| margin-bottom: 15px; |
| padding-bottom: 5px; |
| font-size: 20px; |
| border-bottom: 1px solid #F4F4F4; |
| color:blue; |
| } |
| p, ol, ul, blockquote { |
| line-height: 24px; |
| } |
| ul { |
| margin-left: 0; |
| padding-left: 0; |
| list-style: none; |
| } |
| a { |
| text-decoration:none; |
| font-size:12px; |
| } |
| a:hover { |
| text-decoration: none; |
| background: #FBFBFB url(../images/img7.gif) repeat-x; |
| font-size:12px; |
| } |
| img { |
| border: none; |
| } |
| #textfield1 { |
| width: 185px; |
| margin-bottom: 10px; |
| border: 1px solid #E0E0E0; |
| border-right-color: #F6F6F6; |
| border-bottom-color: #F6F6F6; |
| } |
| #submit1 { |
| border: 0px solid #EBEBEB; |
| border-bottom-color: #DDDDDD; |
| background: #FBFBFB url(../images/img7.gif) repeat-x; |
| text-transform: lowercase; |
| font-size: 12px; |
| color: #7A7A7A; |
| } |
| /* Posted */ |
| .posted { |
| height: 33px; |
| margin: 0 0 30px 0; |
| padding: 10px 15px 0 15px; |
| background: url(../images/img6.gif) repeat-x; |
| border-bottom: 1px solid #F2F2F2; |
| } |
| .posted p { |
| float: left; |
| margin: 0; |
| } |
| .posted .comments { |
| float: rightright; |
| } |
| .posted a { |
| color: #717171; |
| } |
| /* Header */ |
| #header { |
| width: 917px; |
| height: 50px; |
| margin: 0 auto; |
| background: url(../images/img2.gif) repeat-x; |
| display:none; |
| } |
| /* Content */ |
| #content { |
| width: 847px; |
| height:525px; |
| margin: 0 auto; |
| padding: 10px 35px 0px 35px; |
| background: #FFFFFF url(../images/img8.gif) no-repeat left bottombottom; |
| } |
| /* Logo */ |
| #logo { |
| float: left; |
| height: 80px; |
| padding: 0 0 0 0; |
| background: url(../images/img1.gif) no-repeat; |
| } |
| #logo * { |
| text-decoration: none; |
| } |
| #logo h1 { |
| float: left; |
| padding: 20px 0 0 30px; |
| font-size: 20px; |
| } |
| #logo h1 a { |
| color: #000000; |
| } |
| #logo h1 span { |
| font-weight: bold; |
| } |
| #logo h2 { |
| float: left; |
| padding: 72px 0 0 8px; |
| font-size: 12px; |
| border: none; |
| } |
| #logo h2 a { |
| color: #B4B4B4; |
| } |
| /* Menu */ |
| #menu { |
| float: rightright; |
| height: 80px; |
| padding: 20px 25px 0 0; |
| background: url(../images/img3.gif) no-repeat rightright top; |
| } |
| #menu ul { |
| margin: 0; |
| padding: 0; |
| list-style: none; |
| } |
| #menu li { |
| display: inline; |
| } |
| #menu a { |
| padding: 0 10px 0 10px; |
| border-left: 1px solid #DBDBDB; |
| text-decoration: none; |
| font-size: 13px; |
| color: #3B3B3B; |
| } |
| #menu .first a { |
| border: none; |
| } |
| /* Splash */ |
| #splash { |
| width: 877px; |
| height: 170px; |
| margin: 0 auto; |
| background: url(../images/img5.gif) repeat-x left bottombottom; |
| border-right: 20px solid #FFFFFF; |
| border-left: 20px solid #FFFFFF; |
| } |
| #colOne { |
| float: left; |
| width: 662px; |
| } |
| #colTwo { |
| float: rightright; |
| width: 185px; |
| padding: 5px 0 0 0; |
| } |
| #colTwoFooter { |
| border-bottom: 1px solid #F2F2F2; |
| } |
| /* Footer */ |
| #footer { |
| } |
| #footer p { |
| text-align: center; |
| color: #777777; |
| } |
| #footer a { |
| color: #5D5D5D; |
| } |
| A.LinkButton |
| { |
| font-size: 12px; |
| font-weight:bold; |
| color: White; |
| font-family: Arial, Geneva, Tahoma, Verdana, Helvetica, sans-serif; |
| text-decoration: none; |
| background-color: Transparent; |
| } |
| A.LinkButton:hover |
| { |
| color:Black; |
| background:transparent; |
| } |
| A.LinkButton:active |
| { |
| background-color: #ff99cc; |
| } |
| A.LinkButton:selected |
| { |
| background-color: #ff99cc; |
| } |
| .modalPanelTitle td |
| { |
| padding: 3px; |
| text-align:center; |
| font-weight: bold; |
| font-size: 0.9em; |
| background-image: url(../images/greypanel-toptile.gif); |
| cursor: hand; |
| color: White; |
| font-family: Verdana; |
| width:100%; |
| height: 15px; |
| } |
| .modalPanel |
| { |
| border-right: 1px outset; |
| border-top: 1px outset; |
| z-index: 1000000; |
| width:500; |
| border-left: 1px outset; |
| border-bottom: 1px outset; |
| position:relative ; |
| top: 50px; |
| left:50px; |
| vertical-align:middle; |
| border-collapse: collapse; |
| background-color: White; |
| border-color:Black; |
| } |
| .modalPanel td |
| { |
| vertical-align:top; |
| } |
| /* Rating */ |
| .ratingStar { |
| font-size: 0pt; |
| width: 13px; |
| height: 12px; |
| margin: 0px; |
| padding: 0px; |
| cursor: pointer; |
| display: block; |
| background-repeat: no-repeat; |
| } |
| .ratingStarReadOnly { |
| font-size: 0pt; |
| width: 13px; |
| height: 12px; |
| margin: 0px; |
| padding: 0px; |
| display: block; |
| background-repeat: no-repeat; |
| } |
| .filledRatingStar { |
| background-image: url(../Images/FilledStar.png); |
| } |
| .emptyRatingStar { |
| background-image: url(../Images/EmptyStar.png); |
| } |
| .savedRatingStar { |
| background-image: url(../Images/SavedStar.png); |
| } |
| .hide |
| { |
| display: none; |
| } |
| .hide1 |
| { |
| display: none; |
| } |
| .showme |
| { |
| display:inline ; |
| } |
0
Wayne
Top achievements
Rank 1
answered on 04 Apr 2008, 02:18 PM
Thankyou for the code,
Have you looked at the Telerik Web ReportViewer,
When I hit the print Button there a Different Dialog
pops up. I have not figured out to activate the Dialog
via javascript, still searching for a solution.
Have you looked at the Telerik Web ReportViewer,
When I hit the print Button there a Different Dialog
pops up. I have not figured out to activate the Dialog
via javascript, still searching for a solution.
