Report Issues |
Post Reply |
Author | |
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
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
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Did you try your cases under 13.2 version?
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Try to decrease CalendarControl.DayView.TimeScale = 10 '- interval in minutes (or 15...)
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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()
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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 #)
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Most simple case - call CalendarControl.DayView.ScrollToWorkDayBegin in the end of mnuPrintPreview_Click or mnuPrint_Click code
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
Bump...
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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. |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Still I am not sure that we are testing same version. I add rev # in AboutBox text - please get fresh ocx
registrate it and be sure that in your form you will see "rev9839" as part of AboutBox
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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 Use option pane to set on and off DF_mode (bottom left check box) and see result |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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.
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Thank you for red background catch - please try updated version (rev 9849)
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
Ah, will do when I get back in to the office...
Thanks!
WBR
Robert |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
Mark,
Latest control fixed the red background problem perfectly, but of course the calendar resetting still persists... Thank WBR Robert |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
skiman
Groupie Joined: 20 December 2008 Location: Belgium Status: Offline Points: 88 |
Post Options
Thanks(0)
|
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
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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; |
|
rgracie
Groupie Joined: 12 November 2006 Status: Offline Points: 75 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |