Print Page | Close Window

Report Issues

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=15431
Printed Date: 12 December 2024 at 9:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Report Issues
Posted By: rgracie
Subject: Report Issues
Date Posted: 23 October 2009 at 12:22pm
Hello All,
  I have had several complaints about printing issues with Version 13.1.
 
 1). Printing causes the calendar control to "reset" it's position, move the focus to around the 6:00am area. If you click on the vertical scroll bar, the position instantly move back to the prev. position. 
 
 2). If printing margins are smaller on a given printer it results in 2 copies. These are 2 complete copies one with a header, and one without..  In testing this, you will also notice that in preview the preview will not indicate there is a 2nd page.
 
 So obviously some changes have been made to the report code. Is there anyway to have it act like it did in the last version of 12.??
 
 

Thank You
Robert
 



Replies:
Posted By: mdoubson
Date Posted: 23 October 2009 at 7:37pm
Did you try your cases under 13.2 version?

-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 26 October 2009 at 9:23am
Mark,
  Yes I did, the results are the same.. It works fine in the last version of 12, but fails in 13.1 & 13.2.02  (Didn't test 13.0).
 
Further testing shows that if you reduce the header font small enough, no matter what the printer object will print 2 pages. In this case the printer preview DOES show there are 2 (or more) pages to be printed, but in the case where print margins are smaller for a selected user, the preview shows no indication of a 2nd page.
 
In the previous versions, it seemed like the print object had much better control over the automatic resizing of the calendar, Resizing to fit a single page. That seems to have been lost..
 
Thank You
WBR
Robert
 


Posted By: mdoubson
Date Posted: 26 October 2009 at 9:28am
Try to decrease CalendarControl.DayView.TimeScale = 10 '- interval in minutes (or 15...)

-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 26 October 2009 at 12:49pm
12.1 ignored TimeScale (always use 1 Hour!) and make simetimes useless very small cell height for such cases (FitInOnePage) - in 13... we use wysiwig print approach and show all information we can. If you need more pages - USE more pages to print

-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 27 October 2009 at 10:46am
Mark,
  Thank you for your response..
 
  The variable for the CalendarControl.DayView.TimeScale property is user selected. The mass majority have is set at the default (mine) which is 15 min. I use this number because this is what my customers prefer.  I don't want to ask them to change to something they do not want to use just to print the schedule, and I really don't want to have to build up another instance of the calendar for printing. (These are multi resource schedules with many events)
 
  I don't really understand what you mean by "If you need more pages - USE more pages to print" ?  My users don't like the way the system is handing the WYSIWYG printing approach as it is very unpredictable. Is there anyway of an option to turn this system off and revert to the way it was?
 
 Can we also discuss the #1 complaint my customers have (and I've confirmed)
 
1). Printing causes the calendar control to "reset" it's position, move the focus to around the 6:00am area. If you click on the vertical scroll bar, the position instantly move back to the prev. position. 
 
Thanks again for your time..
 
WBR
Robert
 
 
 
 
 


Posted By: mdoubson
Date Posted: 27 October 2009 at 11:02am
You don't need second control instance - you need to write handler to set print-mode settings your user like and after print set standard-mode settings. Same for before and after print top visible cell - you can remember it before print and ensure visibility after print - ocx give you full power to write such functions

-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 27 October 2009 at 8:37pm

Smth like this (VB case) and all will fit on one page

Private Sub mnuPrintPreview_Click()
    Dim tScale As Integer
    tScale = CalendarControl.DayView.TimeScale
    CalendarControl.DayView.TimeScale = 60
    CalendarControl.PrintPreviewOptions.Title = "Calendar Control VB 6.0 Sample application"
    CalendarControl.PrintPreview False
    CalendarControl.DayView.TimeScale = tScale
End Sub
same for Private Sub mnuPrint_Click()


-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 29 October 2009 at 7:32pm

can you give me an example of the easiest way to grab the current position (cell) in a multi-resource calendar within the same scope as your code above?

WBR
Thanks


Posted By: mdoubson
Date Posted: 29 October 2009 at 7:50pm
long CellIndex = CalendarControl.DayView.GetCellNumber(DATE DayTime)
- will give you cell # by given DayTime (you can take it from hittest)
after print you can call
 
CalendarControl.DayView.ScrollV(CellIndex);
 
