Crystal Report Template - Insert Table

If MaxPermSize is not explicitly defined in java options, the default is 64m, which is quite low. We recommend using a minimum of 128m for Crystal Reports to avoid any out of memory errors when data is printed using Crystal Reports. Add -XX:MaxPermSize=128m in java options of tomcat

Step 01> In Crystal Reports, Right-Click Database Fields and Select Database Expert

Step 02> Expand Create new connection, then JDBC (JNDI).

 

Step 03> Enter the same JDBC connection details used to setup the Crystal  Data sources in Dekho. It is important to use the same connection name in crystal as was used to setup the crystal  Data sources in the Administration Client. Crystal states that the field is optional, but to get the report to work in Dekho, it is actually a required field.

Step 04> Click Next, and enter the username and password.

Step 05> Click Finish. The tables for the  Data sources should appear in the database expert.

Step 06> Drag a table into the selected tables field.

 

 

 

PLEASE NOTE: If an error occurs when a table is added, it may be because one or more of the columns in the table has a data type that is not supported by Crystal Reports and JDBC. This is most often encountered when adding a table from SQL Server that includes NVARCHAR columns. The workaround is to create a view that either masks that column, or casts it to another type, eg select CAST(mynvarchar as VARCHAR(200) AS myfield from mytable.

 

 

 

Step 07> Create an XML connection to Dekho to access the selection. Scroll down to the bottom of the Available Data Sources tree, and expand XML (or ‘XML and Web Services’).

 

Step 08> Select Use HTTP(S) Data Source

Step 09> In the HTTP(S) XML URL text box, Enter:

http://localhost:8080/Dekho/CrystalQueryServlet.

Step 10> Uncheck Specify Schema File.

Step 11> Click next.

Step 12> Leave blank anything in the user id and password fields, just Click Next again.

 

Step 13> Click add property. Enter ‘sessionid’ for the property field, and ‘abcd’ for the value field. Dekho will overwrite this value when running the report to your current session id.

Step 14> Click ok, then add property again.

Step 15> Enter ‘layers’ for the property field and the property fully qualified layer name for the value field. For example; if the ‘Property’ layer was in group layer ‘Group 1’ of the service ‘BaseMap’, the fully qualified layer name for the property layer would be:

BaseMap.Group 1.Property

Step 16> Click OK then finish. If Crystal Reports prompts you to enter values for the session id and layers parameters, select some values, then Click the OK button.

Step 17> Expand the newly created xml  Data sources and drag the root/selection/feature item over to the selected tables field.

Step 18> Click the Links Tab.

Step 19> Click the objectid field in root/selection/feature and drag to the objectid field in the property table, then release the mouse. This creates a join between the Dekho current selection (the xml data source) and your property table.

Step 20> Click OK to finish creating data sources.

Step 21> Select the fields you want on your report in the field explorer, and drag them onto the report. The fields must include the object id field from the xml data source, but you can set the colour to white if you don’t want it to appear on the report output.

Step 22> Save the report ready for Testing in Dekho.

Step 23> To verify the report, in the Report drop-down, Select the new report and Click Generate.

Step 24> The report with a map and attributes related to the selection will open in a new window.


Crystal Report Template Insert Map for Multiple Selected Features