When launching icCube report how can I get the user name

ic3

in ic3Report.html file, is it possible to get the user name in the callback function ?

var options = {
        root: "ic3-report/app/",
        rootLocal: "ic3-report/app-local/",
        rootVersion: "_IC3_ROOT_VERSION_",
        callback: function () {
            $('#intro').remove();
            window.ic3application = ic3.startReport(
                    {
                        <!-- ic3-start-report-options (DO NOT REMOVE - USED TO GENERATE FILES) -->
                    });
           // get user name here !
        }

    };
Artem Lopatiy

in order to gather current user information you should setup GVI configuration. It could be done with appropriate method:

var options = {
    root: "ic3-report/app/",
    rootLocal: "ic3-report/app-local/",
    rootVersion: "_IC3_ROOT_VERSION_",
    callback: function () {
        $('#intro').remove();
        var ic3reporting = new ic3.Reporting(
                    {
                        noticesLevel: ic3.NoticeLevel.INFO,
                        dsSettings: {
                            url: GVI_URL
                        }
                    });
        ic3reporting.setupGVIConfiguration(function () {
            var userName = ic3reporting.userName();
        })
    }
};

After that user information will be available inside context. See code above for details.

Update

A more robust solution is adding the code to the local files that are not overwritten with a new version of the reporting. You can use ic3bootstrapLocal function in Admin > Common JS configuration.

function ic3bootstrapLocal(options) {  
   var ic3reporting = new ic3.Reporting({
       noticesLevel: ic3.NoticeLevel.INFO,
    });

   ic3reporting.setupGVIConfiguration(function(){
      ic3reporting.userName()
      options.callback && options.callback();     
   });        
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I add empty space at the bottom and right of an icCube report?

How can I send the member name when a user tag someone

How can I get the name of voter from the user's table?

How can I get name of the user executing my Perl script?

How to get a users avatar when I only have the name of the user?

how can i get an object name when it is created in java?

How can I get a function name when it is being called?

How to get current login user name in qweb report odoo

How can I get Firebase Notification Body when user clicks?

When the user logs in how can I get that particular users details?

How can I get the socket.id of a user when they connect?

How can I get the event when user type a URL and go to it?

IcCube - How to print a report in landscape?

How can i get User name in a table where user_id is used as foreign key

How can I get a user (not the currently logged in user) by Id, name, email or other search criteria, using UserManager?

when launching an EC2, can I include a script file with arguments in user_data field?

How can I reuse an old user name?

How do i get the user name in a Makefile?

Crash report from a user. How can I solve this crash?

How can I run an SSRS report as the current Windows User?

Get winlows login name after launching python as another user

How can I changed git user password when changing user.name and user.email did not work?

How can I get Onboard (the screen keyboard) to stop launching every time I log in?

How do I fix this error log I get when launching eclipse?

How can I find out the name of the user when in a ASP.Net Web API Controller?

How can I split the first and last name from one user input when they are separated by a comma?

How can I get the user first name from facebook in cloud code?

How Can I get a Particular User Group Name in Django Form Query

How can I get the name of the current user from the Json Web Token?