for multi-schedule case use new function:
CalendarControl.DayView.ScrollToColumn(long ColumnIndex) - this call will scroll to given ColumnIndex (Schedule #)


-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 29 October 2009 at 8:31pm
Most simple case - call CalendarControl.DayView.ScrollToWorkDayBegin in the end of mnuPrintPreview_Click  or mnuPrint_Click code

-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 30 October 2009 at 5:55pm
Originally posted by mdoubson mdoubson wrote:

Most simple case - call CalendarControl.DayView.ScrollToWorkDayBegin in the end of mnuPrintPreview_Click  or mnuPrint_Click code
 
 
  It does not work... What happens on the above call, the control again "resets", scrolls to the top position which in reality is 12:00am but the time scale reads 8:00am until you click on the vertical scroll bar, then the calendar and time scale resets and represents the real 12:00am position.
 
 It appears it's a timing issue, the call to .CalendarCrt.DayView.ScrollToWorkDayBegin right after the call for .CalendarCrt.DayView.TimeScale = iScale does not give the calendar enough to to completely refresh is my guess..
 
 
 You do realized that there is a problem in the underlining print mechanism that causes the calendar to move position. It simply should not cause the calendar to move position, and trying to put a band aid by forcing the correction external of the control is just plain crazy...  In my opinion that is... :-)
 
WBR
Robert
 


Posted By: mdoubson
Date Posted: 30 October 2009 at 6:47pm
OK - I agree. I added special DayView OnePage print / printpreview mode - you don't need to change your timescale in app - now it is doing in the Core.
All you need to do - set CalendarControl.DayView.DF_Mode = True
You can test your case now with fresh version of https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar


-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 02 November 2009 at 6:57pm
Bump...


Posted By: rgracie
Date Posted: 03 November 2009 at 1:24pm
Ooops sorry about the bump.. Didn't see your reply until today... I will download and test new control tomorrow.
 
