Birt: Store user stay time on reports and visit counts to database - mysql

I have deployed birtviewer on tomcat 7. I am using tomcat form based authentication to control users access to the reports. Currently I have come up with a requirement to store to mysql database the user visits counts and the time he spends on each birt report
I have done seme research on how to extract total session time from session variable but the problems I am facing are below
1) A session starts as soon as a user logs in. How do I collect the session info for the subsequent reports? For example I have some bunch of reports that are connected to a main report. If a user logs in, he is taken to the main page. After that, the user is not required to log in to the next reports that user visits. If the user visits other reports, how do I collect the information about the time that user spends on each report?
2) I would also like to collect the visit counts that a user makes to each report? How can I collect this info?
3) How can I send this info from birt reports to the database?
Please let me know if you have any questions or need more explanation. I have googled and could gather information about how to extract info from session variable but I could get any info on how to do it for each birt report separately (even though all the reports user the same session info)
Regards
Arif

you could write a ServletFiler in Java and add the packed jar to the WEB-INF\lib folder of your BIRT Viewer and configure the Filter mapping in the WEB-INF\web.xml of your viewer, so it is triggered every time you call an URL of the BIRT Viewer.
Insider your filter you can read the session time and save the timestamp and a click counter to your database. You can calculate the visited time by substracting it from the next saved timestamp identified by the session ID.

Related

How to send notification based on date stored in DB

I am building an CRM (Customer Relationship Management) web app using NodeJS and angular js. The user will set a date time to contact client in case the client is unreachable. The part where I am stuck is to show user a notification if they are logged in based on the datetime set by them. This SO post talks about using socket. I am unable to understand how to use it with MySQL as the datetime is stored in DB.
The steps followed by CRM user are
CRM user will call the client and records the information.
In case if client is busy they will record the date time when to call next as suggested by client.
When the current datetime is equal to recorded datetime of next call back, the CRM user should get a pop-up or alert to call back the client.

Programmatically fetch user's last login date to G Suite

On a user's page on the G Suite admin console, an admin can see the last login of a user. For example, one user I can see has a "last login" date of two years ago.
I'm trying to pull this date programatically. However, the Reports API that provides information on login events only goes back 180 days. How is Google getting this login date, and can it be fetched via API?
Google has this information because they are logging the event when it happens and storing that to present in the admin console. If you start to build an application now and start storing those events as time passes you too will have a date that goes back years. G Suite Enterprise customers can seamlessly do this if they Set up BigQuery logs in the Admin console.
You should be able to get this information now though. Look at the following APIs used in GAMADV-XTD you can get this info with this command for example.
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime#" filtertime -5y
https://developers.google.com/admin-sdk/reports/v1/reference/activities
https://developers.google.com/admin-sdk/reports/v1/reference/customerUsageReports
https://developers.google.com/admin-sdk/reports/v1/reference/userUsageReport
I somehow missed this before, but you can get the last login date/time with the User Usage Report (rather than the Login Activity report).
API docs are here and the App Script example I'm using is here. I realized that if GAM was pulling the information there had to be an API for it.

About Powerbi Embedded Reports Scheduled Refresh

We are planning to publish our powerbi reports in our sub-domain as a product for our customers. Our reports are refreshing on scheduled manner as new data arrives; hourly, daily, or per 3 hours (or live) etc. We initially tried to use 'publish to web' option, but we realise there is about one hour to see updates on published reports. We need it to be updated as scheduled update occurs.
We are considering to use embedded reports, but we could not find too much any information about how it refreshes. (we are using mysql as datasource for most of our reports)
Can we use embedded reports for that aim? Would it be refreshed instantly as we scheduled refresh our dataset/reports? Or are there any seperate methodology for refreshing embedded reports?
Power BI Embedded reports' data refresh is subject to how you define the refresh policy in Power BI. You can define a Scheduled Refresh (up to a limit defined by your capacity) or you can trigger a Refresh Now API call as described here:
https://powerbi.microsoft.com/en-us/blog/announcing-data-refresh-apis-in-the-power-bi-service/
As for the report's data, once the dataset is refreshed, any new render of the report would show the updated data.
If during the same session, you'd want to refresh the view of the report (by knowing that it has newer data) you can always call the Javascript SDK's report.refresh() call on the report.
https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embedding---Basic-interactions#refresh-a-report
Please refer my article which explains about the data-set refresh manually and also using the WebAPI services
https://snkrishnan1.wordpress.com/2018/07/07/powerbi-dataset-refresh-using-net-webapi-service/

Scheduling the Storing of BO Reports in PDF Format

Is it possible in BusinessObjects 4.0/4.1 to do the following:
Create a report in PDF format
Transfer and store the report on some Windows Share folder
Schedule this process
It this is possible, can anyone give short guidelines on how to do it? Thanks!
Sure, that's basic scheduling functionality.
From Launchpad, right-click on the report and hit "Schedule".
Click the recurrence tab to set the scheduling recurrence.
Click the Formats tab and select Acrobat.
Click the Destinations tab and select File System.
One important note on Destinations -- you can optionally enter the Windows user name and password that will be used to connect to the file share when the report is generated. You can leave this blank, in which case the BO server will connect to the file share as the account that BO runs as (that is, the user name that the SIA service runs as). In this case, the service account must have r/w permission to the file share. On the other hand, if you enter credentials manually, you need to make sure that any recurring schedules get updated if/when you change the accounts password, else the account will quickly get locked out (I know from experience....)
For more info, click the Help menu in Launchpad, then review the section on Scheduling Objects.

Can SSRS report be used to submit requests?

I have created a report for particular products which pulls up product number and types of products related to those product numbers. It is a very simple report where user is allowed to enter product number in a parameter which returns all the data related to this product. Main purpose for this report was to create pdf files for individual product numbers and all its data. So I decided to do data driven subscription to provide this functionality to the business users. Now, in the business requirement it says that "business submits request to pull 200 products and get a message saying "your request will be delivered to this particular folder within 24 hours" Now this is the part where I got confused. Can a report take request and display messages like that?
Requirements: 1.request is submitted by business to pull 200 producttypes let's say today. Then message is received "thank you for requesting. We will send an email to"[email address just entered] " when the report is ready. Files will be delivered to the following folder: [Path+date, time]" I don't know what email address he's talking about here I'm assuming he wants the report to accept emails when submitting the request. And date time on the folder path will the time request was submitter. 2. A job is kicked off to slowly deliver producttypes to the folder path. 3. Resulting file are places in a new subfolder named todaysdate+time. 4. Filename is productnumber. I have got the part down to create a report that has two columns productnumber and producttypes which has a data driven subscription that delivers files with productnumber name in folder. But I don't understand this message and request thing he's talking about. Also how to generate a subfolder depending on the time of the request. Thanks Daniel
Yes
Report can handle this.
Please provide more details and I will work this out for you.
Daniel
One way that comes to mind is by having two sets of reports and two stored procedures.
Report 1 and stored procedure1 would get the parameters and update the report data (see "When the report data is updated on the report server" option in the data driven subscription wizard) and the other report would then be executed and email/save the files in the required format.
Your first SP however needs to flag that your second report needs to be executed.