creating topics and domains

0

Hi everyone,


I have taken the Jaspersoft technical training (4 day course) but one thing I am curious about is how to create topics and domains.  In the training course, we could easily create ad-hoc reports and dashboards by selecting a topic/domain that already existed in the training environment.  Of course on my own server, these topics and domains do not exist.

I see where to create domains (from the main menu it's just create > domain) but I don't know that I fully understand it.  A domain is basically just a data source?  So let's say I create a domain and connect it to a database then the "domain" is just essentially a JDBC connection...is that correct?

Also, how do I create topics?  I obviously found it once before because I have a topic saved, but if I remember correctly it just basically allows me to select a report to connect to the topic.  So I guess my questions are:

 

1. What is a topic?

2. How do I create a topic?

3. Is it the case that a topic is always controlled by/connected to a jrxml file?

4. Do I have the correct idea about domains?

 

I'm sorry but I have tried looking through documentation, the ultimate guide, and my training materials but I cannot figure out the answers to these questions.  Thanks!

bdmayes's picture
25
Joined: Mar 22 2011 - 1:34pm
Last seen: 7 years 9 months ago

5 Answers:

0

QUESTION 1. What is a topic?

QUESTION 2. How do I create a topic?

Answers:

There are two types of Topics:

* JRXML Topic--This is the most common type of Topic. An iReport user creates this Topic as an empty JRXML file. The JRXML topic is then associated with a data source in the server.

* Domain Topic--You create this Topic in JasperReports Server using the Data Chooser Wizard. You click Create > Ad Hoc Report to start the Data Chooser Wizard. In the wizard, you choose a pre-existing Domain or Topic upon which to base the new Topic. You can filter the data and change the display names of the data in the wizard. Before you leave the wizard (to design the Ad Hoc report), you can save the filters or display names by clicking Save as Topic.

Both type of Topics appear in the Data Chooser wizard when you create an Ad Hoc report.

QUESTION 3. Is it the case that a topic is always controlled by/connected to a jrxml file?

JRXML Topics and Domain Topics are JRXML files that have no report content and are associated with a data source in the server.

QUESTION 4. Do I have the correct idea about domains?

Yes, you do. Thanks for your interest in the server.

khahn's picture
168
Joined: Apr 4 2011 - 3:29pm
Last seen: 9 years 9 months ago
0

Thank you for the reply -- it definitely helps.  I am still a little confused about what you refer to as jrxml topics however.  You said that "An iReport user creates this Topic as an empty JRXML file." ...

 

How empty of a file are we talking about here?  You mean empty in the sense that there are no queries (SELECT statements), or do you mean truly empty?  It can't be entirely empty because then it would be completely pointless and unnecessary.  So I guess I'm just wondering if you can clarify what you mean by empty.  If I define some fields inside of the bands and add some variables and/or parameters, is that considered empty?  Perhaps as soon as I tie it to a data source and define queries it is no longer empty?

bdmayes's picture
25
Joined: Mar 22 2011 - 1:34pm
Last seen: 7 years 9 months ago
0

Hi,

Thanks for the excellent questions. How empty a file are we talking about? In iReport, create a report that defines the data source and queries the data source to select the fields that you want your Topic to expose to users. For example, connect to the sample database, sugarcrm, and use the JRXML included in this message. See attachment 1.

Next, go to the server and do this:

1. Right-click the Topics folder (usually a subfolder of Ad Hoc Components), and select Add Resource > JasperReport.

2. In the Set Up the Report page, give the Topic a name and upload the jrxml that you created in iReport.

3. Click the Data Source button. Select the Analysis Components/Analysis Data Source/SugarCRM Data Source. See attachment 2.

    The data source connection that you defined in iReport is lost when you add the JRXML to the server, so you have to recreate it.

4. Click Submit until the wizard closes.

That's it--no query or selection of fields is needed. The fields that you defined in iReport will appear in the Ad Hoc report when you create it using the JRXML topic. See attachment 3.

Many thanks for your interest in the products.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports <a target="_blank" href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd""><a href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"" target="_blank">http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"</a></a> name="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<queryString language="SQL">
		<![CDATA[select id, billing_address_country, billing_address_city
from accounts]]>
	</queryString>
	<field name="id" class="java.lang.String"/>
	<field name="billing_address_country" class="java.lang.String"/>
	<field name="billing_address_city" class="java.lang.String"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="79" splitType="Stretch"/>
	</title>
	<pageHeader>
		<band height="35" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="61" splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="125" splitType="Stretch"/>
	</detail>
	<columnFooter>
		<band height="45" splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="54" splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band height="42" splitType="Stretch"/>
	</summary>
</jasperReport>


Post Edited by khahn at 06/30/2011 23:21
khahn's picture
168
Joined: Apr 4 2011 - 3:29pm
Last seen: 9 years 9 months ago
1

Awesome!!  Thank you very much...that explains a lot!  It's almost like both topics and domains are the same but topics have to be created in iReport (and are therefore a canned query in the form of a jrxml file) while domains are created in Jasper Server directly and can include joins and so forth.  I guess you could technically do a join in the jrxml file as well, and then expose those values as fields but then you're doing it all manually.

 

In any case, hooray I finally get it!  :)

bdmayes's picture
25
Joined: Mar 22 2011 - 1:34pm
Last seen: 7 years 9 months ago
0

Hi forumm...!!! 

I'm newbie to iReport and JasperServer...

I'd like to know the concept of domains and very much interested in it.

I'm using all community versions i.e, iReport 4.7 and  JasperServer CE 5.0.0

Here are my basic questions.

1) What is a domain ?(Is it a data source like we create a JDBC Connection)

2) What are domain parameters in iReport ? How to use them in iReport and Server ?

3) How we can create domain report ? Do we need all licenced versions to work out this.. or CE versions also provide the concepts. 

4) How domain and Ad-hoc report related ?

5) How to create a simple report using the concept of domain,domain parameter, ad-hoc reporting using foodmart database/or any other database in   iReport ?

Your help would highly taken into consideration.

Thanks :)

sadakar's picture
694
Joined: Aug 14 2012 - 3:57am
Last seen: 2 months 9 hours ago
Feedback