Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Printing Questions
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Printing Questions

 Post Reply Post Reply
Author
Message
mendezjosem View Drop Down
Newbie
Newbie


Joined: 22 October 2006
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote mendezjosem Quote  Post ReplyReply Direct Link To This Post Topic: Printing Questions
    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
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.