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

mdahlman

Members
  • Posts

    1,332
  • 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 mdahlman

  1. mdahlman

    Hide search results

    PurposeThe purpose of this article is to provide a way for administrators to hide certain repository items from being seen by search results and the Repository and Library view of JasperReports Server. This does not replace the comprehensive capabilities of the repository permissions system that is well described in Chapter 3 of the JasperReports Server Admin Guide. For example, the Execute Only permissions implemented in version 4.0 of JRS are very powerful and can cover most use cases. A common use case for this would be for hiding reports that are only used for drill-through from another report or dashboard This how-to was tested on JasperReports Server 4.7 File to EditThe file you will edit can be found in /webapps/jasperserver-pro/scripts/repository.search.main.js Around line 1065 of the file you will find three lines like this: fire: function(eventName, memo) { this._getContainer().fire(eventName, memo); }, Add some lines to make it look like this: fire: function(eventName, memo) { this._getContainer().fire(eventName, memo); var $resultsLists = $$('li[id^="resultsList"]'); $resultsLists.each(function(result){ result.descendants().each(function(node) { if(node.innerHTML.indexOf("HIDDENITEM") != -1) { result.update(); } }); });}, How To UseThe code above effectively hides any element with the keyword HIDDENITEM in the repository view. The keyword can be applied to the title or the description of a report unit (or any unit). It is also case sensitive. NOTE: Once you've hidden the report with the above method then the only way to edit it will be using iReport Designer's Repository Navigator as it won't be available from the repository.
  2. I see what you're looking for. But I don't know the answer. The problem comes from my sample JavaScript which uses "window.location.href". That's why it opens in the full browser page. You should be able to take a look at actionModel.primaryNavigation.js to see how it is handled for standard menus. Then adapt your own. Sorry, I don't have more specific advice about this part. I haven't done this before, and I don't know Spring. Perhaps others will be able to comment on it. Regards, Matt
  3. Language ReferenceThe Jaspersoft MongoDB Query Language is a JSON-style declarative language for specifying what data to retrieve from MongoDB. The connector converts this query into the appropriate API calls and uses the MongoDB Java connector to query the MongoDB instance. As of release 7.5, JasperReports Server supports MongoDB 4.0 by using its Java driver version 3.10.2 (see MongoDB Compatibility). The Jaspersoft MongoDB query language has been updated, in particular the syntax for aggregation, and you may need to modify your MongoDB queries after you upgrade. There are two types of queries supported: API driven queries: These queries rely on the mongo-java-driver to query MongoDB.{ # The following parameter is mandatory. collectionName : myCollection Details, # The following parameters are optional findQuery : { Details }, findFields : { Details }, sort : { Details }, aggregate : [ As of v7.5 - Details ], mapReduce : { Details }, limit : int Details, rowsToProcess : int Details batchSize : int As of v7.5 - Details maxTime : int As of v7.5 - Details collation : { As of v7.5 - Details } } Command driven queries: In releases up to JasperReports Server 7.2, command-based queries supported aggregation operations. As of release 7.5, aggregation commands are deprecated.{ runCommand : { aggregate [ Up to 7.2 - Details ], # The following parameter is optional rowsToProcess : int Details } } collectionNameSpecifies the collection name. Exactly one collection must be specified, this can be hard-coded into the query or you can use a report parameter to feed the collection name. Hard-coded collection name: Collection name specified as a String Parameter: findQueryThe findQuery specifies which documents from the collection will be returned. It supports the following options: Conditional operatorsThe value used for these operators may be explicitly specified in the query or may be specified in the report as a parameter of the appropriate data type. Partial list of conditional operators: field : { '$gt' : value }# greater than valuefield : { '$lt' : value }# less than valuefield : { '$gte' : value }# greater than or equal to valuefield : { '$lte' : value }# less than or equal to valuefield : { '$all' : }# field contains all values specified in the listfield : { '$exists' : 'true' }# return object if field is presentfield : { '$exists' : 'false' }# return if field is missingfield1 : { '$gt' : value1 } , field2 : { '$lt' : value2 }# logical AND: both conditions must be satisfied$or : [ { field1 : 'extremely loud' } , { field2 : 'incredibly close' } ]# logical OR: at least one of the field conditions is trueFor more information and a comprehensive list of MongoDB conditional operators, see the MongoDB Query and Projection Operators. Regular expressionsYou can also select fields and documents based on matching a regular expression: For more information, see the MongoDB regex documentation. $whereAllows the query to specify a javascript expression. For more information, see the MongoDB $where documentation. findFieldsThis allows the query to select which fields will be part of the result set. If no value is specified for 'findFields' then all fields will be returned. To return only a subset of the fields available in the returned documents, specify a key/value pair of 'fieldname' : 1 for each field you want to return. To return all fields except for a specified subset, exclude fields with a key/value pair of 'fieldname' : 0. In the following example, only the name and home_office field are returned: The following example returns all fields except for big_image: sortSpecifies the fields and order of each one that will be used to sort. This sorting does not affect aggregation, instead use the sort stage of the pipeline as described in Aggregation Pipeline. Accepted values: 1 (natural order) -1 (descending) limitThe limit cuts off the result after the given number of documents is returned. When this optional value is set, it must be a positive integer (not enclosed in quotes). Setting the limit to 0 or not specifying a limit has the effect of returning all documents. This limit does not affect aggregation, instead use the limit stage of the pipeline as described in Aggregation Pipeline. Aggregation (as of v7.5)As of JasperReports Server 7.5, command-based aggregation is deprecated and replaced by API-based aggregation: Aggregation (up to v7.2)The aggregation command must be expressed as follows: Aggregation PipelineThe aggregation pipeline is a set of operations, with each operation called a stage that transforms the documents in some way. For more information, see the MongoDB documentation: Aggregation PipelinePipeline StagesThe following operators are supported in the pipeline: $group: Groups documents by key and calculates aggregate values for the group (MongoDB reference). $project: Selects columns or sub-columns, and creates computed values or sub-objects (MongoDB reference). $match: Filters documents so that only matching documents continue in the stream (MongoDB reference). $limit: Limits the number of documents that pass through the document stream (MongoDB reference). $skip: Skips over a number of documents and passes the remaining through the document stream (MongoDB reference). $unwind: Unwinds an array, subsituting each value in the array for the array within the same document (MongoDB reference). $sort: Sort documents by key (MongoDB reference). mapReduceMap-reduce is another form of aggregation. In general the aggregation pipeline is simpler to define and faster in performance, but map-reduce can provide flexibility and customization that the pipeline cannot. For more information, see the MongoDB map-reduce documentation. The mapReduce key specifies a map-reduce operation whose output will be used for the current query. In this case, the collectionName specifies the target collection. This object expects three mandatory keys and has one optional key: Mandatory keysmap: Specifies the map function as a string (MongoDB reference)reduce: Specifies the reduce function as a string (MongoDB reference)out: Specifies the name of the output collection or output options (MongoDB reference)Optional keyfinalize: Defines a JavaScript function as a string to be applied after the reduce step (MongoDB reference)Other MapReduce fields are not supported. MongoDB MapReduce Docs Sample mapReduce function: Output options: replace - The previously existing collection (if any) is replaced: out - Identical to 'replace' operation, if no other operation is needed: merge - New keys replace existing keys (other keys remain unchanged): reduce - New keys and existing keys are reduced together: db - Specify a different database for the output collection: inline - This option is not supported in the connector: rowsToProcessThe rowsToProcess sets the number of rows that will be processed to determine the list of fields in Jaspersoft Studio. This value applies only at edit at time in Jaspersoft Studio. It has no effect on reports when they are executed. When this optional value is set, it must be a positive integer (not enclosed in quotes).The connector uses a default value of 5 documents if this option is not specified. batchSizeThis value determines the number of documents that MongoDB will return to the client per network message. It does not affect query results but may affect performance for exceptional document sizes. When this optional value is set, it must be a positive integer (not enclosed in quotes). For more information, see the MongoDB documentation for batchSize. maxTimeThis value specifies a time limit in milliseconds for processing operations a query. If you do not specify a value for maxTime, operations will not time out. A value of 0 explicitly specifies the default unbounded behavior. When this optional value is set, it must be a positive integer (not enclosed in quotes). For more information, see the MongoDB documentation for maxTime. The following setting stops the query after 10 minutes. collationThis optional parameter specifies language-specific rules for string comparison, such as rules for letter case and accent marks. It supports all options described in the MongoDB documentation for collation. Sample queriesfindQueryThe minimal query giving just the collection name returns all records with all of their fields: The following example uses the findFields key to select certain fields and the sort key to order the results: The findQuery key can define filters as shown in the following examples: In this example, the value of the "in" filter is hard-coded: In this example, the value of the "in" filter is parameterized: The aggregation pipeline allows advanced grouping and filtering: API-based as of v7.5Command-based up to v7.2The mapReduce key lets you define custom aggregation functions: AppendixSQL to MongoDB Query MappingsSimple query in SQL: When using MongoDB: For more details, see the SQL to MongoDB Mapping Chart. Aggregation (group by) in SQL: Aggregation using MongoDB: API-based as of v7.5Command-based up to v7.2For more details, see the SQL to Aggregation Mapping Chart. Quotes in QueriesQuotes are optional around keys, but in the past they were required. Some examples on this page use quotes, but some do not. MongoDB Java driver JIRA: improve JSON parser to not require quotes around keys. Version of MongoDB Java DriverJaspersoft MongoDB connector versionmongo-java-driver versionjs-mongodb-datasource-3.10.2.jarmongo-java-driver-3.10.20.5.0 - currentmongo-java-driver 2.7.30.13mongo-java-driver 2.7.30.11 - 0.12mongo-java-driver 2.7.20.8 - 0.10mongo-java-driver 2.6.30.1 - 0.7mongo-java-driver 2.3 See AlsoMongo DB 4.0 DocumentationJaspersoft Tech Talks # 13:Video: Slides: Jaspersoft with MongoDB SlidesAnalytics for Mongo DBMongoDB Resources
  4. I have attempted again--still unsuccessfully--to fully understand the issue. But that's OK. I'm not a developer. BUT... the bug is still incorrectly defined as an iReport 3.0 or earlier issue. Actually... it sounds to me like a JR issue rather than an iReport issue. I have attempted again--successfully this time--to assign the bug to someone on the iReport team.
  5. The category for this bug should not be "[iReport] Bugs iReport (up to 3.0.x)". The bug is reported on iReport 4.1. This is an old version... but not as old as 3.0. I have re-assigned the bug to a member of the JasperReports team, since I have never used a Java Bean data source before. I speculate the the problem is simple. The description reads this: (new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{field})) But the report data source is a Java Bean containing a Collection field, not a Java Bean containing a Java Bean field. Therefore the subreport data source expression should instead be this: new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($F{field})
  6. Getting Started Summary[toc on_off::hide=1] In principle JasperReports Server works on both cloudfoundry.com and Micro Cloud Foundry. (We have tested both!) But in practice only Micro Cloud Foundry is recommended for now. You cannot yet allocate sufficient memory on cloudfoundry.com. That will change in the future, of course. Download JasperReports Server updated for CloudFoundry. (Both Professional and Community Editions are available.) Push it to Micro Cloud Foundry. By default it has only 1 GB of memory. You must configure Micro Cloud Foundry to have enough memory. Bind one of your existing data sources to JasperReports Server. Login to JasperReports Server and define a data source referencing this bound data source. Install iReport. Design a report. Deploy the report to JasperReports Server.Deploying and Using JasperReports Server in CloudFoundryPush JRS to CloudFoundry Using the command line vmc tool is the default method. Example using vmc push. This can be done in Eclipse or STS.Bind Data Sources Using the command line vmc tool. Example using vmc bind-service. This can be done in Eclipse or STS.Define Data Sources in JasperReports Server Login to the application (default credentials: jasperadmin/jasperadmin) Define a data source using a bound Cloud Foundry data service. Define a data source to an external JDBC data source.
  7. Example of deploying JasperReports Server to Cloud Foundry using vmc This example shows JasperReports Server being deployed to cloudfoundry.com. Exactly the same steps apply when deploying to Micro Cloud Foundry. [toc] $ vmc target http://api.cloudfoundry.com Successfully targeted to http://api.cloudfoundry.com $ vmc login Attempting login to http://api.cloudfoundry.com Email: mdahlman@jaspersoft.com Password: **************** Successfully logged into http://api.cloudfoundry.com $ vmc list +---------------------+----+---------+--------------------------------------+-------------------------------------------+ | Application | # | Health | URLS | Services | +---------------------+----+---------+--------------------------------------+-------------------------------------------+ | jaspersoft-bus-data | 1 | RUNNING | jaspersoft-bus-data.cloudfoundry.com | mongodb-data, postgresql-data, mysql-data | +---------------------+----+---------+--------------------------------------+-------------------------------------------+ This application has my business data. We will deploy JRS in order to perform Business Intelligence on these data sources. $ vmc push Would you like to deploy from the current directory? [Yn]: y Application Name: jaspersoft-421 Application Deployed URL [jaspersoft-421.cloudfoundry.com]: Detected a Java Web Application, is this correct? [Yn]: y Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: 1G Creating Application: OK Would you like to bind any services to 'jaspersoft-421'? [yN]: y Would you like to use an existing provisioned service? [yN]: n The following system services are available 1: mongodb 2: mysql 3: postgresql 4: rabbitmq 5: redis Please select one you wish to provision: 2 Specify the name of the service [mysql-8520e]: jrs-repo ## JasperReports Server expects this name by default. Creating Service: OK ## It is specified in WEB-INF/data-services.properties Binding Service [jrs-repo]: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (15K): OK Push Status: OK Staging Application: OK Starting Application: OK Additional Notes Repository Database - JasperReports Server supports both PostgreSQL and MySQL as repository databases to hold its metadata. Only MySQL is supported as a repository at this time in the CloudFoundry distribution. Business Database - JasperReports Server can perform reporting and analysis on any JDBC data source as well as on custom data sources.
  8. In most cases it is better to use this: WHERE $X{ myCollection, myTableField, IN } That way JasperReports takes care of converting the Collection into an IN clause for you. If myCollection happens to be empty, then "1=1" gets substituted in so that the next clause still gets ANDed correctly to it.
  9. mdahlman

    Hadoop Connectors

    Hadoop ConnectorsHadoop HiveHiveQL referenceHive Sample Reports Hadoop HBaseQuery referenceDeserializer DocumentationiReport and Jaspersoft StudioJasperReports ServerJasperReportsCredit Card Transactions Sample
  10. mdahlman

    Hadoop HBase

    Jaspersoft's Hadoop-HBase ConnectorWorks with iReport, JasperReports, and JasperReports Server Target AudienceUsers who want to integrate Jaspersoft's JasperReports Server with Hadoop using the HBase database. This document assumes that the user already has familiarity with Hadoop and HBase and already has data in Hadoop stored in HBase tables. [toc]BackgroundJasperReports Server 4.x and earlier do not ship with built-in connectors to Hadoop-HBase. These resources are provided here on JasperForge.org in order to enable JasperReports Server to access Hadoop-HBase data. They are currently in a pre-release format. They are therefore not yet supported by Jaspersoft Technical Support. Tests were performed with HBase 0.90.x on distributions from Apache, Cloudera (CDH3 & CDH4), and IBM (BigInsights). It's likely to work with other versions, but others are not tested. The Jaspersoft HBase Connector requires the REST server (called Stargate). It is a standard HBase component. Even if you are not already using it, you have it available and it's easy to launch. SummaryObtain and unzip the connectorDeploy the Hadoop-HBase plugin to iReportCreate a reportDeploy the query executer to JasperReports ServerDeploy the report to JasperReports ServerRun the reportDetailsObtain and unzip the connectorDownload the connector from the project. The following files are included: WEB-INF/applicationContext-HBaseDataSource.xml WEB-INF/bundles/HBaseDataSource.properties WEB-INF/lib/ezmorph-1.0.6.jar WEB-INF/lib/hadoop-core-0.20.2.jar WEB-INF/lib/hbase-0.90.4.jar WEB-INF/lib/HBaseDataSource-0.9.jar WEB-INF/lib/HBaseDeserializer-0.9.jar WEB-INF/lib/json-lib-2.4-jdk15.jar WEB-INF/lib/libthrift-0.6.1.jar WEB-INF/lib/zookeeper-3.3.2.jar plugin/HBasePlugin-0.9.nbm Deploy the Hadoop-HBase plugin to iReportChoose the menu Tools → Plugins.From the tab "Downloaded" choose the plugin file (e.g. HBasePlugin-0.5.1.nbm) After installing the plugin you must restart iReport. Click the button "Report Datasources" to define a new connection to Hadoop HBase.Add a new datasource of type "HBase Connection"Set appropriate connection details:HBase REST Connection: Hostname: [hostname of REST server] Port: (default is 8080) Test the connection. Create a reportCreate a new report; set the query language to "HBaseQuery". The query language is a simple JSON-based syntax. The Jaspersoft query language for HBase is documented here: Jaspersoft HBase Query Language Here is a sample. create 'blogposts', 'post', 'image' put 'blogposts', 'post1', 'post:title', 'Hello World'put 'blogposts', 'post1', 'post:author', 'Matt Dahlman'put 'blogposts', 'post1', 'post:body', 'This is a blog post.'put 'blogposts', 'post1', 'image:author', 'mdahlman.jpg'put 'blogposts', 'post1', 'image:bodyimage1', 'world.png'put 'blogposts', 'post1', 'post:num_replies', 0put 'blogposts', 'post2', 'post:title', 'Everything'put 'blogposts', 'post2', 'post:author', 'Baby K'put 'blogposts', 'post2', 'post:body', 'It is impossible to conceive of the totality of everything thinkable.'put 'blogposts', 'post2', 'image:author', 'BabyK.jpg'put 'blogposts', 'post2', 'image:bodyimage1', 'Infinity.png'put 'blogposts', 'post2', 'image:bodyimage2', 'Omega_plus_one.png'With the above sample data inserted using the HBase shell, you can then create a report using the following query: { "tableName" : "blogposts", "deserializerClass" : "com.jaspersoft.hbase.deserialize.impl.ShellDeserializer" } The deserializerClass attribute is needed because HBase has no concept of data types or other metadata for fields. Therefore the deserializer is needed to determine the appropriate data type for the arrays of bytes being returned by HBase. The HBase connector includes DefaultDeserializer and ShellDeserializer. For more details refer to the Deserializer Documentation. The query above returns all records in the table blogposts. It most cases it's critical to filter the results. For example, we could get only posts by a certain author: { "tableName" : "blogposts", "deserializerClass" : "com.jaspersoft.hbase.deserialize.impl.ShellDeserializer", "filter" : { "DependentColumnFilter" : { "family" : "post", "qualifier" : "author", "compareOp" : "EQUAL", "comparator" : { "RegexStringComparator" : { "expr" : "Baby K" } } } } } Deploy the query executer to JasperReports ServerCopy the files in WEB-INF from step 1 into <appserver>/webapps/jasperserver-pro/WEB-INF Be sure to keep the folder structure when copying the files.Start or restart JasperReports Server.Related LinksDownload JasperReports Server: Community Edition or Commercial Edition.Download the Jaspersoft Hadoop-HBase Connector. How to run reports with sub-dataset (table component, subreport, etc.)How to use Apache Phoenix JDBC driver to run reports on HBase
  11. HBase Deserializer DocumentationTo use the Jaspersoft HBase connector you need to create a deserializer class to understand the stream of bytes that HBase returns. This page will contain the required information to guide a user in this process. Outline: Your deserializer implementation must implement com.jaspersoft.hbase.deserialize.DeserializerIt can base its determination on how to deserialize a field based on the bytes themselves or based on the name of the table, column family, or qualifier.For now, please refer to the source available in the "Release" section of this project. It includes two sample deserializers. More details will follow on this page soon.
  12. Important NewsThe manual install steps on this page will soon be deprecated. This is great news! The reason these will be deprecated is that the MongoDB connector is now included with iReport Designer v4.5.1 and Jaspersoft Studio v1.0.9. The manual install steps are only needed if you need to keep working with older versions. Obtain and unzip MongoDB-connector-for-Jaspersoft-bin-0.5.0.zipDownload it from the project release area. The following files are included: plugin/com-jaspersoft-ireport-mongodb.nbm WEB-INF/applicationContext-MongoDbDataSource.xml WEB-INF/bundles/MongoDbDataSource.properties WEB-INF/lib/commons-pool-1.6.jar WEB-INF/lib/mongo-java-driver-2.7.3.jar WEB-INF/lib/js-mongodb-datasource-0.5.0.jarJaspersoft StudioReports can be designed in iReport Designer or Jaspersoft Studio. Most Jaspersoft users work with iReport Designer today. But more and more people are adopting Jaspersoft Studio. Which one should you choose? iReport Designer - If you have a project that will reach production quickly, choose iReport Designer. iReport Designer is the stable standard. It has been supported by Jaspersoft for years. Jaspersoft Studio - If you already use Eclipse, then Studio will feel more intuitive. Studio has more cool features and more rough edges.The MongoDB plugin is delivered as part of Jaspersoft Studio v1.0.9 and later. Download it here iReport DesignerThe MongoDB plugin is already included in iReport Designer v4.5.1. Get it here. iReport Designer Professional doesn't include the MongoDB connector yet (it will soon!). Here's how to install the connector manually today. Choose the menu Tools -> Plugins. : From the tab "Downloaded" add the plugin file MongoDbPlugin-xxx.nbm : After installing the plugin you must restart iReport Designer. Click the button "Report Datasources" to define a new connection to MongoDB. : Add a new datasource of type "MongoDB Connection" : Set an appropriate url and test the connection : Create a reportThe simplest way for a new user to create a new report is with the Report Wizard. File → New... Choose any template and click "Launch Report Wizard". Set the report name and location. Create a query to retrieve data. : There is no visual query editor, so the button "Design query" is inactive. : The Jaspersoft query language for MongoDB is documented here: Jaspersoft MongoDB Query LanguageSample queries Minimal:{ 'collectionName' : 'accounts' } Specify the fields returned and sort the results:{ 'collectionName' : 'accounts', 'findFields' : {'name':1,'phone_office':1,'billing_address_city':1,'billing_address_street':1,'billing_address_country':1}, 'sort' : {'billing_address_country':-1,'billing_address_city':1} } Filtered and parameterized:{ 'collectionName' : 'accounts', 'findQuery' : { 'status_date' : { '$gte' : $P{StartDate} }, 'name' : { '$regex' : '^N', '$options' : '' } } } MapReduce job:{ 'collectionName' : 'zips', 'sort' : { 'value.population' : -1, }, 'mapReduce' : { 'map' : 'function () { emit (this.state, {population : this.pop}); }', 'reduce' : 'function (key, values) { var total = 0; for( var index = 0; index total += valuesindex.population; } return {population : total} }', 'out' : 'totalPopulation' } } Starting with iReport Designer v4.5.1, MongoDB plugin will be included as part of the official release. Download it here See Also MongoDB Resources
  13. Important NewsThis page will soon be deprecated. This is good news! The reason this will be deprecated is that the MongoDB connector will be included with JasperReports Server v4.7.0 and later. The manual install steps are only needed if you need to keep working with an older version of JasperReports Server. Obtain and unzip MongoDB-connector-0.5.0Download it from the project release area. The following files are included: plugin/MongoDbPlugin-0.5.0.nbm WEB-INF/applicationContext-MongoDbDataSource.xml WEB-INF/bundles/MongoDbDataSource.properties WEB-INF/lib/commons-pool-1.6.jar WEB-INF/lib/mongo-java-driver-2.7.3.jar WEB-INF/lib/js-mongodb-datasource-0.5.0.jarDeploy the MongoDB query executer to JasperReports Server Copy the files in WEB-INF from step 1 into /webapps/jasperserver-pro/WEB-INF Be sure to keep the folder structure when copying the files. Start or restart JasperReports Server.Deploy the report to JasperReports ServerData SourceDefine the data source in JasperReports Server Right-click a folder, add a Data Source Set the Data Source properties Deploy the ReportUse either the JasperReports Server web interface or the iReport Designer Repository Navigator to deploy the report. Deploying from iReport Designer is simpler in most cases. Run the reportSearch for the report or browse to the report in the JasperReports Server repository. See Also MongoDB Resources
  14. Cassandra Query LanguageThe Jaspersoft Cassandra connector uses CQL which is the standard query language for Cassandra. Any valid CQL query may be used in a report. The language is documented here: Cassandra Query Language v2.0 (apache.org)Sample queriesCQL looks just like SQL in many cases, but it has important differences. SELECT Name, Occupation FROM People SELECT FIRST 3 'billing_address_city' .. 'billing_address_street' FROM accounts.accountsCQL CQL and the Jaspersoft Metadata LayerThe CQL JDBC driver does not yet fully implement the JDBC specifications, and it does not work correctly with the Jaspersoft metadata layer (Data Domains) yet. As a result of this, Ad Hoc reporting in JasperReports Server commercial editions against Cassandra data sources must use Topics rather than Domains. Support for Cassandra in the Jaspersoft metadata layer is planned for a future release.
  15. Jaspersoft Cassandra Connector in iReport[toc on_off::hide=1] iReport does not ship with the Cassandra connector. You need to first install iReport and then install the connector. Installation Download the Cassandra connector. This includes the plugin (CassandraPlugin-xxx.nbm). In iReport choose the menu Tools → Plugins. On the tab 'Downloaded' browse to the .nbm file then click 'Install'. Restart iReport and the connector will complete its installation. Define a Connection Click the button "Report Datasources" to define a new connection to Cassandra. Add a new datasource of type "Cassandra Connection" Set an appropriate url and test the connection Create a ReportThe simplest way for a new user to create a new report is with the Report Wizard. Choose any template and click "Launch Report Wizard". Set the report name and location. Create a CQL query to retrieve data. There is no visual query editor, so the button "Design query" is inactive. The Jaspersoft query language for Cassandra is documented here: CQL reference
  16. Jaspersoft Cassandra ConnectorImportant Update: This Wiki page support an older connector (v0.5.1). For the latest connector information please go here. The Jaspersoft Cassandra Connector works with iReport, JasperReports, and JasperReports Server. There are separate pages explaining how to configure iReport and JasperReports Server. Cassandra in iReportCassandra in JasperReports ServerTarget AudienceUsers who want to integrate Jaspersoft's JasperReports Server with Cassandra. This document assumes that the user already has familiarity with Cassandra and already has data in a Cassandra database. BackgroundJasperReports Server does not ship with built-in connectors to Cassandra. These resources are provided here on JasperForge.org in order to enable JasperReports Server to access Cassandra data. They are currently in a pre-release format. They are therefore not yet supported by Jaspersoft Technical Support. The source is available for download for anyone that wants to modify or to view it. The connector is released under the AGPL license. Using the Cassandra connectorObtain and unzip Cassandra Connector for JaspersoftDownload it from the project /project/cassandra-connector/releases. The following files are included: plugin/CassandraPlugin-0.5.1.nbm WEB-INF/applicationContext-CassandraDataSource45.xml (DO NOT put this file into a JRS 4.7 instance) WEB-INF/applicationContext-CassandraDataSource.xml WEB-INF/bundles/CassandraDataSource.properties WEB-INF/lib/cassandra-clientutil-1.0.9.jar WEB-INF/lib/cassandra-jdbc-1.0.5-SNAPSHOT.jar WEB-INF/lib/cassandra-thrift-1.0.9.jar WEB-INF/lib/js-cassandra-datasource-0.5.1.jar WEB-INF/lib/guava-r08.jar WEB-INF/lib/libthrift-0.6.1.jar Deploy the Cassandra plugin to iReport: See Cassandra in iReport for details. Create a report: See Cassandra in iReport for details. Deploy the query executer to JasperReports Server: See Cassandra in JasperReports Server for details. Deploy the report to JasperReports Server: See Cassandra in JasperReports Server for details. Run the report: Search for the report or browse to the report in the JasperReports Server repository. Related LinksDownload JasperReports Server: Community Edition or Commercial Edition.Download the Jaspersoft Cassandra Connector.
  17. Hive Query LanguageThe Jaspersoft Hadoop Hive connector uses HiveQL which is the standard query language for Hive. Any valid HiveQL query may be used in a report. The language is documented here: Language Manual (apache.org)Sample queriesHiveQL looks just like SQL in most cases. Basic querySELECT name, phone_office , billing_address_city , billing_address_street , billing_address_country FROM accounts [toc]Parameterized as a prepared statement (new in Hive 0.8)-- Parameter $P{COUNTRY} is a String SELECT name, phone_office , billing_address_city , billing_address_street , billing_address_country FROM accounts WHERE billing_address_country = $P{COUNTRY} ORDER BY billing_address_country , billing_address_city Parameterized using string replacement (not a prepared statement) SELECT name, phone_office , billing_address_city , billing_address_street , billing_address_country FROM accounts WHERE billing_address_country = $P!{COUNTRY} ORDER BY billing_address_country , billing_address_city Parameterized IN clause-- Parameter $P{COUNTRY} is a Collection SELECT name, phone_office , billing_address_city , billing_address_street , billing_address_country FROM accounts WHERE $X{IN, billing_address_country, COUNTRY} ORDER BY billing_address_country , billing_address_city Limit to N rows where N can be specified by the user as a parameter SELECT name, phone_office , billing_address_city , billing_address_street , billing_address_country FROM accounts ORDER BY billing_address_country , billing_address_city LIMIT $P{limit} Exploding HiveQL (not SQL, but very cool!) SELECT word, count(word) as word_count FROM sample_text_table LATERAL VIEW EXPLODE(line) words as word GROUP BY word Hive and the Jaspersoft Metadata LayerThe Hive JDBC driver does not yet fully implement the JDBC specifications, and it does not work correctly with the Jaspersoft metadata layer (Data Domains) yet. Specifically, Jaspersoft requires these unimplemented methods: java.sql.DatabaseMetaData.getIdentifierQuoteString()java.sql.DatabaseMetaData.storesUpperCaseIdentifiers()java.sql.DatabaseMetaData.getImportedKeysAs a result of this, Ad Hoc reporting in JasperReports Server commercial editions against Hive data sources must use Topics rather than Domains. Support for Hive in the Jaspersoft metadata layer is planned for a future release.
  18. Matt G already confirmed that legally you're perfectly fine. I confirm what you had tentatively suggested as the technical requirement. You need com-jaspersoft-ireport.jar only at compile time. Your users will necessarily have it already in iReport at runtime. Also, if you're looking for any tips, please note that the Big Data connectors have working samples of Query Providers. It might be interesting to grab the MongoDB or Hadoop HBase source to take a quick look. Those are in the Big Data Connectors project. Regards, Matt
  19. In my answer to this question I point out a bug in iReport (along with the workaround). It sounds like you're hitting the same thing. You need to set the timePeriod to "Days". Give that a try and let us know how it goes. Regards, Matt
  20. Oops: It seems that I had mixed up my notes. The current message is this: Succesful So the fixed message should just be this: Successful
  21. mdahlman

    Hadoop Hive

    Jaspersoft's Hadoop-Hive ConnectorWorks with iReport, JasperReports, and JasperReports Server Target AudienceUsers who want to integrate Jaspersoft's JasperReports Server with Hadoop using the Hive database. This document assumes that the user already has familiarity with Hadoop and Hive and already has data in Hadoop stored in Hive tables accessible using external JDBC connections. [toc]BackgroundJasperReports Server 4.5 and iReport 4.5 include the HadoopHive connector. Users working with older versions of JasperReports Server or iReport should upgrade to 4.5 or later to get connectivity to Hadoop Hive. Using the Hive connector with older versions of iReport or JasperReports Server is possible. Please contact bigdata@jaspersoft.com for details. Tests were performed with Hive X.Y.Z on distributions from Apache, Cloudera (CDH3), and IBM (BigInsights). It's likely to work with other versions, but others are not tested. SummaryCreate a report in iReport using Hive dataDeploy the report to JasperReports ServerDetailsCreate a reportCreate a new report; set the query language to "HiveQL". The query language for Hive. It is documented here: HiveQL Deploy the report to JasperReports ServerData Source: Define the data source in JasperReports Server: screenshots coming soonReport* Deploy the report from iReport: screenshots coming soon* Deploy the report from the JasperReports Server GUI: screenshots coming soonRelated LinksDownload JasperReports Server: Community Edition or Commercial Edition.Download the Jaspersoft Hadoop Connectors.
  22. mdahlman

    Openshift

    Confirm your OpenShift credentials[toc on_off::hide=1] Ensure that you have a login to OpenShift Flex. Make sure you know how to use OpenShift Flex. (There are lots of great tutorials and documentation!) Deploy JasperReports Server Get JasperReports Server .vpm from the Release section of this project. Deploy it: Configure ApplicationIn the simplest case... there is nothing to configure. But OpenShift gives you plenty of flexibility to configure things that you need. The most common first addition is to define a JNDI data source in META-INF/context.xml. Confirm Application is WorkingBrowse to the running application at one of these urls: http://cluster123456789.prod.rhcloud.com/jasperserver http://cluster123456789.prod.rhcloud.com/jasperserver-proStart using JasperReports ServerBegin by defining a connection to your data source (MySQL, PostgreSQL, MongoDB, etc.) Then define reports in iReport and upload them to JasperReports Server. The best place for details, tutorials, and further information on using JasperReports Server is Evaluation Central. Post bugs to the Tracker for this project. Post questions to the general JasperReports Server forum.
  23. Define a data source using a bound CloudFoundry data serviceLogin to JasperReports Server (jasperadmin/jasperadmin)Create new folderAdd a Data SourceThere are 5 types to choose from: * MongoDB (the "Service Name" must match the name of the bound service exactly) * PostgreSQL or MySQL (the "Service Name" must match the name of the bound service exactly) Define a data source to an external JDBC data sourceCloudFoundry does not support JNDI today, JDBC is the correct choice. See AlsoMongoDB Resources
  24. [toc on_off::hide=1] Example of binding data services to JasperReports Server using vmcAfter deploying JasperReports Server, the next step is to bind existing data sources to the application. $ vmc list+---------------------+----+---------+--------------------------------------+-----------------------------------------------------+| Application | # | Health | URLS | Services |+---------------------+----+---------+--------------------------------------+-----------------------------------------------------+| jaspersoft-421 | 1 | RUNNING | jaspersoft-421.cloudfoundry.com | jrs-repo || jaspersoft-bus-data | 1 | RUNNING | jaspersoft-bus-data.cloudfoundry.com | mongodb-data, postgresql-data, mysql-data |+---------------------+----+---------+--------------------------------------+-----------------------------------------------------+$ vmc bind-service mysql-data jaspersoft-421Binding Service mysql-data: OKStopping Application: OKStaging Application: OK Starting Application: OK $ vmc bind-service postgresql-data jaspersoft-421Binding Service postgresql-data: OKStopping Application: OKStaging Application: OK Staging Application: OK Starting Application: OK $ vmc bind-service mongodb-data jaspersoft-421Binding Service mongodb-data: OKStopping Application: OKStaging Application: OK Starting Application: OK $ vmc list+---------------------+----+---------+--------------------------------------+-----------------------------------------------------+| Application | # | Health | URLS | Services |+---------------------+----+---------+--------------------------------------+-----------------------------------------------------+| jaspersoft-421 | 1 | RUNNING | jaspersoft-421.cloudfoundry.com | mongodb-data, postgresql-data, mysql-data, jrs-repo || jaspersoft-bus-data | 1 | RUNNING | jaspersoft-bus-data.cloudfoundry.com | mongodb-data, postgresql-data, mysql-data |+---------------------+----+---------+--------------------------------------+-----------------------------------------------------+
×
×
  • Create New...