Deprecated Create methods

Top  Previous  Next

Important: This section describes deprecated functionality that will be removed in future versions of Crash Magic.  It is provided as a reference for programmers porting their old code to this new API.

 

Prior versions of Crash Magic populated the SQL query directly.  This required knowledge of the data type, parameter and an index to tie them all together.  This method of specifying query parameters is still supported, but will be removed in future versions of Crash Magic.

Also, the names for the Filter, categories and other parameters included the suffix "template" which is no longer required, but still supported.

 

chart, diagram, gis, layout, list, locationlist:

Parameter

Description:

Supported values:

Studydefinition (required)

The Studydefinition specifies which study definition to use.

Any valid study definition name in the configuration.

 

SQL parameter list (required)

List of sql parameter names, types and values required for the specified query.

 

SQLn=<parameter name>

<parameter name>=<parameter value>

<parameter name>T=<parameter type>

 

For example:

SQL0=PrimaryStreet

PrimaryStreet=Main Street

PrimaryStreetT=string

SQL1=FirstDate

FirstDate=01/01/2005

FirstDateT=DateTime

SQL2=LastDate

LastDate=01/01/2005

LastDateT=DateTime

SQL3=Distance

Distance=200

DistanceT=Integer

 

SQL0=PrimaryStreet&PrimaryStreet=Main Street&PrimaryStreetT=string&SQL1=FirstDate&FirstDate=01/01/2005&FirstDateT=DateTime&SQL2=LastDate&LastDate=01/01/2005&LastDateT=DateTime&SQL3=Distance&Distance=200&DistanceT=Integer

Parameter name must be the name of a parameter that exists in the query specified by the Query parameter.  All parameters in the Query must be specified in the SQL parameter list for the study to load correctly.

 

The starting SQL parameter is always SQL0.

 

Parameter value must be the value to be passed to the query.

Parameter type must be one of the types listed below.  The type must match, or at least be compatible with the field type in the SQL database. Not all types are valid for all databases.

 

The most common types are bold in the list.  It is unlikely that you will have cause to use a different type than the common ones.

 

String

Smallint

Integer

Word

Boolean

Float

Currency

BCD

Date

Time

DateTime

Bytes

VarBytes

AutoInc

Blob

Memo

Graphic

FmtMemo

ParadoxOle

DBaseOle

TypedBinary

Cursor

FixedChar

WideString

Largeint

ADT

Array

Reference

DataSet

OraBlob

OraClob

Variant

Interface

IDispatch

Guid

TimeStamp

CategoriesTemplate

(optional)

Specifies the name of the Category list to be used with a study.

Any valid Category list name

Project (optional)

The Project parameter tells Crash Magic what project to use when creating a new diagram.

 

Any valid project name may be specified.  If the specified project does not exist, it will be created.

 

If Project is not specified, then the "MagicAuto" project will be used.  MagicAuto will be created if it does not already exist in the current user's project tree.

Any valid project name

Study (optional)

This will be the name of the study that will be created for this diagram.  If Study is omitted, it will default to the name specified in the "Name" parameter.

 

If the specified study already exists, and has the same query, parameters, filter, etc. a new study will not be created.

 

If the study doesn't exist it will be created.  If it exists with different parameters, the name will be made unique and a new study will be created.

 

If no "Name" parameter is given, and no Study is specified, then a unique name will be created for the study.

Any valid study name

Report(optional)

This will be the name of the diagram report that will be created.  If Report is omitted, it will default to the name specified in the "Name" parameter.

 

The specified name will be checked to be sure it does not already exist.  If it does exist, it will be made unique by adding a number to it.  i.e. My Diagram (1)

 

If no "Name" parameter is given, and no Report is specified, then a unique name will be created for the diagram.

Any valid report name

Name (optional)

Name can be used to specify the same name for both the Study and Report.  By specifying Name, and not specifying either Study or Report, Name will be used for both parameters.

Any valid Study and Report name.

Template

(optional)

Template causes the specified template name to be loaded into the new report.  The default for a template, if not specified, is the user's default template for the specified report type.

Any valid, existing template name.

FilterTemplate

(optional)

FilterTemplate causes the specified filter template to be loaded into the study of the object created. The default is to load no filter.

Any valid, existing filter template name.

FilterFromStudy (optional)

FilterFromStudy causes the filter from the specified Project,Study to be copied to the new study being created.

Any valid Project and Study pair separated by a comma.