Not able to generate report with Calendar

(20 posts) (2 voices)

Tags:

No tags yet.

  1. jasmondluk, Member

    I am trying to generate a report with Calendar but I get the error message "Please include the Calendar functionality from the report info".

    My sql is:

    select 'dbr.calendar', 800;
    select 'dbr.calendar.report', 'sp_DBR_calendar_data', 1;

    select 'dummy' as 'dummy';

  2. myDBR Team, Key Master

    Calendar is a myDBR extension.

    Go to report settings and check the Calendar extension checkbox. This will enable the functionality.


    myDBR Team

  3. jasmondluk, Member

    Can you show me where can I find the checkbox?

  4. myDBR Team, Key Master

    Hi,

    1. Go to the folder where the report is and click 'Edit' under the report
    2. In the Edit report-page under the "Report extensions" check the 'Calendar' checkbox

    --
    myDBR Team

  5. jasmondluk, Member

    I am now able to generate the calendar. However I am not able to load the event into the calendar. Here is the sql

    select 'dbr.calendar', 800;
    select 'dbr.calendar.options', 'weekNumbers', 0;
    select 'dbr.calendar.report', 'sp_DBR_calendar_data', 1;

    select '2023-02-01 17:00:00' as 'datetime_from', '2023-02-01 17:00:00' as 'datetime_to', 'R Chi' as 'description'
    union all
    select '2023-02-02 14:00:00', '2023-02-02 14:00:00', 'R Chi'
    union all
    select '2023-02-02 14:00:00', '2023-02-02 14:00:00', 'R SPK'
    union all
    select '2023-02-01 18:00:00', '2023-02-01 18:00:00', 'R Math'
    union all
    select '2023-02-01 16:00:00', '2023-02-01 16:00:00', 'R Math'
    union all
    select '2023-02-01 16:00:00', '2023-02-01 16:00:00', 'R Math'
    union all
    select '2023-02-01 17:00:00', '2023-02-01 17:00:00', 'R SPK'
    union all
    select '2023-02-01 17:00:00', '2023-02-01 17:00:00', 'R Math'
    union all
    select '2023-02-01 15:00:00', '2023-02-01 15:00:00', 'R Math'
    union all
    select '2023-02-01 11:00:00', '2023-02-01 11:00:00', 'R Math'
    union all
    select '2023-02-01 14:00:00', '2023-02-01 14:00:00', 'R Math'
    union all
    select '2023-02-01 16:00:00', '2023-02-01 16:00:00', 'R Eng'
    union all
    select '2023-02-01 16:00:00', '2023-02-01 16:00:00', 'R Eng'
    union all
    select '2023-02-01 14:00:00', '2023-02-01 14:00:00', 'R SPK'
    union all
    select '2023-02-01 10:00:00', '2023-02-01 10:00:00', 'R Math'
    union all
    select '2023-02-01 17:00:00', '2023-02-01 17:00:00', 'R Math'
    union all
    select '2023-02-01 16:00:00', '2023-02-01 16:00:00', 'R Math'
    union all
    select '2023-02-01 18:00:00', '2023-02-01 18:00:00', 'R Math'
    union all
    select '2023-02-01 14:00:00', '2023-02-01 14:00:00', 'R Eng'
    union all
    select '2023-02-01 15:00:00', '2023-02-01 15:00:00', 'R Math'
    union all
    select '2023-02-01 14:00:00', '2023-02-01 14:00:00', 'R Math'
    union all
    select '2023-02-01 18:00:00', '2023-02-01 18:00:00', 'R Math'
    union all
    select '2023-02-01 17:00:00', '2023-02-01 17:00:00', 'R Math'
    union all
    select '2023-02-01 17:00:00', '2023-02-01 17:00:00', 'R Eng'
    union all
    select '2023-02-01 16:00:00', '2023-02-01 16:00:00', 'R Math'
    union all
    select '2023-02-02 16:00:00', '2023-02-02 16:00:00', 'R SPK'
    union all
    select '2023-02-02 15:00:00', '2023-02-02 15:00:00', 'R Math'
    union all
    select '2023-02-02 16:00:00', '2023-02-02 16:00:00', 'R AW'
    union all
    select '2023-02-02 16:00:00', '2023-02-02 16:00:00', 'R AW'
    union all
    select '2023-02-02 15:00:00', '2023-02-02 15:00:00', 'R Math'
    union all
    select '2023-02-02 17:00:00', '2023-02-02 17:00:00', 'R Math'
    union all
    select '2023-02-02 17:00:00', '2023-02-02 17:00:00', 'R Math'
    union all
    select '2023-02-02 17:00:00', '2023-02-02 17:00:00', 'R Math'
    union all
    select '2023-02-02 11:00:00', '2023-02-02 11:00:00', 'R Chi'
    union all
    select '2023-02-02 15:00:00', '2023-02-02 15:00:00', 'R Math'
    union all
    select '2023-02-02 16:00:00', '2023-02-02 16:00:00', 'R Math'
    union all
    select '2023-02-02 14:00:00', '2023-02-02 14:00:00', 'R SPK'
    union all
    select '2023-02-02 17:00:00', '2023-02-02 17:00:00', 'R Math'
    union all
    select '2023-02-02 11:00:00', '2023-02-02 11:00:00', 'R Chi'
    union all
    select '2023-02-02 15:00:00', '2023-02-02 15:00:00', 'R Math';

  6. myDBR Team, Key Master

    You either get the data to the calendar via report defined by dbr.calendar.report. This means that when you navigate in the calendar (go to next week, next month etc.) myDBR fetches the data in the background.

    If you have only a static set of calendar entries you want to show, you can set the data query in the main report (as you do in your code above). In that case you do not use the dbr.calendar.report. If you remove the dbr.calendar.report call, you see the calendar being populated.

    Take a look at the documentation with examples.

    --
    myDBR Team

  7. jasmondluk, Member

    Thanks. For the "Month view" , is it possible to show more than one month data? Says, 6 weeks without navigate to next month?

  8. myDBR Team, Key Master

    If you update to the latest build, you can use option:

    select 'dbr.calendar.options', "fixedWeekCount", "true";

    When fixedWeekCount is false (the default), the monthly view will show full month, 4-6 weeks depending on the month). When it is set to true, the calendar will always show 6 weeks.

    --
    myDBR Team

  9. jasmondluk, Member

    Thanks. I am trying to export it to PDF but got below questions.

    1. The calendar header is shown as "Monday, January 5, 1970", "Tuesday, January 6, 1970" etc, can it be shown as "Mon", "Tue" like the online report?
    2. The calendar date is shown as "February 1", "February 2" etc, can it be shown as "1", "2" only just like the online report?
    3. Is it possible to remove the options menu "month/week/day/list" in the pdf?
    4. Is it possible not to highlight the today in pdf?

    Thanks.

  10. myDBR Team, Key Master

    myDBR uses FullCalendar for the calendar functionality and wkhtmltopdf for PDF generation. Unfortunately FullCalendar use JavaScript functionality that does not exists in wkhtmltopdf (full Intl.DateTimeFormat capability). To fix that one would have to patch the FullCalendar for wkhtmltopdf.

    If you use the browser's Print-To-PDF functionality you will get better results.

    --
    myDBR Team

  11. jasmondluk, Member

    Which party can patch the FullCalendar for wkhtmltopdf?

    Is it possible to remove the options menu "month/week/day/list" in the online report?

    Thanks

  12. myDBR Team, Key Master

    If you run the updater, the PDF export of the calendar will now work better.

    Note that for PDF export, the data for the calendar needs to be fetched diretctly, not with Ajax.

    --
    myDBR Team

  13. jasmondluk, Member

    Thanks.

    Is it possible to remove the options menu "month/week/day/list"?

  14. myDBR Team, Key Master

    You can either use CSS to hide it or run the updater and myDBR will do it for you.

    --
    myDBR Team

  15. jasmondluk, Member

    I have already done the update and it still show the menu in pdf

  16. myDBR Team, Key Master

    Make sure you are running the latest build (at least build 4794).

    --
    myDBR Team

  17. jasmondluk, Member

    It is ok now after updating to 4794.

    The today is highlighted in yellow in pdf, is it possible not to highlight it? Thanks.

  18. myDBR Team, Key Master

    You can use CSS to remove the highlighting.

    From the calenard page and open the developer tools and point to the object in question. There you can see that the CSS rule that sets the color is .fc .fc-daygrid-day.fc-day-today. You can then override the rule in the report for PDF export (PDF report adds class pdf to html-tag):

    select 'dbr.css', 'html.pdf .fc .fc-daygrid-day.fc-day-today {background-color: inherit}';

    --
    myDBR Team

  19. jasmondluk, Member

    I am not able to find the developer tools, can you shed more lights how to find it?

  20. myDBR Team, Key Master

    See this.


    myDBR Team


Reply

You must log in to post.