0% found this document useful (0 votes)
37 views

Function StoreReport

Uploaded by

Mohamed Mostafa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Function StoreReport

Uploaded by

Mohamed Mostafa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

3/25/23, 4:32 PM Function: StoreReport

Function: StoreReport
Function Prototype

Note

Parameter Description

Return Value

Error Handling

Example

Result

This section describes the StoreReport function. This function enables you to export the report
model files. The report model file is a data file specially used to store the contents of a report. You
can export, import, or modify a report model file. A generated report file cannot be modified.
Through iSStar, you can import a report model file and modify it. In this way, the existing report
files can be modified.
After a model file is imported, you can modify the objects such as sheet and table, and then save
the report by using Function: SaveReportAs. For details, see Figure 1.

Figure 1 Process of modifying a report

Function Prototype
StoreReport(modefile[, isRedirect])

Note
None

Parameter Description

Parameter Description

modefile Save path of the created report file. The value is a


string.

https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_storereport_m2000&locale=en-us 1/3
3/25/23, 4:32 PM Function: StoreReport

Parameter Description

isRedirect Whether redirection is required. The value is of the


Boolean type.
If it is set to True, the file path needs to be
redirected to the task output directory. If it is set to
False, the file path does not need to be redirected.
This parameter is optional. If it is not set, the default
value False is used.

Return Value
The return value is an integer. If the report model file is exported successfully, a positive integer is
returned. Otherwise, 0 is returned.

Error Handling
None

Example

NewReport()
page1 = AddSheet("Page1")
table1 = AddTable(page1, 6, 8, "Table1")
valueList = [str(i) for i in range(6 * 8)]
SetTableValue(table1, valueList)
SaveReportAs("oldfile.xls")
StoreReport("storefile.dat")

ret = LoadReport("storefile.dat")
RemoveRow("Page1", 0, 0)
SaveReportAs("newfile.xls")

Result

The newfile.xls file is created.

Examples of Report Operation Function

Copyright © Huawei Technologies Co., Ltd.

https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_storereport_m2000&locale=en-us 2/3
3/25/23, 4:32 PM Function: StoreReport

https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_storereport_m2000&locale=en-us 3/3

You might also like