Layout elements

Top  Previous  Next

The expressions that are used to create layout elements include all standard filter functions, as well as a number of functions that are specifically for layouts.  These layout specific functions provide access to any projects, studies or reports in the project tree.  Also available are any templates that have been saved to the server.  

 

The following functions and variables are available:

 

Most of the functions below take a parameter called PSRO.  

PSRO is a text string that specifies the desired Project, Study, Report and ObjTyp.  The format of this string is Project:<ProjectName>;Study:<StudyName>;Report:<ReportName>;ObjType:<ObjType>.  Here is an example of a PSRO string: "Project:Project one;Study:Test study 1;Report:My diagram;ObjType:diagram"

Because the system always knows the names of the Project, Study and Report, these values can be filled in automatically.  If any of these parameters are missing, the values for the currently selected objects will be used.  For example, to create an expression that always selects the current project, current study, and the diagram called "rpt diagram", you would use the following PSRO string:

"Report:rpt diagram;ObjType:diagram".

Finally, this string can be left completely blank to specify the current project, study and report.  This is how to create a layout for a single, current report.  A typical means of creating a re-usable report is to create it with a specific PSRO until it is working properly.  Once it is complete, change the PSRO to a blank string so that the report will use the currently selected report for its content.

At the time of creation of this manual, the only available project ObjType value is "project". ObjType for studies can be "marrs", "intersection", "xystudy", "milepost", "daterange".  ObjType for reports are "diagram", "chart", "list", "layout", "map".

 

Most of the functions also take a parameter called FormatSpec.

FormatSpec is used to specify formatting options for the specified content.  For example, it may contain font information, size, or content-specific information.  Most content has reasonable default values if the FormatSpec doesn't include any values.  The format spec is also semi-colin delimited.  Here is an example of a FormatSpec for a collision diagram object: "width:7.5in;ShowKey:True".

 

 

 

 

CurrentProject

CurrentProject

Returns a string that specifies the name of the currently selected project.

CurrentStudy

CurrentStudy

Returns a string that specifies the name of the currently selected study.

CurrentReport

CurrentReport

Returns a string that specifies the name of the currently selected report.

CurrentObjType

CurrentObjType

Returns a string that specifies the objtype of the currently selected project, study or report.  (i.e. chart,diagram,list,layout)

 

Project functions:

Project.Name.ASCII

Project.Name.HTML

Project.Name.SVG

Project.Name.FO

Project.Name.ASCII(PSRO,FormatSpec)

Returns the name of the specified project in the format requested.  

 

Project.Description.ASCII

Project.Description.HTML

Project.Description.SVG

Project.Description.FO

Project.Description.ASCII(PSRO,FormatSpec)

Returns the description of the specified project in the format requested.

Project.DB.XML

Project.DB.XML(PSRO,FormatSpec)

Returns the raw xml document stored with the specified project.  Using this content is a very advanced subject which requires an understanding of the Crash Magic internals as well as XML processing.

 

Study functions:

Study.Name.ASCII

Study.Name.HTML

Study.Name.SVG

Study.Name.FO

Study.Name.ASCII(PSRO,FormatSpec)

Returns the name of the specified study in the format requested.

 

ObjTyp for studies can be "marrs", "intersection", "xystudy", "milepost", "daterange"

Study.Description.ASCII

Study.Description.HTML

Study.Description.SVG

Study.Description.FO

Study.Description.ASCII(PSRO,FormatSpec)

Returns the description of the specified study in the format requested.  

Study.DB.XML

Study.DB.XML(PSRO,FormatSpec)

Returns the raw xml document stored with the specified study.  Using this content is a very advanced subject which requires an understanding of the Crash Magic internals as well as XML processing.

Study.FilterName.ASCII

Study.FilterName.ASCII(PSRO,FormatSpec)

Returns a string containing the name of the filter associated with the specified study.

Study.RecordCount.ASCII

Study.RecordCount.ASCII(PSRO,FormatSpec)

Returns a string containing the number of records in the specified study.  This is the number of records returned from the SQL query.  It does not take into account the filter, if any, associated with the study.

Study.FilteredRecordCount.ASCII

Study.FilteredRecordCount.ASCII(PSRO,FormatSpec)

Returns a string containing the number of records in the specified study after filtering.  This is the number of records returned from the SQL query less the records removed as a result of the filter, if any, associated with the study.

Study.QueryName.ASCII

Study.QueryName.HTML

Study.QueryName.SVG

Study.QueryName.FO

Study.QueryName.ASCII(PSRO,FormatSpec)

Returns a string containing the name of the query associated with the specified study.

Study.List.XML

Study.List.XML(PSRO,FormatSpec)

Returns an XML document containing the requested fields.  Because this is a Study function, all of the fields from the specified study are available.  The FormatSpec should include a variable called "ListTemplate".  This variable must point to a template containing a list template containing the desired fields for this report.

 

 

Report functions (common):

<report>.Name.ASCII

<report>.Name.HTML

<report>.Name.SVG

<report>.Name.FO

<report>.Name.ASCII(PSRO,FormatSpec)

Returns the name of the specified report in the format requested.  

<report> can currently be:

Diagram,Chart,List or Layout.

 

 

<report>.Description.ASCII

<report>.Description.HTML

<report>.Description.SVG

<report>.Description.FO

<report>.Description.ASCII(PSRO,FormatSpec)

Returns the description of the specified report in the format requested.  

<report> can currently be:

Diagram,Chart,List or Layout.

<report>.List.XML

<report>.DB.XML(PSRO,FormatSpec)

Returns the raw xml document stored with the specified report.  Using this content is a very advanced subject which requires an understanding of the Crash Magic internals as well as XML processing.

 

PSRAttr functions:

Template.XSL

Template.XSL( PSRAttrName, PSRAttrObjectType, OutputType )

Returns the XSL document inside of a PSRAttr. For backwards compatibility with current layouts, if output type is not specified, and there is only one XSL document inside of the PSRAttr, it will select that document.