Thank you VERY much for your help Mark, it really is much appreciated.  You have really added a new level of customer support here that was missing in the past, and I (I'm sure many others would agree) applaud all your efforts!
 
WBR
Robert
 


Posted By: rgracie
Date Posted: 04 November 2009 at 8:27pm
Mark,
 Ok, upgraded to the latest control, and unfortunately the control still does the reset thing..  :-(  And now it does this flashy red background thing in addition... :-(

WBR
Robert



Posted By: mdoubson
Date Posted: 04 November 2009 at 10:13pm
No, I am afraid you don't undestand that to do:
In the end of Form_Load() you need to add a line: CalendarControl.DayView.DF_Mode = True
You also need to clean Print and PrintPreview:
Private Sub mnuPrintPreview_Click()
    CalendarControl.PrintPreviewOptions.Title = "..."
    CalendarControl.PrintPreview False
End Sub
Now you can have any timescales in non-print mode. You V-Scroll pos will be also restored after print done.
 


-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 05 November 2009 at 5:19pm
Originally posted by mdoubson mdoubson wrote:

No, I am afraid you don't undestand that to do:
In the end of Form_Load() you need to add a line: CalendarControl.DayView.DF_Mode = True
You also need to clean Print and PrintPreview:
Private Sub mnuPrintPreview_Click()
    CalendarControl.PrintPreviewOptions.Title = "..."
    CalendarControl.PrintPreview False
End Sub
Now you can have any timescales in non-print mode. You V-Scroll pos will be also restored after print done.
 


Sorry Mark I don't have a clue what your are trying to tell me.... :-(  In the class that encapsulates the control, that loads when the form loads I have this...

  With m_objCalendarCrt
     'Bunch of other properties being set
           .DayView.DF_Mode = True
    'More properties being set
  End With

 Behind a command button on the calendar form I have this.

With ctrCalendar
  With .CalendarCrt.PrintOptions
    .PrintFrom = "7:00:00 AM" ' Hard coded for testing
    .PrintTo = "6:00:00 PM" ' Hard coded for testing
    .DateHeaderFont.Size = 8
    .DateHeaderCalendarFont.Size = 3
    .MarginBottom = IIf(.MarginsMeasureMetrics, 1 * 10, 1 * 10)
    .MarginLeft = IIf(.MarginsMeasureMetrics, 1 * 10, 1 * 10)
    .MarginRight = IIf(.MarginsMeasureMetrics, 1 * 10, 1 * 10)
    .MarginTop = IIf(.MarginsMeasureMetrics, 1 * 10, 1 * 10)
    .PrintFromToExactly = True
  End With
 
  Select Case MBox("What do you want to do?", vbAbortRetryIgnore Or vbQuestion Or vbDefaultButton1, "User Intervention Needed", "&Print", "Pre&view", "&Cancel", _
             , , , 10, True, vbBlue, CurrentProject.Path & "\" & "question.bmp")

'"&Print", "Pre&view", "&Cancel"
  
    Case "&Print"
        .CalendarCrt.PrintCalendar2 False
    Case "Pre&view"
        .CalendarCrt.PrintPreviewOptions.Title = "ServiceXp Pro Schedule Previewer"
        .CalendarCrt.PrintPreview True  ', 100, 100, 800, 600
    Case "&Cancel"
        'Do nothing
End Select

End With

 No matter how I call the print command I get what I described in my prev. post.. No matter what I try it still happens even with PrintPreviewExt ..


WBR
Robert


 





Posted By: mdoubson
Date Posted: 05 November 2009 at 7:20pm
Still I am not sure that we are testing same version. I add rev # in AboutBox text - please get fresh ocx
https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar
registrate it and be sure that in your form you will see "rev9839" as part of AboutBox


-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 06 November 2009 at 10:21pm
Hey Mark,
  Updated to the latest control, the one with the Rev. in the AboutBox.. Issue persist exactly the same...

Sorry buddy, it's just not working....

WBR
Robert



Posted By: mdoubson
Date Posted: 07 November 2009 at 11:07am

Need to look into you project - please open issue and attach - I will check. VB CalendarSample and MFC CalendarDemo working well with new mode - you can try in updated https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar

Use option pane to set on and off DF_mode (bottom left check box) and see result

-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 09 November 2009 at 12:44pm
Originally posted by mdoubson mdoubson wrote:

Need to look into you project - please open issue and attach - I will check. VB CalendarSample and MFC CalendarDemo working well with new mode - you can try in updated https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar - https://forum.codejock.com/uploads/DemoVersion/CalendarDemoStatic.rar

Use option pane to set on and off DF_mode (bottom left check box) and see result
 
 
  Mark,
I'm currently off location, but got your email so am trying this on a non dev machine from another location.  (Win XP Pro OS)
 
By the way have you tested this in MS Access (2007 .mdb) yet..?  That is the enviroment that I'm working in. 
 
I downloaded the static .exe, loaded up multi-schedules, change the time scale to 15 min., added  some events, move to an empty cell at 1:00pm on the far left resource. When I hit print, I still get the very fast red background flash, and while the actual calendar section doesn't move, the vertical scroll bar does.  The cell at 1.00pm is no longer active and it apears to have moved off sceen from the 1.00pm cell to the 8:00am cell.  I think this is what's causing the scroll bar to move to the new location, even though the calendar does not.
 
Recap:
 
So in the static VB example , the calendar section doesn't jump, but in MS Access it does. (In both vertical scroll bars are moving, but in Acces so does the actual calendar)  What I need to find out when I get back into the office is if this printing is causing any events to fire causing my code to "refresh" the calendar section...
 
Again thanks for staying with this Mark,
 
WBR
Robert
 
 
 
 
 
 
 


Posted By: mdoubson
Date Posted: 09 November 2009 at 12:52pm
Try this:
CalendarControl.ShowCaptionBarExpandButton = True
Now you can see and use CaptionBar chevron (most right arrow button). Click on this button will call PrintPreview. Compare with your case please


-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 09 November 2009 at 6:54pm
Originally posted by mdoubson mdoubson wrote:

Try this:
CalendarControl.ShowCaptionBarExpandButton = True
Now you can see and use CaptionBar chevron (most right arrow button). Click on this button will call PrintPreview. Compare with your case please


 Mark,

  Did that, and this is what I get. (I thought a picture is worth a thousand words so... ;-) )

Position on the calendar before I click on chevron button.



This is what happens when I click on the chevron button, while the print preview is open.



This is what the screen looks like after I have closed the print preview (notice the calender position and the vertical scroll bar)



This is what the screen looks like after I click on the vertical scroll bar. (In jumps from the above position to this one with out the calendar moving.)



Hope this helps...

WBR
Robert




Posted By: mdoubson
Date Posted: 09 November 2009 at 7:11pm
I see - this is absolutely different behaviour compare with MFC and VB case.
PrintPreview on chevron click suppose to run as maximazed (full screen) window. Looks like Access (2007?) prevent it.
And after you close PrintPreview your DayView should start with 10:00 position - same as was before you call PrintPreview.
Could you open the issue and attach your Access project please.


-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 09 November 2009 at 8:10pm
Thank you for red background catch - please try updated version (rev 9849)
https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar


-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 10 November 2009 at 9:06am
Originally posted by mdoubson mdoubson wrote:

I see - this is absolutely different behaviour compare with MFC and VB case.
PrintPreview on chevron click suppose to run as maximazed (full screen) window. Looks like Access (2007?) prevent it.
And after you close PrintPreview your DayView should start with 10:00 position - same as was before you call PrintPreview.
Could you open the issue and attach your Access project please.
 
  So as not to add confusion, the print preview does open maximized, but on dual monitor setup it loads to other monitor. Many of my customers use a dual monitor setup.  Just didn't want you to start chasing a rabbit trail..
 
  The only real problem(s) is the calendar not retaining position, and the thing that the calendar section does (Splitting from the top section reveling red) , I would think needs to be corrected also.
 
  What exactly do you need from me, the entire project, or just the .mdb file?  This may get a little complicated as there are many 3rd party controls embedded, Security is enabled, ect ect.. and separating out just the calendar code and functions may prove to be a problem also...
 
WBR
Robert


Posted By: rgracie
Date Posted: 10 November 2009 at 9:07am
Originally posted by mdoubson mdoubson wrote:

Thank you for red background catch - please try updated version (rev 9849)
https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar - https://forum.codejock.com/uploads/BetaOCX/CalendarBeta13-2.rar
 
  Ah, will do when I get back in to the office...
 
Thanks!
 
WBR
Robert
 


Posted By: rgracie
Date Posted: 11 November 2009 at 6:21pm
Mark,
  Latest control fixed the red background problem perfectly, but of course the calendar resetting still persists...


Thank
WBR
Robert




Posted By: rgracie
Date Posted: 12 November 2009 at 8:35am
Found 2 additional bugs in the new control this morning...
 
1) When printing the calendar the events are getting resized very oddly, but the internal text is not (so looks even more odd). The calendar on the screen looks perfect with no overlapping boxes..
 
I'm going to try and send you an example pic (contains sensitive data so I can't post it public). Very strange.
 
2) The print time-frames are set for the calender to print from 7am to 6pm.  It does print 7:00am but only shows to 5:00pm.
 
