Developers Knowledge Base

GeoMedia Smart Client Workflow Manager provides tools for building and delivering highly-constrained, map-based workflows for the office or the field.
Showing results for 
Search instead for 
Do you mean 

Report (How To)

by Technical Evangelist ‎09-01-2015 05:03 AM - edited ‎04-13-2016 11:58 PM (1,939 Views)

Note: You will find the Telerik Report Designer in INSTALLDIR\Program\Telerik.ReportDesigner.exe.

 

Creating a report template

 

In this tutorial the template is created with telerik Report Designer. The following steps and screenshots shows you how to create a template and response to the columns and fields in the database.

 

  • Open a empty report file in the telerik Report Designer. In the wizard, which opens automatically you can choose between some predefined layouts.
  • Add some textboxes in the detailSection:

  

Insert textbox DetailSection with a some textboxes
 Telerik_textbox.png  Telerik_textbox2.png

 

  • Filling the textboxes with static values (for example: School Name).
  • Filling the textboxes with values from database(for example: NAME) to get the "real" name of the school.
  •        Click on a textbox, where you want to get values from the database

Telerik3.png

  • Type in =Fields.FORM_{ColumnName} at the box Value on the right side (for example: =Fields.FORM_NAME).

Note: You have to set FORM_{ColumnName} because the values are in a form. If you have list values you are response with ROW_{ColumnName}


Telerik4.png

 

 

FormTable in Reports

 

In principle you have two possible options to get a table into your report.

  • Inserting a table Telerik_table.png
  • Creating a SubReport template

Inserting a table

 

  • Insert a table into your empty or predefined layout.

Telerik_table1.png

 

  • The first row serves for the header of every column and the second serves for the values you want to have out of your database.

Telerik_table2.png

 

  • To bring the values up to the right field, you have to type in =Fields.{ColumnName} (for example =Fields.CATEGORY) like in Creating a SubReport template
  • Check if the name of the whole table is the same as your FormTable.

  

Checking the table Checking the name of the table with the name of the FormTable
 Telerik_table2.png  Telerik_table3.png

 

 

 

Creating a SubReport template

 

In this section you get an introduction how to create a SubReport.

 

  

Insert SubReport Report + SubReport
 Telerik_sub.png  Telerik_sub3.png

 

 

You have to follow step 1-4 like in Creating a report template.

  • Empty form
  • Inserting textboxes
  • Filling with static value
  • Filling with values from database
  • Clicking on a textbox

