|
ITK Function Reference
(V10000.1.0.60_20160308.00) |
#include <tc/tc_startup.h>#include <ss/ss_const.h>#include <pie/pie.h>#include <qry/libqry_exports.h>#include <qry/libqry_undef.h>Go to the source code of this file.
Macros | |
| #define | BOM_REP_CRITERIA "BOM_REPORT" |
| #define | BOM_REP_CRITERIA_VAL "TRUE" |
| #define | BOM_REP_TYPE "BOMReport" |
| #define | CRF_CUS_REPORT_ID_PREFIX "TC_9_00_CUS_RPT_" |
| #define | CRF_DEFAULT_REPORT_EXTENSION ".xml" |
| #define | CRF_EXCEL_EXTENSION ".xls" |
| #define | CRF_EXCEL_OOXML_EXTENSION ".xlsx" |
| #define | CRF_EXCEL_STYLESHEET "CrfExcelStylesheet" |
| #define | CRF_HTML_EXTENSION ".html" |
| #define | CRF_HTML_STYLESHEET "CrfHtmlStylesheet" |
| #define | CRF_ITM_REPORT_ID_PREFIX "TC_9_00_ITM_RPT_" |
| #define | CRF_MSWORD_EXTENSION ".doc" |
| #define | CRF_MSWORD_STYLESHEET "CrfMSWordDocStylesheet" |
| #define | CRF_NEWEXCEL_EXTENSION ".xlsm" |
| #define | CRF_NEWEXCEL_STYLESHEET "MSExcelX" |
| #define | CRF_NEWMSWORD_STYLESHEET "MSWordX" |
| #define | CRF_NEWWORD_EXTENSION ".docm" |
| #define | CRF_OUTPUT_EXCEL_DATASET_TYPES "CrfOutputExcel" |
| #define | CRF_OUTPUT_EXCEL_NAMED_REF "excel" |
| #define | CRF_OUTPUT_HTML_DATASET_TYPES "CrfOutputHtml" |
| #define | CRF_OUTPUT_HTML_NAMED_REF "HTML" |
| #define | CRF_OUTPUT_MSWORD_DATASET_TYPES "CrfOutputMSWord" |
| #define | CRF_OUTPUT_MSWORD_NAMED_REF "word" |
| #define | CRF_OUTPUT_PDF_DATASET_TYPES "CrfOutputPdf" |
| #define | CRF_OUTPUT_PDF_NAMED_REF "PDF" |
| #define | CRF_OUTPUT_TEXT_DATASET_TYPES "CrfOutputText" |
| #define | CRF_OUTPUT_TEXT_NAMED_REF "Text" |
| #define | CRF_OUTPUT_XML_DATASET_TYPES "CrfOutputXml" |
| #define | CRF_OUTPUT_XML_NAMED_REF "XML" |
| #define | CRF_PDF_EXTENSION ".pdf" |
| #define | CRF_PDF_STYLESHEET "CrfPdfStylesheet" |
| #define | CRF_REP_class_size_c 32 |
| #define | CRF_REP_desc_size_c 512 |
| #define | CRF_REP_folder_name_size_c 32 |
| #define | CRF_REP_id_size_c 32 |
| #define | CRF_REP_name_size_c 128 |
| #define | CRF_REP_source_size_c 32 |
| #define | CRF_SUM_REPORT_ID_PREFIX "TC_9_00_SUM_RPT_" |
| #define | CRF_TEXT_EXTENSION ".txt" |
| #define | CRF_TEXT_STYLESHEET "CrfTextStylesheet" |
| #define | CRF_XML_STYLESHEET "CrfXmlStylesheet" |
| #define | ITEM_REP_TYPE "ItemReport" |
| #define | NAME_PROP "object_name" |
| #define | OFFICE_LIVE "OfficeLive" |
| #define | REP_LOCALE_STR "report_locale" |
| #define | REP_LOCALE_VAL "en_US" |
| #define | REP_NAME_STRING "report_name" |
| #define | REV_RULE "REV_RULE" |
| #define | URL_GEN_SUMMARY_REP "URLGenSummaryReport" |
| #define | urlApplicationName "WEB_default_site_deployed_app_name" |
| #define | urlProtocolPref "WEB_protocol" |
| #define | urlServerPreference "WEB_default_site_server" |
| #define | XML_REPORT_FORMATTER "XMLReportFormatter" /*TODO delete me.*/ |
| #define | XSL_REF "XSL" |
Typedefs | |
| typedef enum CRF_qry_source_type_e | CRF_qry_source_type_t |
| typedef enum CRF_report_type_e | CRF_report_type_t |
Enumerations | |
| enum | CRF_qry_source_type_e { CRF_TC_QUERY, CRF_TRANSFER_MODE } |
| enum | CRF_report_type_e { CRF_REPORT_SUMMARY, CRF_REPORT_ITEM_REPORT, CRF_REPORT_CUSTOM_REPORT, CRF_ALL_REPORTS } |
Functions | |
| QRY_API int | CRF_copy_report_to_transient_vol (char *filepath, char **transientVolumeDir, char **copiedFileName) |
| QRY_API int | CRF_create_report_definition (const char *id, const char *name, const char *description, const char *rpt_class, int report_type, const char *folder_name, int state, const char *source, int no_of_params, const char **rd_parameters, const char **rd_values, tag_t query_source, tag_t property_source, int no_style_sheets, tag_t *style_sheets, tag_t *report_definition) |
| QRY_API int | CRF_generate_report (tag_t report_definition_tag, tag_t stylesheet_tag, int no_of_context_objs, tag_t *context_objects, int criteria_count, char **criteria_names, char **criteria_values, char *data_set_name, char **report_path_name) |
| QRY_API int | CRF_generate_report_1 (tag_t report_definition_tag, char *report_name, char *stylesheet_name, tag_t stylesheet_tag, int no_of_context_objs, tag_t *context_objects, int criteria_count, char **criteria_names, char **criteria_values, char *data_set_name, char *data_set_type, char *relation_name, tag_t context_object, char **report_path_name) |
| QRY_API int | CRF_generate_report_2 (tag_t report_definition_tag, char *report_name, char *stylesheet_name, tag_t stylesheet_tag, int no_of_context_objs, tag_t *context_objects, int criteria_count, char **criteria_names, char **criteria_values, char *data_set_name, char *data_set_type, char *relation_name, tag_t context_object, int report_options_count, char **report_options_names, char **report_options_values, char **report_path_name) |
| QRY_API int | CRF_generate_report_3 (char *report_definition_uid, char *object_uid, char *template_name, char *rev_rule_uid, logical isLive, char *report_type, char **file_path, char **xml_string) |
| QRY_API int | CRF_generate_report_id (const char *report_type_name, char **report_id) |
| QRY_API int | CRF_get_item_report_definitions_of_parentclass (tag_t parent_class_id, int *n_tags, tag_t **report_definition_tags) |
| QRY_API int | CRF_get_report_definitions (const char *reportId, const char *reportName, const char *category, const char *source, int status, int no_of_context_objs, tag_t *context_objects, int *n_tags, tag_t **report_definition_tags) |
| #define urlApplicationName "WEB_default_site_deployed_app_name" |
| #define XML_REPORT_FORMATTER "XMLReportFormatter" /*TODO delete me.*/ |
| typedef enum CRF_qry_source_type_e CRF_qry_source_type_t |
| typedef enum CRF_report_type_e CRF_report_type_t |
| enum CRF_report_type_e |
| QRY_API int CRF_copy_report_to_transient_vol | ( | char * | filepath, |
| char ** | transientVolumeDir, | ||
| char ** | copiedFileName | ||
| ) |
This function copies the file from the sorce directory to the transient volumes
| filepath | (I) |
| transientVolumeDir | (OF) |
| copiedFileName | (OF) |
| QRY_API int CRF_create_report_definition | ( | const char * | id, |
| const char * | name, | ||
| const char * | description, | ||
| const char * | rpt_class, | ||
| int | report_type, | ||
| const char * | folder_name, | ||
| int | state, | ||
| const char * | source, | ||
| int | no_of_params, | ||
| const char ** | rd_parameters, | ||
| const char ** | rd_values, | ||
| tag_t | query_source, | ||
| tag_t | property_source, | ||
| int | no_style_sheets, | ||
| tag_t * | style_sheets, | ||
| tag_t * | report_definition | ||
| ) |
This function creates a report definition in the database.
| id | (I) |
| name | (I) |
| description | (I) |
| rpt_class | (I) |
| report_type | (I) |
| folder_name | (I) |
| state | (I) |
| source | (I) |
| no_of_params | (I) |
| rd_parameters | (I) |
| rd_values | (I) |
| query_source | (I) |
| property_source | (I) |
| no_style_sheets | (I) |
| style_sheets | (I) |
| report_definition | (O) |
| QRY_API int CRF_generate_report | ( | tag_t | report_definition_tag, |
| tag_t | stylesheet_tag, | ||
| int | no_of_context_objs, | ||
| tag_t * | context_objects, | ||
| int | criteria_count, | ||
| char ** | criteria_names, | ||
| char ** | criteria_values, | ||
| char * | data_set_name, | ||
| char ** | report_path_name | ||
| ) |
This function generates a XML report file based on a report definition.
The parameters criteria_count/criteria_names/criteria_values were initially designed for Summary and Custom Reports. For Summary reports these will be the saved query criteria names and values.
For Item reports these will not be used. But there exists a special case: For PLMXML BOM reports user need to pass at least BOM_REPORT = TRUE
Other valid values that can be passed for these BOM Reports are: CriteriaNames = {"BOM_REPORT", "REV_RULE","ARIANT_RULE","PACKED_BOM"} CriteriaValues = {"TRUE","<REV RULE NAME>","<VARIANT RULE NAME>","<TRUE/FALSE>"} NOTE: Variant RULE is not being passed from the UI. This is added for offline execution of reports using a report template and import_export_reports utility.
For Custom Reports : It takes Process and Output related values. Also the other report parameters defined for it need to be passed. Looking at the UI dialog it gives a better picture of what Process and Output are and other parameters would be.
If user wants to store the generated report as a dataset he can pass in the data_set_name or else an empty string. If data_set_name is passed, a new dataset will be created under users New Stuff folder and the generated report will be copied to it.
report_path_name is the full path of the report file that is generated on the server. If TC_TMP_DIR is specified . The report gets generated in that path. Else it is generated in the "C:\\temp" folder for Windows and "/tmp" folder for UNIX The report file name is auto generated.
| report_definition_tag | (I) |
| stylesheet_tag | (I) |
| no_of_context_objs | (I) no of input context objects for item reports |
| context_objects | (I) item report input context objects tags |
| criteria_count | (I) |
| criteria_names | (I) For Item reports this will not be used. But there exists a special case: For PLMXML BOM reports user need to pass at least BOM_REPORT. Other valid values that can be passed for these BOM Reports are CriteriaNames = {"BOM_REPORT", "REV_RULE","VARIANT_RULE","PACKED_BOM"} |
| criteria_values | (I) For Item reports this will not be used. But there exists a special case: For PLMXML BOM reports user need to pass at least TRUE. Other valid values that can be passed for these BOM Reports are CriteriaValues = {"TRUE","<REV RULE NAME>","<VARIANT RULE NAME>","<TRUE/FALSE>"} |
| data_set_name | (I) If user wants to store the generated report as a dataset he can pass in the dataset name or else an empty string. |
| report_path_name | (OF) Report Path name is the full path of the report file that is generated on the server. |
| QRY_API int CRF_generate_report_1 | ( | tag_t | report_definition_tag, |
| char * | report_name, | ||
| char * | stylesheet_name, | ||
| tag_t | stylesheet_tag, | ||
| int | no_of_context_objs, | ||
| tag_t * | context_objects, | ||
| int | criteria_count, | ||
| char ** | criteria_names, | ||
| char ** | criteria_values, | ||
| char * | data_set_name, | ||
| char * | data_set_type, | ||
| char * | relation_name, | ||
| tag_t | context_object, | ||
| char ** | report_path_name | ||
| ) |
| report_definition_tag | (I) The tag for the report definition |
| report_name | (I) The name of the report |
| stylesheet_name | (I) The name of the stylesheet |
| stylesheet_tag | (I) The tag to the stylesheet |
| no_of_context_objs | (I) The no of input context objects for item reports |
| context_objects | (I) The context context objects tags |
| criteria_count | (I) The number of criterias |
| criteria_names | (I) The criteira names |
| criteria_values | (I) The criteria values |
| data_set_name | (I) The dataset name |
| data_set_type | (I) The dataset type |
| relation_name | (I) The relation name to be used if none refernce is used. |
| report_path_name | <(I) Context object in which the report is generated. (OF) The path to the report |
| QRY_API int CRF_generate_report_2 | ( | tag_t | report_definition_tag, |
| char * | report_name, | ||
| char * | stylesheet_name, | ||
| tag_t | stylesheet_tag, | ||
| int | no_of_context_objs, | ||
| tag_t * | context_objects, | ||
| int | criteria_count, | ||
| char ** | criteria_names, | ||
| char ** | criteria_values, | ||
| char * | data_set_name, | ||
| char * | data_set_type, | ||
| char * | relation_name, | ||
| tag_t | context_object, | ||
| int | report_options_count, | ||
| char ** | report_options_names, | ||
| char ** | report_options_values, | ||
| char ** | report_path_name | ||
| ) |
| report_definition_tag | (I) The tag for the report definition |
| report_name | (I) The name of the report |
| stylesheet_name | (I) The name of the stylesheet |
| stylesheet_tag | (I) The tag to the stylesheet |
| no_of_context_objs | (I) The no of input context objects for item reports |
| context_objects | (I) The context context objects tags |
| criteria_count | (I) The number of criterias |
| criteria_names | (I) The criteira names |
| criteria_values | (I) The criteria values |
| data_set_name | (I) The dataset name |
| data_set_type | (I) The dataset type |
| relation_name | (I) The relation name to be used if none refernce is used. |
| report_options_count | <(I) Context object in which the report is generated. (I) The number of report options |
| report_options_names | (I) The report options names |
| report_options_values | (I) The report options values |
| report_path_name | (OF) The path to the report |
| QRY_API int CRF_generate_report_3 | ( | char * | report_definition_uid, |
| char * | object_uid, | ||
| char * | template_name, | ||
| char * | rev_rule_uid, | ||
| logical | isLive, | ||
| char * | report_type, | ||
| char ** | file_path, | ||
| char ** | xml_string | ||
| ) |
This function generates the report when source is OfficeTemplate. This function is called by URL mechanism from a thin client. The parameters - report_definition_uid is the valid persistent uid of the reportdefinition. object_uid is the valid uid of the persistent object in Teamcenter, In case of BOMReport client passes the ItemRevision uid. template_name is the name of template which can be ExcelTemplate name or SpecTemplate name. rev_rule_uid is the uid of the selected revision rule by the client. This parameter is only used in case of BOMReport. isLive paraemter indicates if the generated report will be static report or Live report, Valid values are true/false report_type is the type of report. Valid values are ItemReport or BOMReport file_path is the generated report path. xml_string is the launch def xml file generated in case of Word Live reports. This launch def xml file is consumed by the Office App Launcher mechanism.
| report_definition_uid | (I) The uid for the report definition |
| object_uid | (I) The uid of the object |
| template_name | (I) The name of the template |
| rev_rule_uid | (I) The uid of the revision rule |
| isLive | (I) Is Live Sheet/document |
| report_type | (I) The type of report |
| file_path | (OF) The generated file path |
| xml_string | (OF) The launch def XML |
| QRY_API int CRF_generate_report_id | ( | const char * | report_type_name, |
| char ** | report_id | ||
| ) |
This function generates a new id for the report definition.
| report_type_name | (I) |
| report_id | (OF) |
| QRY_API int CRF_get_item_report_definitions_of_parentclass | ( | tag_t | parent_class_id, |
| int * | n_tags, | ||
| tag_t ** | report_definition_tags | ||
| ) |
| report_definition_tags | (O) The number of report definition returned (OF) n_tags The returned report definition tags |
| QRY_API int CRF_get_report_definitions | ( | const char * | reportId, |
| const char * | reportName, | ||
| const char * | category, | ||
| const char * | source, | ||
| int | status, | ||
| int | no_of_context_objs, | ||
| tag_t * | context_objects, | ||
| int * | n_tags, | ||
| tag_t ** | report_definition_tags | ||
| ) |
This function returns report definitions based on input criteria.
| reportId | (I) report definition Id |
| reportName | (I) report definition Name |
| category | (I) Item report or summary reports etc.. |
| source | (I) report definition defined by Team-center or others |
| status | (I) for future purpose only. to query based on RD state attr |
| no_of_context_objs | (I) no of input context objects for item reports |
| context_objects | (I) item report input context objects tags |
| n_tags | (O) The number of report definition returned |
| report_definition_tags | (OF) n_tags The returned report definition tags |