Jump to content
Changes to the Jaspersoft community edition download ×

pssp25

Members
  • Posts

    28
  • 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 pssp25

  1. Hi Saquib, The Concatenate function depends on the SQL engine that you are using. Which Database are you using for your reports? I think that condition that your are trying to test can be solve with : WHERE NOT IN ('val1','val2','val3') Hope it helps, Kind regards, Paulo
  2. Hi Remco, I think that is not possible because event if you are able to hack with some sort of search function. You still have the possibility to have 2 reports with same name in different folders. Plus you may have the folder permission that may ruin the access to some users. Hope this helps. Kind regards, Paulo
  3. Hi Masteryoda, Here is a javascript function (needs jquery) function login() { $.get("http://localhost:8080/jasperserver-pro/rest/login?j_username=jasperadmin&j_password=jasperadmin", function() { alert("Logged in! Do stuff here!") }).fail(function() { alert("Cannot login!") }); } Let me know if it works. Kind regards, Paulo
  4. I used the following parameters to do a successful login: 1) orgId 2) j_username 3) j_password 4) j_password_pseudo Example of Login. Login Link HTML file with button and link to automatically login. Not that the credentials are in the HTML file. This is not SSO.
  5. The only options that I see left: - Reduce item label font size (reduces readability) - Have you tried the HTML5 Charts (Pie) - This chart labels are smarter than the normal Chart. Left me know if this helps you. Kind regards, Paulo
  6. Hi Michele, You don't need to have different DIM_TIME tables. The DIM_TIME dimension is only one. The fact table can have several foreign keys (TIME_DEPARTURE and TIME_ARRIVAL) to the same dimension (DIM_TIME). When defining the cube in Mondrian you define a time dimension and then you can have several virtual dimensions (arrivals and departures) that will 'reuse' this dimension. Let me know if it helps, Kind regards, Paulo
  7. Should be OK! Are you passing any organization!? Kind regards, Paulo
  8. What is exactly your question!? Paulo
  9. I don't know if you can change the width of the label. Is truncating the label a solution!? Let me know!? Kind regards, Paulo
  10. Hi tomsebastan, Use a report parameter and insert the parameter as the report title. Kind regards, Paulo
  11. Hi Manpreet, For OLAP you need the connection "MySQL, MSSQL or whatever your DB the schema.xml file with the cube definition of you OLAP cubes. Connection connection = DriverManager.getConnection("Provider=mondrian;Jdbc=jdbc:mysql://localhost/databasename?user=root;password=;Catalog=file:c:/temp/schema.xml;JdbcDrivers=com.mysql.jdbc.Driver;" , null);Need to use MDX queries Create a JSON from the mondrian result.Let me know if this helps you? Kind regards, Paulo
  12. Hi Kiasu, I think you need to specify somewhere where does your report gets the data. A sort of connection string. Have you tested the report in iReport!? Kind regards, Paulo
  13. Hi salmankhans87, I could not export a report to txt. Try to export to CSV file instead. It is just as the same as a text file. Let me know if this helps. Kind regards, Paulo
  14. Hi Naveen This sound to be a browser bug and not Jaspersoft. I suggest that you check proxy configuration in Jaspersoft. If it continues please post some more information about the browser error!? Let me know if it helps, Kind regards, Paulo
  15. Hi materyoda, It seems that the test should login first. The 403 Forbidden message that your getting means that no authentication has been performed. Can walso mean that credentials from tests are wrong. Please check if all that credentials match. kind regards, Paulo
  16. Hi Katherine, Tried Internet explorer 8 and could not reproduce. If it happens again let me know exactly were it happens. Let me know. Kind regards, Paulo
  17. Hi Katherine, Try cleaning the cache of IE8. Internet Explorer 8 sometime limited for JavaScript. I will try to reproduce this tomorrow and let you know. Kind regards, Paulo
  18. Hi Peter, Adding a Report paramater: PARAMETER_NAMEand using P!{PARAMETER_NAME} in the SQL should work. Check also the report compilation language. Let me know if it helps, Paulo
  19. Forget to inform that I am using the google Java to Json libraries. So don't forget to copy: jasperserver-proWEB-INFlib gson (jar files) libraries. You can find them here. https://code.google.com/p/google-gson/downloads/list
  20. In the folder jaspersoft-proWEBINFjspmodulesolap I changed the file viewOlap.jsp to the following. <%@ page language="java" contentType="application/json;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> <%@ page import="com.google.gson.Gson" %> <%@ page import="mondrian.olap.*" %> <%@ page import="java.util.List" %> <%@ page import="java.io.PrintWriter" %> <%! public static String ResultToJson(Result result) { StringBuffer sbResult = new StringBuffer(); int axis1length = 0; int axis2length = 0; Gson gson = new Gson(); sbResult.append("{ "axis" : { "); // =============================== Axis for(int i =0; i< result.getAxes().length; i++ ) { List listPosition = result.getAxes().getPositions(); sbResult.append(" "axis" + i +"" : ["); for (int p =0; p < listPosition.size(); p++ ) { sbResult.append(""); for (int m = 0; m < listPosition.get(p).size(); m++) { Member member = listPosition.get(p).get(m); sbResult.append(" { "un" :"); sbResult.append(gson.toJson(member.getUniqueName())); sbResult.append(", "n" : "); sbResult.append(gson.toJson(member.getName())); sbResult.append(", "c" : "); sbResult.append(gson.toJson(member.getCaption())); sbResult.append(", "pun" : "); sbResult.append(gson.toJson(member.getParentUniqueName())); sbResult.append(" },"); // sbResult.append("n"); } sbResult.append(","); } sbResult.append("],"); } sbResult.append("} "); sbResult.append(", "values" : "); axis1length = result.getAxes()[0].getPositions().size(); axis2length = result.getAxes()[1].getPositions().size(); sbResult.append("["); // =============================== Values for (int i = 0; i < axis2length; i++ ) { sbResult.append("["); for (int j=0; j< axis1length; j++) { int[] cellindex = new int[] {j,i}; Cell cell = result.getCell(cellindex); sbResult.append(gson.toJson(cell.getValue())); sbResult.append(","); } sbResult.append("],"); } sbResult.append("]"); sbResult.append("}"); // Global String res = sbResult.toString(); res = res.replace("[]","").replace(",,",",").replace(",]","]").replace(",}","}").replace(""""," "); return res; } %> <% try { String mdx = request.getParameter("mdx"); if (mdx == null) { if (mdx.equals("")) { out.print("{"error":"empty mdx query"}"); return; } } Connection connection = DriverManager.getConnection("Provider=mondrian;Jdbc=jdbc:mysql://localhost/reportvisiondm?user=root;password=;Catalog=file:c:/temp/ReportVisionDMSchema.xml;JdbcDrivers=com.mysql.jdbc.Driver;" , null); Query query = connection.parseQuery("WITH SET [selectedMeasures] AS '{[Measures].[WorkItemsCount]}' SELECT NON EMPTY CrossJoin([selectedMeasures], [Department].[Department].Members) ON COLUMNS, NON EMPTY {Hierarchize({[CreatedDate.YMD].[Year].Members, Descendants([CreatedDate.YMD].[2012], [CreatedDate.YMD].[Month]), Descendants([CreatedDate.YMD].[2013], [CreatedDate.YMD].[Month]), Descendants([CreatedDate.YMD].[2011], [CreatedDate.YMD].[Month])})} ON ROWS FROM [WorkPermits]"); Result result = connection.execute(query); out.print(ResultToJson(result)); return; } catch (Exception ex) { out.print(ex.getMessage()); out.print(" "); } %> Then you can query with: http://localhost:8080/jasperserver-pro/olap/viewOlap.html?new=true&parentFlow=searchFlow&name=%2Fpublic%2FSamples%2FOLAP%2FViews%2FOLAP_View_Report1&ParentFolderUri=%2Fpublic%2FSamples%2FOLAP%2FViews&viewAsDashboardFrame=true On the JSP file you can configure the datasource and the schema file. You can pass a MDX query via parameter and you will have your result in JSON. Let me know if it helps.
  21. Got it! I have mdx queries and I am getting Json result. Will post the solution soon. Sky is the limit. Will post solution soon. Kind regards, Paulo
  22. Hi all, Currently I have a Cube and I can via Adhoc view throw queries and have results in tables or charts. My question is: What is the simplest way of thowing this MDX queries and having the result in JSON. Kind regards, Paulo
×
×
  • Create New...