Telerik_sub1.png

  • Type in =Fields.{ColumnName} at the box Value on the right side (for example: =Fields.CATEGORY.

Note: Elements in tables you have to response with =Fields.{ColumName}.

 

Telerik_sub2.png

 

  • At your parent report you have to check if the Name value correlates to the name of the FormTable and if the ReportSource correlates to the SubReport Template, you have created:
  • Clicking on the subreport.

Telerik_sub4.png

  • Check Name and ReportSource

Telerik_sub5.png

 


FormMap in Reports


It is also possible to show a map on the FormReport.

You have to follow step 1-4 like in Creating a report template.

 

  • Empty form
  • Inserting textboxes
  • Filling with static values
  • Filling with values from database
  • Insert a PictureBox

  

Insert PictureBox Template with FormMap
 Telerik_picturebox.png  Telerik_picturebox1.png

 

 

  • Check if the name of the PictureBox is the same as for FormMap in your workflow.

 

Checking the PictureBox Checking the name of the PictureBox with the name of the FormMap in your workflow
 Telerik_picturebox1.png  Telerik_picturebox2.png

 

 

 

 

Creating a workflow

 

In this case a simple workflow was built, which gives an overview of all schools in Las Vegas. Futhermore it is possible to get a detailed view of every school. There you find the ID, type and category of the specific school and you get a table, where every operations (fire department, police and ambulance) for the specific school is listed.

 


FormSettings

  

 

<?xml version="1.0" encoding="utf-8" ?>
<FormList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Form name="SCHOOL" table="SCHOOL_P" idfield="ID1" order="SQL[Order By ID1]">
    <FormTab name="GENERAL_TAB" label="General Information">
      <FormGroup name="General_GROUP" label="General">
        <FormField name="ID1" label="ID:" type="textfield" datatype="number" required="false" maxlength="36" visible="hidden" />
        <FormField name="NAME" label="School Name:" type="textfield" visible="true" />
        <FormField name="SCHOOL_ID" label="School ID:" type="textfield"  visible="form,list" />
        <FormField name="TYPE" label="School Type:" type="textfield" />
        <FormField name="CATEGORY" label="School Category:" type="textfield" />
      </FormGroup>
      <FormGroup name="OpertaionsTable" label=" ">
        <FormTable name="OPERATIONS" idfield="ID" lov="SQL[Select * FROM OPERATIONS WHERE SCHOOL_ID = {FORM.ID1}]" persisted="false">
          <FormTableField name="CATEGORY"     />
          <FormTableField name="DIRECTOR"     />
          <FormTableField name="STARTDATETIME" datatype="datetime"    />
          <FormTableField name="ENDDATETIME" datatype="datetime"    />
        </FormTable>
        </FormGroup>
    </FormTab>
  </Form>
</FormList>

 

 

 

WorkflowSettings

 

 

<?xml version="1.0" encoding="UTF-8" ?>
<WorkflowRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <WorkflowNode id="0" label="Home" >
    <WorkflowNode id="1" label="School" >
      <WorkflowNode id="10" label="Overview" controller="List" form="SCHOOL">
        <WorkflowNode id="100" label="Edit" controller="Form" form="SCHOOL" follownode="10" />
      </WorkflowNode>
    </WorkflowNode>
  </WorkflowNode>
</WorkflowRoot>

 

 

 

Overview_formreports.png

 

Detail_form.png

 

 

Adding FormReport to the workflow

 

You have to add the attribute FormReport to your workflow. Detailed information about FormReport can be found LINK FormReport.

 

 

<FormReport name="GMSCReport" type="detail" />

 

 

 

As you can see, you have to set the name the same as your template and the type is defined as detail. So you get the report button at the overview list as well as at the detailed view.

 

Note: Name in FormReport must be the same as your template name.


Reportbutton_overview.png

Reportbutton_form.png

 


Because the default value for format at the FormReport is pdf, this is the only available options in this case. For sure you can add existing ones or defining new ones. Every information about this topic can be found LINK FormReport.


So if you click on the icon or the font pdf, a report gets automatically downloaded.

 


Adding FormMap to the workflow

 

You have to add the attribute FormMap to your workflow. Detailed information about FormMap can be found LINK FormMap.

 

 

<FormMap name="Map" label="Map" activelayer="7" layers="1,6,7,8" fitelements="{FORM.ID1}" drawingmode="highlighted" fitfactor="2" template="MapBigTemplate" />

 

 

 

As you can see, you have to set the name of the FormMap like the name of the PictureBox and you have a few other options.

 

Note: Name in FormMap must be the same as the name of the picturebox in your template.

 

 

 

Report (detail) with table

 

Report_detail_table.png

 

 


Report (detail) with SubReport

 

Report_detail_sub.png

 

 

Report with FormMap

 

Formmap.png

 


Report (overview)

 

The difference to the two above mentioned report results is:

 

<FormReport name="GMSCReportOverview" type="overview" />

Telerik_overview.png

 

Telerik_overview1.png

Comments
by
‎05-01-2016 01:45 AM - edited ‎05-01-2016 01:46 AM

Hello,

I have a problem at report.. i have created it at telerik designer and i can preview it successfully... then i have added to my workflow form using "FormReport".. i can see the report button but cannot see the report itself ...  when export to pdf or any other format.. it is exported and the pdf file contains the following error at values places... An error has occurred while processing TextBox 'iD1DataTextBox':
The expression contains object 'ID1' that is not defined in the current context.

An error has occurred while processing TextBox 'nameDataTextBox': The expression contains object 'Name' that is not defined in the current context.

Overview
Contributors