ࡱ > z j B 7 Q( bjbjUU "J 7| 7| $ A l 8 d , . N p T , *, ,, ,, ,, ,, ,, ,, $ - / P, J J J P, " e, " " " J *, " J *, " j " ( * * B '? * * D {, 0 , * 0 V" F 0 * " Calling the SCKEMA Reporting System from Another Browser Application
Basic Invocation (GET and POST)
Once a Query is defined, you may invoke it as a report from any other browser-based program by opening a window with the URL:
sckema.cgi?Report=NNNN
where NNNN is the QueryID.
As an alternative, you may also use the POST method so that the query string is not visible:
Invoked with only the Report variable and nothing else (as shown in both snippets), the user may be prompted for report parameters before the report is run. In the event that there are no parameters in the query definition, the report will be run without prompting the user.
Example Query (QueryID=1014)
The rest of this documentation is built upon an example Query with these parameters:
Default Report (No Parms Specified)
In our example, the GET and POST invocations would look like this:
GET (using query string):
sckema.cgi?Report=1014
POST (using hidden HTML form variables):
When invoked without any parameters defined, our example would produce a screen like this:
EMBED Word.Picture.8
AThe SCKEMA system often pass back (from the browser) the size of the users computer monitor, so that it can use this information when sizing new windows which it opens.BDropdowns fields, like the Client dropdown shown above, always select the first option by default. This is a feature of the browser. When defining the query and its parameters, one should always define the first option deliberately.CMulti-select fields like the Language field shown above will also select the first option by default (SCKEMA does this for you). Users may unselect this by Clicking on another option or using the Control-Click and Shift-Click methods.DReport Style is an implied report parameter which will only appear when: (a) the report style is anything other than NORMAL, and (b) there is at least one non-hidden report parameter to render.
Specifying Report Parm Values On-the-fly
Any and all report parameters can be specified on the fly in the query string or as HTML form variables with a POST operation. The following example shows how the {{LHS}} dropdown (with the prompt Organized By:) has been preselected with the value D.SUBMIT_MIME_TYPE corresponding to the pick value Source Mime Type:
GET Method:
sckema.cgi?Report=1014&LHS= D.SUBMIT_MIME_TYPE
Note that you do NOT include any quotation marks when specifying values in a query string.
POST Method:
When rendered, the report parameters screen will have pre-selected the Organized By: dropdown so that the second choice (Source Mime Type) is chosen:
EMBED Word.Picture.8
The report will only be run if all report parameters have been specified in the query string or with the form POST.
Hiding Individual Report Parameters
Individual parameters can be hidden from the users view by overriding the display type. The following example shows how the {{ProjectID}} dropdown (with the prompt Restrict by Project:) has been hidden by setting ProjectID and ProjectID:type :
GET Method:
sckema.cgi?Report=1014&ProjectID=0&ProjectID:type=hidden
Note that you do NOT include any quotation marks when specifying values in a query string.
POST Method:
EMBED Word.Picture.8
Hiding All Report Parameters
If you desire to run a report without the report parameter section appearing above the report output, you can take advantage of INI parm ReportShowParms. Normally, this is set to 1 (indicating that parms should be displayed above reports). When you set this globally (through the setup screen) or on the fly (as shown below), you can disable the report parameters:
Globally:
Change INI parm ReportShowParms and set to 0.
GET Method:
sckema.cgi?Report=1014&ReportShowParms=0
Note that you do NOT include any quotation marks when specifying values in a query string.
POST Method:
Overriding Default Button Style
There are two basic buttons styles for sorting report output. These are controlled by INI parameter ReportButtonRow. The default behavior is to show up/down buttons for each column in which the Col Buttons in the query definition contain an < or > character. If the column does not allow sorting (presumably because it is not indexed), then the buttons are still shown, but are greyed out.
INI Parm: ReportButtonRow=1 (the default)
EMBED Word.Picture.8
I
The alternative behavior is to only show an up (or down) button to indicate the current report order. Each column which allows sorting is presented as an underlined link and no additional icon is shown. Although this style consumes less room, it is not as flexible because you must click the column header twice in order to achieve a descending sort.
INI Parm: ReportButtonRow=0
INI Parm: ReportButtonRowA= (an alternate image file for the ascending button icon)
INI Parm: ReportButtonRowD= (an alternate image file for the decending button icon)
EMBED Word.Picture.8
Like all INI parameters, the button style can be overridden on the fly to accommodate different behavior for a certain invocations.
Overriding Report and Parms Templates
The greatest change to the look and feel is achieved by creating your own templates to replace report.html and parms.html in sckemas html directory. When one creates new versions of these HTML templates, they should be named with the following naming conventions so that they show up in the query definition screen:
Original FilenameFile Spec for Customized Versions
DescriptionReport.htmlreport*.htmlOverall report screen (parms get imbedded into it).Parms.htmlparms*.htmlParms panel (never gets rendered outside of report template).
EMBED Word.Picture.8
When creating custom templates, great care must be taken to preserve the curly style tokens, as shown in the example on the next page. There are two types of curly-style tokens:
Token StyleExplanationExample (on next page){{FRED}}entire line gets replaced by the runtime valueSee: {{RESIZE}}Note: token is imbedded inside a javascript comment, but replacement will not be commented and will thus be part of the runtime javascript.{{V=FRED}}only the token gets replaced by the runtime valueSee: {{V=TITLE}}
Note: multiple V= style tokens can be used on a single line, as shown.
Example report.html template:
{{V=TITLE}}{{V=TEST}}
{{V=TITLE}}{{V=TEST}}
{{SQL}}
Example parms.html template:
| Report Parameters |
 |
| {{V=PROMPT}} |
|
|
SCKEMA Documentation ( 2001, Ridgeware, Inc. Page - PAGE 9
u \ ] $ r v
( *
'
f 1 : ? >* j{m UjG?
UVaJ j
U5OJ QJ \^J 5\ *B*ph jK& Uj{G?
UVaJ jH U j U6] 56OJ QJ \]^J OJ QJ ^J @ E F f g u \ ^ _ $ `
&