WBR
Robert
 
 
 


Posted By: skiman
Date Posted: 12 November 2009 at 1:17pm

Hi,

I can confirm this behaviour. I'm using the ActiveX with Xbase++, and the report also changes the view of the calendar.

I also have a problem with the print-button in the preview. The preview is displayed, I can select the print-button. It looks as the print is send to the standard printer, but nothing is printed. I have to check this more in detail. At this moment I don't know if it is something is my code or not.

Best regards,

Chris.



-------------
ABO Service


Posted By: mdoubson
Date Posted: 12 November 2009 at 4:04pm
You need to check your CalendarControl.DayView.TimeScaleMinTime and CalendarControl.DayView.TimeScaleMaxTime and CalendarControl.Options.WorkDayStartTime and CalendarControl.Options.WorkDayEndTime. Second range can be equal to first one OR be inside first one. Try both cases

-------------
Mark Doubson, Ph.D.


Posted By: rgracie
Date Posted: 12 November 2009 at 9:36pm
I FOUND IT.....

  I tried almost every setting pertaining to print options, in every different possible combination and found what causes the screen to more (or reset).... You ready for this..........


.PrintFromToExactly = True

Yep, set it to False and it stops... Whoa... Finally....

Wow, what a saga this turned out to be... Amazing....

WBR
Robert







Posted By: mdoubson
Date Posted: 12 November 2009 at 10:02pm
Sure - I make this mode very flexible and support different variants with flags:
CalendarControl.DayView
boolean EcoMode;
int DayHeaderPeriod;
boolean DraftMode;
boolean RepeatHeaderMode;
boolean DF_Mode;
boolean EcoAllDayMode;
and also:
CalendarControl.PrintOptions
DATE PrintFrom;
DATE PrintTo;
boolean PrintFromToExactly;


Posted By: rgracie
Date Posted: 13 November 2009 at 8:47am

So to recap:

  We now have embedded capabilities to (automatically changing time scale) handle printing the entire day using (.DayView.DF_Mode = True), but Is there a property that we can set to say 45 min or 30 min instead of 60 min.? ( I know you can't get the entire schedule then, but it should be enough to satisfy 99% of all needs)
 
  We have identified the red flashing and resolved. 
 
  So there seems to be only 2 more items that need to be resolved.
 
1) Preventing the calendar reset when using .PrintFromToExactly = True.
 
2) Fixing the way events are adjusted when using the .DayView.DF_Mode = True 60 min Property. If the schedule is using 15 min as the time scale, when moving it to 60 min, for printing purposes it starts overlapping events. (as seen in the private PM to Mark.
 
Thanks For all your Help Mark!!
 
I will Start a Ticket on the remainder of these "issues"
 
WBR
Robert
 
 
 



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