Print Page | Close Window

Printing Questions

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=5337
Printed Date: 22 November 2024 at 7:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Printing Questions
Posted By: mendezjosem
Subject: Printing Questions
Date Posted: 22 October 2006 at 10:33am
Hi, If I want to print the Event of the day with the Description too can I ?

When I print a event can be on white ? because will cost alot of $$ on tonew when you print the calendar day event, or week etc.. alot of colors on it.

Is that posible to put something that when youadd an event will seach if an event is on the same day and time so you cannt had a double entry ? or I need to doit by DB Access and search etc. etc. ?

Please let me know thanks a lot



Replies:
Posted By: sserge
Date Posted: 23 October 2006 at 8:38am
Originally posted by mendezjosem mendezjosem wrote:

Hi, If I want to print the Event of the day with the Description too can I ?

For printing there is used the same function as for drawing on screen. Calendar is only adjusted a little (paper size, etc)
 
For Office 2007 theme it is by default.
 
For Office 2003 this is also possible. You have to catch PrePopulate notification and add the Body (description) text to the Subject. Add some flag which will indicate that calendar is in printing mode.
 
EXAMPLE:

Private Sub PrintCalendar()
    bCalendarPrinting = True
    wndCalendar.Populate
 
    wndCalendar.PrintCalendar 0
 
    bCalendarPrinting = False
    wndCalendar.Populate
End Sub
...
Private Sub CalendarControl_PrePopulate(ByVal ViewGroup, ByVal Events As CalendarEvents)
    If bCalendarPrinting then
        For Each pEvent In Events       
        pEvent.Subject = pEvent.Subject + vbCr + pEvent.Body
    End If
End Sub


Originally posted by mendezjosem mendezjosem wrote:


When I print a event can be on white ? because will cost alot of $$ on tonew when you print the calendar day event, or week etc.. alot of colors on it.

This option was not implemented because ususally color printers have such option in printer settings (I mean print Color or Black&White). Look at printer settings dialogs which should be shown before start printing.

Originally posted by mendezjosem mendezjosem wrote:


Is that posible to put something that when youadd an event will seach if an event is on the same day and time so you cannt had a double entry ? or I need to doit by DB Access and search etc. etc. ?

* CalendarControl uses CalendarDataProvider to retrieve events before displaying them. You also can call CalendarDataProvider.RetrieveDayEvents to get all events collection for a day and check for such event in this collection. Do this before you add a new event to a data provider.
 
* For inplace creating events use IsEditOperationDisabled (or BeforeEditOperation) notifications to check event creating using current selection.
       
* For Import/Export you can use CalendarDataProvider.GetAllEventsRaw(). It will create all events collection in memory. Recurrence events will be represented as master events (not expanded to ocurrences).

But this may take some memory and time. If you DB has huge amount of events this way may not be fine. Just try to test for which amount of events this is acceptable. I think this will be a big value: 5 000 - 10 000 events (may be even more).
   
Or use SQL request to DB.
 

Also note: For recurrence events you have to compare master events. You can get it using:
 CalendarEvent.RecurrencePattern.MasterEvent
And I think comparing start/end times is not enough. Compare recurrence patterns as well.



--
WBR,
Serge




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net