Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Need help with Scheduling Report
Jodin
Hi. I'm working on a scheduling report and I'm not quite sure how to do it in BIRT or even if it is possible. We have staff members that have their work times stored on a table. For simplicity, let's say that their available times for all weekdays are 8am to 5pm. Then we have an appointment table that stores the staff member's appointments for each day. What I need to do is print out the schedule for the staff member like the following:
8:00 am to 9:00 am *** OPEN ***
9:00 am to 10:00 am Description of service being provided
10:00 am to 11:00 am Description of service being provided
11:00 am to 12:00 pm *** OPEN ***
12:00 pm to 1:00 pm Description of service being provided
1:00 pm to 2:00 pm *** OPEN ***
2:00 pm to 3:00 pm Description of service being provided
3:00 pm to 5:00 pm *** OPEN ***
All of the "*** OPEN ***" times will be based on the 8am to 5pm minus the scheduled appointments. Does this make sense? We currently have a program that does this but we are trying to convert it over to BIRT. To me, this looks like it might require some Javascript code, but I'm not sure where it should go. I don't think there is a way to pull this straight from SQL, but maybe there is.
Find more posts tagged with
Comments
mwilliams
So, in your database, you'd have a time and a description? But no time or description if nothing is scheduled for that hour? So, the blank or "OPEN" hours wouldn't return in your dataSet? If this is the case, you could simply create a scripted or flat file dataSet that returns every hour, then join this dataSet with your other dataSet and use computed columns to merge the descriptions together. If an actual description doesn't exist, you put in "OPEN".
Hope this helps. Let me know if you have questions.
Jodin
That sounds like a promising idea Michael. Thanks!
Jodin
Is it possible to set up an array from my table data and the use this to create the report? Is Javascript able to do this? Do you know of any example reports that use an array? Thanks.
mwilliams
Can you explain a little more about your idea? You can use javascript in a scripted dataSet to create the correct values. You'd just have to run your other dataSet first, store your table data in an array, grab this array in your scripted dataSet and fill in the missing points with "open". Let me know more about how you're wanting to do it and I'll try to help you out!
Jodin
I'm not sure what you mean by scripted dataset. How is a scripted dataset created? Thanks.
mwilliams
Can you post some of what your data looks like? And let me know your BIRT version? I'll try to make you a quick example that uses a scripted dataSet and a joint dataSet to get what you're wanting.
A scripted dataSet is one where you use external java files and script in your dataSet or just script in your dataSet to create/grab the data for the dataSet. You create a scripted dataSource just like you would any other dataSource, just select the scripted option. Same for the dataSet. You define the columns your script will return in your dataSet editor, and you will then use your open and fetch script to create/grab your data. There are examples of scripted dataSources in the devShare, but like I said, if you show me what your data looks like, and tell me your BIRT version, I'll make you a quick example.