Jump to content
We've recently updated our Privacy Statement, available here ×

mounir.youssef

Members
  • Posts

    10
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by mounir.youssef

  1. Hi, i have a case where i should filter an item from an entity and see if it does exist in another entity and inside the same domain. as an example, the logged in user should be able to see his own records and his subordinate records as well. the user's subordinates are stored in a separate entity . here is what i m planning to set in the domain security file: <resourceAccessGrant id="request_subcategory_grant_1" orMultipleExpressions="true"> <principalExpression> attributesService.getAttribute('user_id', 'USER', false) != null and attributesService.getAttribute('can_subordinate_records', 'USER', false) = true </principalExpression> <filterExpression> request.holder in (select team_members from subordinate where manager_id = attributesService.getAttribute('user_id', 'USER', false)) </filterExpression> </resourceAccessGrant>[/code]so, the principalExpression will see if there is a profile attribute user_id and also another profile attribute which is true or false. if the logged in user has access to see his subordinate records then the filterExpression should check the request.holder item if it does exist in another table. any suggestions, propositions will be very appreciated regards, <
  2. Hi, i have the following domain security file (Column level access only). i m able to upload it to my domain. however, when i login with any user with the external role "CRYSTAL_REPORTING" and try to opn a report i got the below errors: "The report contains one or more items that are not in the source data. . You must edit the Ad Hoc View that was used to create this report, and re-save the report." PLease note that the report is dependent on a AdHoc view.and the item "TaskName" is granted so i expext to see this item only in my report. any advise will be very helpful. <itemGroupAccessGrants> <itemGroupAccessGrantList id="restrict_request_item_group_Requests" label="aLabel" itemGroupId="request" defaultAccess="denied"> <itemGroupAccessGrants> <!-- Column level for managers and admin --> <itemGroupAccessGrant id="request_item_group_access_grant_10" access="granted"> <principalExpression>authentication.getPrincipal().getRoles().any { it.getRoleName() in ['ROLE_ADMINISTRATOR'] } </principalExpression> </itemGroupAccessGrant> <!-- Column level for sales reps --> <itemGroupAccessGrant id="request_item_group_access_grant_20" access="granted"> <principalExpression>authentication.getPrincipal().getRoles().any {it.getRoleName() in ['CRYSTAL_REPORTING'] }</principalExpression> <itemAccessGrantList id="request_grant2_item_group_items" defaultAccess="denied"> <itemAccessGrants> <itemAccessGrant id="request_grant2_items_grant2" itemId="TaskName" access="granted" /> </itemAccessGrants> </itemAccessGrantList> </itemGroupAccessGrant> </itemGroupAccessGrants> </itemGroupAccessGrantList> </itemGroupAccessGrants>
  3. thanks for your answer. the solution was to use v.adhocView function and not the v.AdHocView with "A" in uppercase
  4. Hi there, is it possible to render the adhocview designer via visualizejs api? regards,
  5. v.AdHocView should be replaced by v.adHocView as per the visualize.js file. i was following the user guide that mention the AdHocView with A uppercase
  6. Hi, using jasperserver 7.1.0 with visualize.js tool. i m able to render dashboard and reports.However when trying to render an adhoc view it throws "ERROR TypeError: v.AdHocView is not a function" . DisplayAdHocViewPlaceHolder(value : any): void { visualize({ // already authenticated, so proceed with resource rendering }, function(v) { v.AdHocView({ resource: value, // value should have the resource uri container: "#placeholder", error: handleError, success: handleSuccess }); function handleSuccess(){ }; function handleError(err){} });}[/code]am i using an old visualize.js file ? please advise thanks!
  7. fixed as below. i guess i had to read more the typescript and angularjs framework: public getressources(): Promise<any> { return new Promise(function(renderResults) { visualize({ // already authenticated, so proceed with resource rendering }, function(v) { v.resourcesSearch({ folderUri: "/public", recursive: true, types: ["reportUnit","dashboard"], success: renderResults, error: handleError }); function renderResults(results) { this.resourceDetails = results; //console.log( this.resourceDetails); }; function handleError(err){ console.log(err.message); this.messageService.log(err.message); } }); })}[/code]
  8. i have the below method to validate user and then retrieve the resources from jasper server. the user credentials are validated correctly. However, the "v" varialble is always null. please advise. kindly refer me to any typscript documentation for visualizejs. public validateUser(userName: string, password: string, organization: string): Promise<any> { return new Promise(function(resolve, reject) { visualize({ auth: { name: userName, password: password, organization: organization } }, function() { resolve(); }, // successful validation function() { reject(); }, function (v) { console.log(v); v.resourcesSearch({ folderUri: "/public", recursive: true, types: ["reportUnit","dashboard"], }), //utility function function renderResults(results) { this.resourceDetails = results; console.log( this.resourceDetails); } }); });[/code]
  9. Hi, i m trying to render the list of reports retrieved from resourcesSearch function into a menu that i cretaed dynamically. the lsit is populated correctly. however, when i click on the li seems that the uri is not correct. and always refers to localhost:8080 instead of the jasperserver url <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <title>Reporting Menu - Vertical Menu Sample</title> <script type='text/javascript' src="../resources/scripts/jquery-3.3.1.js"></script> <link rel="stylesheet" href="../resources/jqwidgets/styles/jqx.base.css" type="text/css"/> <script type="text/javascript" src="../resources/jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../resources/jqwidgets/jqxmenu.js"></script> <script type='text/javascript' src="http://auditpreprod:8082/jasperserver-pro/client/visualize.js?logEnabled=true&logLevel=debug&baseUrl=http://localhost:8082/jasperserver-pro"> </script> <!--Provide container to render your visualization--> </head> <div id='content'> <script type="text/javascript"> $(document).ready(function () { // Create a jqxMenu $("#jqxMenu").jqxMenu({ width: '300', mode: 'vertical'}); }); </script> <div id='jqxWidget'> <div id='jqxMenu' class="jqxMenu"> <ul> <li id ='mainmenuid'>Reporting </li> <li id ='requestmenuid'>Request Managments <ul id ='ulrequestmenuid'> </ul> </li> </ul> </div> </div> </div> <body> <!--Provide a container to render your visualization--> <div id="placeholder"></div> </body> <script> visualize({ auth: { name: "superuser", password: "superuser" } }, function (v) { v.resourcesSearch({ folderUri: "/public", recursive: true, types: ["reportUnit","dashboard"], success: renderResults, error: handleError }); // utility function function renderResults(results) { var $dropdown = $("#selected_resource"); var $submenu = $("#ulrequestmenuid"); $("#submenu").html(""); //console.info(results); $.each(results, function(i,item) { //console.info("uri"+ item.uri); //console.info("label"+item.label); //$dropdown.append($("<option />").val(item.uri).text(item.label)); $submenu.append('<li ><a href="'+item.uri+'">'+item.label+'</a></li>'); //$submenu.append('<li ><a href="#">'+item.label+'</a></li>'); }); } $(document).on('click', $('#jqxMenu li') , function(event) { // the container was desappeared so i had to recreate it if ( $("#placeholder").length ==0) { $("<div>").attr({ 'id': "placeholder" }).appendTo("body"); $("#placeholder").html(""); } console.info(" hello " + event.target.href); //render report from another resource v("#placeholder").report({ resource: event.target.href, error:handleError }); }); //enable report chooser //$(':disabled').prop('disabled', false); //show error function handleError(err){ alert(err.message); }; }); </script> </html> please advise Mounir Youssef
×
×
  • Create New...