Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    PrintPreview on Calendar not rendering events.

    "v10.0d_2014-02-13/LGPL Deployment"

    Hello, I have a requirement to print a preview of the calendar including all events in it.

    Currently I have 30+ lanes with multiple events in each lane, and If I do a print preview, the whole calendar is printing but without events, after I scroll to the event it does show in the print preview.

    I've tried to set autoFitData to "both" but it doesn't work. Any Ideas of what can I do to have all the events in the preview?

    Thanks in advance.


    #2
    autoFitData would not be expected to have an effect here.

    Which CalendarView are you talking about? A vertical day view or a horizontal Timeline?

    Either way, the first thing to do is try the latest patched build of your version (10.0 will shortly be 3 versions old, and your build of it is almost 3 years old - in fact, you're using a pre-production development build) - you can find nightly builds of all versions at smartclient.com/builds.
    Last edited by Isomorphic; 30 Jan 2017, 23:02.

    Comment


      #3
      Unfortunately I can't update the library right now.

      I'm using day view and week view.

      Is there a way of getting the HTML of the event canvas so I can manually attach it to the print preview? besides that I'm not sure how to proceed, I've noticed that if the event is not rendered in the calendar it won't show in the print preview.

      In fact is easily reproducible in here:
      http://www.smartclient.com/smartclie...simpleCalendar

      at a resolution that doesn't cover all the calendar, if you click to print the example, the last events (around 10pm) won't show in the preview until scrolling.

      Comment


        #4
        Sorry, we can't suggest workarounds for potential bugs in a pre-release development build from 3 years ago - and obviously, it's not a good idea to develop software against such an unsupported build either.

        You'll have to update to a supported (post-production) build - if you still have issues against recent framework code, we can take a look.

        Comment


          #5
          Hi Isomorphic,

          this has no priority for me (not the OP), but I could reproduce easily in the current 11.0 sample (v11.0p_2017-01-31), in a Chromium 56 browser window resized to a small size.

          I think the problem is that the calendar does not react to resizes as it does to scroll w.r.t. to deciding with events to show and where to place them.
          On resize you can often observe missing or misaligned events that become visible or correctly placed after scrolling the calendar a little bit.
          The same is for the print preview. The events not rendered in the normal view are also not visible in the (possible showing more hours and therefore more events) print view.

          This is just my observation and has no priority for me as I don't use the calendar.

          Best regards
          Blama



          Comment


            #6
            Having quickly tested this, we've found and fixed the bug that caused this issue - you can test it out in nightly builds dated February 1 and later.

            You'll still need to update to get the fix, of course, and you should do so because many other fixes have also been made in the last 3 years.

            It's possible that setting (undocumented in your version) Calendar.renderEventsOnDemand to false may work for you - but that approach is undocumented and it's difficult to guess whether your development build even has that support.

            Comment


              #7
              Blama - yes, we've just fixed the issue - it was just that code that should have drawn all events just before a print attempt was using cached dates (the visible range) instead of the entire scrollable range.

              You can test it out in tomorrow's builds.

              Comment


                #8
                I just tried to upgrade our library to the latest 11.0 available and got several errors in console, and the calendar didn't display correctly, I'll keep trying with the upgrade.

                However using the feature explorer included in the server at the SDK of package "v11.0p_2017-01-31/LGPL Development Only" I was able to reproduce the issue of not rendering the events, see the attachments for the pre and post scroll.
                Attached Files

                Comment


                  #9
                  I'm sorry I missed the other posts, I'll try the latest build.

                  Thanks.

                  Comment


                    #10
                    I can confirm that the print preview is fixed in the last release, unfortunately I was unable to integrate the latest build into our app, however using "renderEventsOnDemand" during the print process solved my issue.

                    Thanks a lot!!

                    Comment

                    Working...
                    X