CONQRSMGR Class Properties

In this section, the CONQRSMGR class properties are presented in alphabetical order.

Description

This property returns a CONQRS_CONST object.

This property is read-only.

Description

Use this property to set or return a description for the connected query as a string.

This property is read-write.

Description

Use this property to set or return a long description for the connected query as a string.

This property is read-write.

Description

This property returns the error message as a string if an error occurs during processing.

This property is read-only.

Description

Use this property to return a Boolean value indicating whether to perform execution logging while executing the connected query.

This property is read-only.

Note: While this property is read-only, it can be set through the PropertyArray property.

The default value is False.

Description

Use this property to return a Boolean value indicating whether to create XML output without related field nodes.

This property is read-only.

Note: While this property is read-only, it can be set through the PropertyArray property.

The default value is False.

Description

This property returns a Boolean value indicating whether the connected query has been changed.

Note: When an existing connected query is opened, IsChanged is initialized to False.

This property is read-only.

Description

Use this property to return a Boolean value indicating whether to perform logging while executing the connected query. In addition, in debug mode, temporary files generated during execution of the connected query are not deleted after execution is complete. The log also contains SQL statements generated by each member query as well as values for the related fields used to link the parent query to its children.

This property is read-only.

Note: While this property is read-only, it can be set through the PropertyArray property.

The default value is False.

Description

This property returns a Boolean value indicating whether the connected query object has been initialized (opened) after object instance was created.

This property is read-only.

Description

This property returns a Boolean value indicating whether the connected query is public.

This property is read-only.

Description

This property returns the user ID of the user to have last updated the connected query, as a string.

This property is read-only.

Description

This property returns the last update date and time for the connected query, as a DateTime value.

This property is read-only.

Description

Use this property to set or return a number representing the maximum number of rows returned by each query in preview mode. If set to 0, no maximum is set.

This property is read-write.

Description

This property returns the name of the connected query as a string.

This property is read-only.

Description

Use this property to set or return a Rowset object. The parent record for this rowset is PSCONQRSMAPVW; its child record is PSCONQRSFLDRLVW. Use of the ObjectRowset property and its associated rowset prevents the report developer from directly manipulating the managed object itself.

Getting the ObjectRowset property returns a Rowset object with the following structure, populated with Connected Query Manager data:

ObjectRowset = CreateRowset(Record.PSCONQRSMAPVW, CreateRowset(Record.PSCONQRSFLDRLVW));

Setting the ObjectRowset property returns the rowset data back to the Connected Query Manager.

This property is read-write.

Description

This property returns a string representing the user ID to which the connected query belongs to for private queries. For public queries, an empty string is returned.

This property is read-only.

Description

This property returns a string representing the output file name as an absolute path.

Note: This property is valid only for a connected query scheduled for running to a fileā€”that is, when the run mode is equal to RunMode_Sched_File.

This property is read-only.

Description

Use this property to set or return an array of CONQRSPROPERTY objects (properties) for the connected query. If no properties exist, this array returns the default set of properties.

This property is read-write.

The following read-only properties of the CONQRSMGR class are dynamically synchronized whenever the PropertyArray property is set or returned:

  • ExecutionLog

  • IgnoreRelFldOutput

  • IsDebugMode

  • ShowFormattedXML

Example

The first example retrieves a set of properties from the database and populates the page grid using the Page Activate event:

import PT_CONQRS:CONQRSMGR;
import PT_CONQRS:CONQRSPROPERTY;

Component PT_CONQRS:CONQRSMGR &cConQrsInst;

Local array of PT_CONQRS:CONQRSPROPERTY &propArr;
Local Rowset &rsProp;
Local number &i, &j;

&propArr = &cConQrsInst.PropertyArray;
If &propArr.Len = 0 Then
   Return;
End-If;
Local Record &recProp, &recWrk;
&rsProp = GetLevel0()(1).GetRowset(Scroll.PSCONQRSPROP);
&rsProp.Flush();
For &i = 1 To &propArr.Len
   If &i > 1 Then
      &rsProp.InsertRow(&i - 1);
   End-If;
   &recProp = &rsProp(&i).PSCONQRSPROP;
   &recProp.PROPVALUEOPTION.ClearDropDownList();
   For &j = 1 To &propArr [&i].PROPVALUEARRAY.Len
      &recProp.PROPVALUEOPTION.AddDropDownItem(&propArr [&i].PROPVALUEARRAY [&j], &propArr [&i].PROPVALUEARRAYDESC [&j]);
   End-For;
   &recProp.PROPNAME.Value = &propArr [&i].PROPNAME;
   &recProp.PROPVALUEOPTION.Value = &propArr [&i].PROPVALUE;
   &recProp.OPRID.Value = &cConQrsInst.OprID;
   &recProp.CONQRSNAME.Value = &cConQrsInst.Name;
   
   &recWrk = &rsProp(&i).PSCONQRS_WRK;
   &recWrk.PROPVALUEOPTION.Value = &propArr [&i].PROPDEFAULT;
End-For;

The second example populates a property array from a page grid. This program is executed when a user hits the OK button on a secondary page, PSCONQRSPROPS:

import PT_CONQRS:CONQRSMGR;
import PT_CONQRS:CONQRSPROPERTY;

Component PT_CONQRS:CONQRSMGR &cConQrsInst;

If %Page = Page.PSCONQRSPROPS Then
   Local array of PT_CONQRS:CONQRSPROPERTY &propArr;
   Local Rowset &rsProp;
   Local number &i;
   Local Record &recProp, &recWrk;

   /* Get the property array from the database.            */
   &propArr = &cConQrsInst.PropertyArray;
   If &propArr.Len = 0 Then
      Return;
   End-If;
   
   &rsProp = GetLevel0()(1).GetRowset(Scroll.PSCONQRSPROP);
   If &propArr.Len <> &rsProp.ActiveRowCount Then
      Return;
   End-If;
  
   For &i = 1 To &rsProp.ActiveRowCount
      &recProp = &rsProp(&i).PSCONQRSPROP;
      &recWrk = &rsProp(&i).PSCONQRS_WRK;
      If None(&recProp.PROPNAME.Value) Then
         &recProp.PROPNAME.Value = &recWrk.PROPVALUEOPTION.Value;
      End-If;
      &propArr [&i].PROPNAME = &recProp.PROPNAME.Value;
      &propArr [&i].PROPVALUE = &recProp.PROPVALUEOPTION.Value;
      &propArr [&i].PROPDEFAULT = &recWrk.PROPVALUEOPTION.Value;
   End-For;

   /* Return the modified property array to the database.  */
   &cConQrsInst.PropertyArray = &propArr;
End-If;

Description

This property returns an array of QUERYITEMPROMPT objects. This array is used by the connected query object as a parameter to the Run method in preview mode.

This property is read-only.

Description

This property returns an array of string representing the query names that constitute the connected query object.

This property is read-only.

Description

This property returns a string representing the user ID of the user who created the connected query object.

This property is read-only.

Description

This property returns the creation date and time for the connected query, as a DateTime value.

This property is read-only.

Description

This property returns a string representing the run control ID for scheduling the connected query.

This property is read-only.

Description

This property returns an array of PSCONQRSRUNPRM records to be used for displaying and updating the set of scheduling parameters for the queries.

This property is read-only.

Description

This property returns a number representing the run mode for a connected query instance. The values are:

Numeric Value

Constant Value

Description

1

RunMode_Window

Run the connected query in background mode with output to a separate browser window.

The connected query runs via Process Scheduler and uses a REN server for delivering the output XML to the user. The XML result file is delivered to both the REN server window and the Report Manager.

2

RunMode_Sched_Web

Run the connected query at a scheduled time with output to web.

The connected query is scheduled to output the XML result file to the Report Manager. It can be accessed by the user via a Report Manager link.

3

RunMode_Sched_File

Run the connected query at a scheduled time with output to a file name and location specified by the user.

4

RunMode_Prev

Run the connected query immediately in preview mode with output to a separate browser window.

The connected query is executed immediately on the application server with output to a separate browser window. The output XML is not formatted internally; the only formatting that occurs is performed by the browser. Because results only exist for the browser session and are not preserved, this mode should be used during connected query creation, debugging, and tuning only.

Important! When using the preview mode, set a limit on the number of rows returned from each query.

See MaxRowsPerQuery, RunMode_Prev_DefRowNumber.

5

RunMode_Sample

Run the connected query immediately with output to a file that is suitable as a BI Publisher data source.

6

RunMode_XMLFormattedString

Run the connected query immediately with output to a formatted XML string. This formatted XML string is larger than the unformatted XML of the RunMode_Prev mode.

The connected query is executed immediately on the application server with output to a formatted XML string. This string is formatted according to the XML DOM object and is suitable for displaying in a long edit box. This mode is used by the Connected Query Quick Start wizard in which XML results are previewed on the application page in a long edit box.

Important! When using the formatted XML string preview mode, set a limit on the number of rows returned from each query.

See MaxRowsPerQuery, RunMode_Prev_DefRowNumber.

This property is read-only.

Description

Use this property to set or return a SCHED_INFO object to be populated with scheduling details. Use the property as a parameter to the Run method for scheduling connected query execution when the run mode is RunMode_Window, RunMode_Sched_Web, or RunMode_Sched_File.

This property is read-write.

Description

Use this property to set or return a string indicating which application scheduled the connected query process. The values are:

Value

Description

CQR

Connected Query Manager

XMLP

BI Publisher

Separate run control parameter records (PSCONQRSRUNPRM or PSCONQRSRUNPRMX) are used for different values of this property.

This property is read-write.

Description

This property returns a SEC_PROFILE object, which shows the user's query access level as defined for the query.

This property is read-only.

Description

Use this property to return a Boolean value indicating whether to retain indentation when generating XML output.

This property is read-only.

Note: While this property is read-only, it can be set through the PropertyArray property.

The default value is False.

Description

Use this property to set or return a string representing the status of the connected query. The values are:

Value

Description

A

Active

I

Inactive

Value

Description

P

In progress.

This property is read-write.

Description

This property returns the short name for the XML data file as a string.

This property is read-only.

Description

This property returns the long name for the XML data file as a string.

This property is read-only.