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

sri.vedantham

Members
  • Posts

    10
  • Joined

  • Last visited

sri.vedantham's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. I am using JasperServer 5.0.1 Here is my code: ----------------------------------------------------------------- import com.jaspersoft.ireport.jasperserver.JServer; import com.jaspersoft.ireport.jasperserver.ws.WSClient; import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor; JServer jServer = new JServer(); String jUserName = "jasperadmin|sumtotal"; String jPassword = "jasperadmin"; String webserviceURL = "http://localhost:8280/jasperserver-pro/services/repository?wsdl"; String dataSourceURI = "/Data_sources/SP91_8310_DW"; //String reportsFolderPath = "/organizations/organization_1/organizations/sumtotal/Reports/Canned"; String reportsFolderURI = "/organizations/organization_1/organizations/sumtotal/Reports/Canned/Repo1_files"; File resourceFile = null; //Authenticate jServer.setUsername(jUserName); jServer.setPassword(jPassword); jServer.setUrl(webserviceURL); WSClient client = new WSClient(jServer); //prepare the resource descriptor for jrxml ResourceDescriptor jrxmlDis = new ResourceDescriptor(); jrxmlDis.setWsType(ResourceDescriptor.TYPE_JRXML); jrxmlDis.setName("Instructor_Details"); jrxmlDis.setLabel("Instructor Details"); jrxmlDis.setDescription("Instructor Details report"); jrxmlDis.setIsNew(true); jrxmlDis.setHasData(true); jrxmlDis.setMainReport(true); jrxmlDis.setReferenceUri(reportsFolderURI); jrxmlDis.setIsReference(true); //prepare the resource descriptor for data source ResourceDescriptor dsDis = new ResourceDescriptor(); dsDis.setWsType(ResourceDescriptor.TYPE_DATASOURCE); dsDis.setReferenceUri(dataSourceURI); dsDis.setIsReference(true); //add the above descriptors ResourceDescriptor rd = new ResourceDescriptor(); rd.getChildren().add(dsDis); rd.getChildren().add(jrxmlDis); //resourceFile = new File(getFileResourceURL("InstructorDetails.jrxml") ); resourceFile = new File("F:/JasperWork/JReports/InstructorDetails.jrxml"); ResourceDescriptor result = client.addOrModifyResource(rd, resourceFile); ------------------------------------------------------------------------------------------------------------------------------- and this is the error I get May 07, 2013 5:05:52 PM org.openide.util.NbPreferences getPreferencesProvider WARNING: NetBeans implementation of Preferences not found 2013-05-07 17:05:53,613 main INFO [commons.httpclient.auth.AuthChallengeProcessor] basic authentication scheme selected java.lang.Exception: 6 - No URI given. at com.jaspersoft.ireport.jasperserver.ws.WSClient.putReportUnitResource(WSClient.java:570) at com.jaspersoft.ireport.jasperserver.ws.WSClient.modifyReportUnitResource(WSClient.java:509) at com.jaspersoft.ireport.jasperserver.ws.WSClient.addOrModifyResource(WSClient.java:463) at myTest.helloWorld.main(helloWorld.java:98) Exception in thread "main" java.lang.Exception: 6 - No URI given. at com.jaspersoft.ireport.jasperserver.ws.WSClient.putReportUnitResource(WSClient.java:570) at com.jaspersoft.ireport.jasperserver.ws.WSClient.modifyReportUnitResource(WSClient.java:509) at com.jaspersoft.ireport.jasperserver.ws.WSClient.addOrModifyResource(WSClient.java:463) at myTest.helloWorld.main(helloWorld.java:98) ------------------------------------------------------------------------------------------------------- Is there anything missing? Can you give details steps to correct the code.
  2. I am able to bypass login page of JasperReports by giving crenetials as querystring params in the URL. But in case of multi tenancy how do we supply the Organization parameter in query string? Tried out the following URL http://localhost:8080/jasperserver-pro/?j_username=jasperadmin|organization_1&j_password=jasperadmin but it did not work. Always gives invalid credentials supplied
  3. I have two installations of Jasper v5.0.1 on two separate machines. M1. The installer .exe version M2. The binary war version installed using js-install scripts to get the jasper server repository created in ms sql server database rather than postgres When I try to bypass the login page and connect to jasper with the following URL http://localhost:8181/jasperserver-pro/?j_username=jasperadmin&j_password=jasperadmin it works fine with (M1) while it gives me "Invalid credentials supplied. Could not login to JasperReports Server." error on (M2) . Is there any difference with these versions or am I missing anything here?
  4. I am trying to by pass the login page by passing the username and password in the query string in the URL. But when there are multiple organizations then how do you pass the Organization parameter in the query string? I tried the following URLs but no luck URL: http://localhost:8280/jasperserver-pro/flow.html?_flowId=searchFlow&mode=search&j_username=jasperadmin|Customer1& j_password=jasperadmin http://localhost:8280/jasperserver-pro/flow.html?_flowId=searchFlow&mode=search&j_username=jasperadmin|organization_1& j_password=jasperadmin
  5. I want to insert few JOINs to the report query being run at run-time. This is to JOIN few security related tables to filter out the data. Is this possible? If 'yes' how to achieve it?
  6. Jasper controls the resource access in two ways - By Role or By User. I have a scenario in which we have to create a user group and then assign access permission to this group. Any user part of this group gets the respective permissions applied and resource visibililty/access can be based on. 1. Is it possible to create a user group and assign permission 2. Can the permissions be modified for any reason to suit my requirement ThanQ
  7. I had installed jasperreportserver on SQL server using js-install scripts. I have following questions on exploring the database objects for my work a) I did not find any stored procedures in jasperserver database. How is the data from tables retrieved by jasper? For example, when you view reports on jasper UI how does jasper retrieve the data from tables? b) When a report is published (ad-hoc report or jrxml upload) there is a query generated behind. Which table does the query gets stored? c) Is there any documentations available on the web site to understand the databse objects and the retreival part in depth? Your help is much appreciated. Thanks
  8. I am using JRS5.0.1. By going through some of the answers in this forum I had changed the actionModel-navitaion.xml file to hide the View and Library menu items on screen for a ROLE_USER user. But the Library item is not getting hidden. Also the home item is not getting hidden. One additional thing I observed was there is a js error while logging in as normal user. Exception thrown and not caught ext.utils.prototype.js Code: 0 URI: http://localhost:8280/jasperserver-pro/scripts/ext.utils.prototype.js Line: 633, Char:5 I want to avoid this error and hide the home and librarby menu items as well. Can some one suggest me how to do this? Thanks
  9. Is there any other way to connect use SQL Server 2008 as the JasperReports Server repository other than using WAR file? Is it possible to have an installation .exe file that can connect the repository to SQL server or in fact any database? Thanks SPV
×
×
  • Create New...