Jump to content
Changes to the Jaspersoft community edition download ×

emistry

Members
  • Posts

    20
  • Joined

  • Last visited

emistry'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. Quick Information on How to setup TIBCO JasperReports® Server connection to MySQL DB sitting on AWS EC2 Instance : From your MySQL DB : GRANT ALL PRIVILEGES ON *.* TO '<username>'@'<localmachine>' IDENTIFIED BY '<password>';
  2. You can now create reports directly from Salesforce from TIBCO JasperReports® Server using the out of the box SF JDBC connector. In order connect to Jaspersoft you need some pre-requisite information : Host : <********.my.salesforce.com> Security Token : <Found in Saleforce -> Your Name -> Setup -> Reset My Security Token and you will get emailed a security Token> and then fill in as below .. Once complete, Test the Connection and it wonderfully works !! Now you can connect to your domain and create adhoc reports in the normal way. I have attached a Salesfore Data Model Reference for 2016 .. for trying to understand the Data Model. Hope this helps
  3. NOTE: This functionality can be achieved without custom connector as explained in this other article. Webservice Connector Information found at this page http://community.jaspersoft.com/project/web-service-data-source Our Webservice Data Connector is a great way to consume data from API and produces fantastic reports .. For Example for report which hits the London Tube Network API and produces a live status report ... I have attached the JRXML to replicate the above report and all you have to do get it working is create the Studio Data Adaptor .. and then to deploy to the server and have it reference from there you need to reate the server data source ... All the images are URL to images so you do not need any other resources .. Good luck and Happy Reporting .. tubestatus.jrxml
  4. You can pass the datasource from master to subreport (or dataset) specifying a Datasource expression. In this example we'll use the clone method on the datasource: ((com.jaspersoft.webservice.data.query.IWSDataSource)$P{REPORT_DATA_SOURCE}).clone(jsonRootNode,subFieldsMap) passing both parameters. Two parameters .clone(jsonRootNode,subFieldsMap) : you can specify both a new root path for the json AND a new mapping for the json fields. In the attached example FinancialData.jrxml, I have created JS Report with a Table using a Sub-Dataset. The parent JSON Query passes the clone method in the JRSDatasource Expression as shown here : ((com.jaspersoft.webservice.data.query.IWSDataSource)$P{REPORT_DATA_SOURCE}).clone("results", $P{SubFieldsMap}) and the SubFieldMap Parameter is defined as [["symbol" : "symbol", "tradingDay": "tradingDay", "close": "close"] This is how I defined the parameter ..And these are the JSON Parameters I want to bring through in my Table using the Sub-Dataset. I passed the Symbol, TradingDay and Close fields to the Table, and therefore iterate through all the recurrences in the Results set. Note : I set the root as results in the clone call, as described by Gianluca in the original post. Finally, set the report language to groovy as below : financialdata.jrxml
  5. Just wanted to collate various articles on the net and provide a definitive page for Configuring TIBCO JasperReports® Server v6.2 to send email using your GMAIL account Step 1) Amend the applicationContext-report-scheduling.xml in the jasperreports-server-6.2.0apache-tomcatwebappsjasperserver-proWEB-INF directory Look for the reportSchedulerMailSender section and amend such that the section looks as below: <bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="${report.scheduler.mail.sender.host}"/> <property name="username" value="${report.scheduler.mail.sender.username}"/> <property name="password" value="${report.scheduler.mail.sender.password}"/> <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/> <property name="port" value="${report.scheduler.mail.sender.port}"/> <property name="javaMailProperties"> <props> <prop key="mail.smtps.auth">true</prop> <prop key="mail.smtps.starttls.enable">true</prop> </props> </property> </bean> Step 2) Amend the js.quartz.properties in the jasperreports-server-6.2.0apache-tomcatwebappsjasperserver-proWEB-INF directory Look for the report.scheduler section and amend as below report.scheduler.web.deployment.uri=http://localhost:8080/jasperserver-proreport.scheduler.mail.sender.host=smtp.gmail.comreport.scheduler.mail.sender.username=your@gmail.comreport.scheduler.mail.sender.password=passwordreport.scheduler.mail.sender.from=your@gmail.comreport.scheduler.mail.sender.protocol=smtpsreport.scheduler.mail.sender.port=465 PLEASE NOTE THAT IS SMTPS IN BOTH FILES During test, note that a "Username and Password not accepted" error can occur if you still have "Allow less secure apps" set to the default value of "OFF" in your gmail accounts settings at https://myaccount.google.com/lesssecureapps . You may need to set this to ON
  6. Add values like yAxis.plotLines [{value: 500000,color: 'green',dashStyle: 'shortdash',width: 2}] This should do it ..
  7. Hi Amauri, In Jaspersoft Studio you can create Groups from the Studio Outline Tab, please refer to the Jaspersoft Studio User Guide Section 11.4.1 and also we have some youtube links which may be able to help as well .. https:// Thanks
  8. Using Visualforce, I have managed to be able to embed Jasper Reports into Salesforce. Visualforce is the component-based user interface framework for the Force.com platform. The framework includes a tag-based mark-up language, similar to HTML. Login into Salesforce with the correct privileges.. (Developer Account Needed) Go to the Developer Account menu option -Create a VisualForce Page – From the search box on the left, type in pages Select to Create a Visualforce Page and create a new page as follows .. And Save. Go to the Home Page Components as below (left hand side) Create a New Custom Component and then Create your custom component by associating the VisualForce page with the Custom Component above and selecting the height of the component area. Now the component should have been added to the Home Page but note the following because its a http link inside a https site you will have to get relevant browser option disabled to see it.
  9. On a customer request, I wanted to put together a set of simple set of instructions together for creating Adhoc Templates within JasperServer. First of all import the attached export.zip file and you see the Jaspersoft Template in the public/templates folder : Now if you create a Adhoc Report using this template it will look like this : Note that the report appears with Tibco Jaspersoft branding, Date and Page Numbering. So how I did create that .. If you now goto Jaspersoft Studio (having assumed you already have a server connection in Jaspersoft Studio) If you now goto the relevant folder Repository Explorer you will see the following .. The three files : Jaspersoft is the logoJaspersoftTemplate is the JRXML defining the report templateJaspersoftTemplateAdhocStyles is the container holding the style information. In order to customise the template you simply change the JRXML file accordingley Rename, change, add, remove and play .. Lots more you can do by playing with the Styles .. But this should get you started.
  10. Create a Blank Report in Jaspersoft Studio and populate with the following SQL: SELECT store.store_country, store.store_state, sales_fact_1998.store_cost, sales_fact_1998.store_sales, sales_fact_1998.unit_sales FROM store INNER JOIN sales_fact_1998 ON sales_fact_1998.store_id = store.store_id WHERE $X{IN, store.store_country, COUNTRY_P}[/code]Tidy up the report by deleting bands and get the report looking like this: Publish the report to the Server, as most of the magic is done there ... Edit the Published Report : Select the "Controls & Resources" and change the Display Mode to "In Page" and select the "COUNTRY_P" Input Control Go through the Configure Wizard and Select the following options: Save the Input Parameter Submit the Input Parameter Then select the MultiSelectReport and you will a Multi Select Query which works as expected: CASCADING FILTER - EXTENSION As an extension to this WIKI page you can extend quite easily to make it a Cascading Filter Report : Use this as SQL in your Studio Report .. SELECT store.store_country, store.store_state, sales_fact_1998.store_cost, sales_fact_1998.store_sales, sales_fact_1998.unit_sales FROM store INNER JOIN sales_fact_1998 ON sales_fact_1998.store_id = store.store_id WHERE $X{IN, store.store_country, COUNTRY_P} AND $X{IN, store.store_state, STATE_P }[/code]Note that I have extended the where clause to add a second condition which will form the second part of the filter. Then publish to server as above and add a 2nd Input Control called STATE_P in the same way as above replacing COUNTRY with STATE until you get to the query string. At this point use this query string SELECT store.store_state FROM store WHERE $X{IN, store.store_country, COUNTRY_P} ORDER BY store.store_country,store.store_state[/code]The Value and Visible columns should be both 'store_state'. This should up a simple cascading filter.
  11. Jaspersoft Studio Version: 6.0.1 / Jaspersoft Server Version: 6.0.1 In this Example I will lead you through the steps needed to demonstrate the Drill-Down report functionality. It will use the Foodmart Database Sample which ships with the Jaspersoft Server. Child Report Create the Child Report first. Create a Jaspersoft Studio Report using the following SQL: SELECT store.store_city, store.store_state, store.store_country, sales_fact_1998.store_sales, sales_fact_1998.store_cost, sales_fact_1998.unit_sales, store.store_manager FROM sales_fact_1998 INNER JOIN store ON store.store_id = sales_fact_1998.store_id where store.store_country = $P{Country_P} Pull the fields over to the blank report and tidy up the unwanted bands such that the Child Report looks like this Parent Report This example shows drilling down from a Bar Chart taking the Country name as the Drill-Down parameter into the above Child Report. Create the Parent Report. Create a Jaspersoft Studio Report using the following SQL: SELECT sales_fact_1998.store_sales, sales_fact_1998.store_cost, sales_fact_1998.unit_sales, store.store_country, store.store_state FROM sales_fact_1998 INNER JOIN store ON store.store_id = sales_fact_1998.store_id Delete all the bands except the Summary band in this report. In the Summary band add a HTML5 Bar Chart. In the HMTL5 properties add the Country to the Categories and Sales to the Measures. In the Categories Level for Country, configure as below: In the Bucket Properties (of Categories) , configure as below: NOTE: The Bucket Property here must be the same as the Parameter in the Child Report In the Measures Level for Sales, configure as below: In the Advanced Properties, select the Hyperlink button and the fields will auto populate as below: Remove the hyperlinkReference property. Modify the hyperlinkType property as follows: Nothing to do on the hyperlinkTarget, keep as is Add a _report property and configure as follows: Add a Country_P property and configure as follows: Publish both reports to the Jasper Server Edit the Child Report, select the Control & Resources tab and change the Display Mode to “In Page” and uncheck the “Always Prompt” option You should now be able to goto the Parent Report and select a Bar in the Chart and drill through to the Country Detail (Child) Report. The Parent and Child reports are attached here, but remember you will still have to do the step in blue above to get it working as expected. When you create the Child Parameter, make sure the "Is for Prompting" dialog is checked otherwise the parameter will not passed to the server
  12. [toc on_off::hide=1]The Heatmap Chart is great way seeing anomalies in data and if you are creating a Heatmap from TIBCO Jaspersoft® Studio then you will need to configure the colors in order for the heatmap to be useful The image below shows the 3 Chart Properties which need to be added to configure the colours (accessed from "Show Advanced Properties") All credit to "Christoph Wurm" for finding these properties .. (Thanks Christoph)
  13. DiscussionIn this example I will use this data for accessing repeated nested fields: <root> <outputDocument> <driver> <driverName>Nick Butler *</driverName> <driverLicence> <licenceNumber>CK17683 (16-08-2031)</licenceNumber> <licenceNumber>XX14536 (21-10-2036)</licenceNumber> </driverLicence> <driverDoB>14-01-1970</driverDoB> <passportNumber>PP3462748 (22-07-2016)</passportNumber> <visaNumber>VT57383212 (21-09-2014)</visaNumber> </driver> <driver> <driverName>James Marmeduke</driverName> <driverLicence> <licenceNumber>MES16584 (16-08-2030)</licenceNumber> </driverLicence> <driverDoB>01-12-1962</driverDoB> <passportNumber></passportNumber> <visaNumber></visaNumber> </driver> </outputDocument> </root> (Data File attached below) The highlighted data, below, though, is not intuitive to extract and therefore I have created this little WIKI page to remind me how to do it. ProcedureCreate a Datasource Adaptor Create a Report Create a report and at the Data Source stage choose the Data Adaptor you created earlier and use the parameter below. Select all the Fields in the next stage and then Finish. Move the fields over and delete the license number value field. Create a list element, pull over a List element .. into the space for the License Number value .. “Create a list using a new dataset” -> “Create an empty dataset” -> “Use a JRDatasource expression” and in the expression add : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/driver/driverLicence/licenceNumber") Create a Field in the new Dataset (sub dataset) And in the description field of the new field add: child::text() , once complete drag the field into the list element on the report. Ready to preview now and as you can see below the nested fields are appearing as expected... Related Informationhttp://youtu.be/iayX5W61qwk - Short Video containing "How to do it .. " xml-nestedfields.xml
  14. Find below a step by step guide to setting up Domain Security (Row Based) : Create a role on which to apply the security settings from Jaspersoft Server For each of the users which you want to apply the security settings to, create user accounts, add them to the above role. For each of the Users add some attributes which will filter what they can and can't see when they access a given domain. When you create the Domain use a Security File (attached and example) which uses the above information to apply to the domain. The magic is really here ... <resourceAccessGrant id="Jointree_1_row_access_customers"> <principalExpression> authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['AUC_USER'] } </principalExpression> Then apply the "Principal Expression" to the role that you created above. <filterExpression> Locations_T.Region in (groovy('authentication.getPrincipal().getAttributes().find{ it.attrName == "Region"}.attrValue.split(",").collect {"''" + it + "''"}.join(",").replaceFirst("^''","").replaceFirst("''$","")')) </filterExpression> </resourceAccessGrant> Then change the table on which you need to apply the filter and the attribute you want it to be tied to. Then to test that it works, login as a given user and make sure you can only see the data you were expecting. If during the adhoc explore process you get errors, this is down to the attribute definition in the user definition having errors. The example I have given is for multiple comma separated regions. academy_use_case_security_settings.xml
  15. HTML5BarChart-CustomiseColors(1).zip This example guides a developer through creating a bar chart that changes bar colors depending on a threshold and also based on the current month. The final product will look like this: (Red is Current Month, Blue is Sales if Over 50000, Green is if they are under) (JRXML file attached) This example uses the Foodmart database that is included with the Jaspersoft BI Suite if you choose to install samples. Create a simple report with the following query : SELECT sum(sales_fact_1997.store_sales) as sales, time_by_day.the_month FROM sales_fact_1997 INNER JOIN time_by_day ON time_by_day.time_id = sales_fact_1997.time_id GROUP BY the_month, month_of_year ORDER BY month_of_year Add a HTML5 – Column Chart to the summary band and delete all the other bands Goto the HTML5 Charts Properties -> Chart Data -> Configuration page Modify the “Categories Level” to remove the default “Level1” category and Add the Month category as below … Add the Bucket Property : color The Magic …this With this as the property expression: IF($F{the_month}.toString().matches(DATEFORMAT(new Date(),"MMMMM")),"red",IF($F{sales}.intValue() >= 50000,"green","blue")) and the Bucket property page should look like this : Return to the Chart Properties page Remove the default measure and Add the following Value Definition And the following Advanced property: Return back to the report view and preview the Report:
×
×
  • Create New...