Windward Studios API Reference
Report Class Members
See Also  Fields  Properties  Methods  Send comments on this topic.
net.windward.api.csharp Namespace : Report Class

Glossary Item Box

The following tables list the members exposed by Report.

Public Fields

 NameDescription
Public Fieldstatic (Shared in Visual Basic)cache  
Public FieldLOCALE_DEFAULTSet the locale based on Windward Report's internal rules. This will set it to the template native format. You can use null instead of this constant.  
Public Fieldstatic (Shared in Visual Basic)LOCALE_SYSTEMSet the locale to the system's default locale. You can use Locale.getDefault() instead of this constant.  
Top

Public Properties

 NameDescription
Public PropertyBaseDirectoryThe base directory used for relative files in the import tag.  
Public PropertyCopyMetadataGet/set if the Windward metadata will be copied to the generated report. This can only occur if the template and generated report are both OpenXML files. The default is IF_NO_DATASOURCE.  
Public PropertyDataModeAs the report is run, the data for each tag can also be placed in an associated data.xml file. This xml will have a node for each tag and depending on the settings, the node will contain the tag attributes and/or the data extracted from the datasource for that tag. This data file can be returned to the caller and/or embedded in the generated report. The embed option is only for OpenXML and PDF reports.  
Public PropertyDataProcessorVersionReturns version of data processor being used by this report object.  
Public PropertyDataStreamThe stream to write the data.xml file to. As the report is run, the data for each tag can also be placed in an associated data.xml file. This xml will have a node for each tag and depending on the settings, the node will contain the tag attributes and/or the data extracted from the datasource for that tag. You may not set this if the DataMode includes DATA_MODE_EMBED. Setting this has no impact if DataMode == 0. You can only get the if DataMode != 0. If you did not set DataStream this will return a MemoryStream with the generated data.xml file in UTF-8. You should only call this after calling processComplete.  
Public PropertyDebugHandlerThe debug handler assigned to this report if debugging.  
Public PropertyDebugModeSet debug mode on or off. If debug mode is on, common user errors will be written to the report rather than throwing an exception.  
Public PropertyDescriptionThe description of the document. For Windward Scout reports only, this will be written to the run entry in the database.  
Public PropertyHyphenateGet/set if the generated report will be hyphenated (for PDF output only).  
Public PropertyImportInfoGet all imports in the processed template. This must be called after processData as that is what finds the imports. You must set TrackImports = true; before processing for this value to be populated.  
Public PropertyKeywordsThe keywords of the document. This are delimited by a ','. In html this will set the keywords meta-tag.  
Public PropertyLicenseSets the license key for windward to do for this report. If set this license takes priority of the license key from the configuration file or the static Report.ApplyLicenseKey() method.  
Public PropertyLocaleThis call set's the locale used in creating a report. If not set, the default is not the system locale - it is the locale of the report template. This affects; 1) The output report locale for html and rtf reports, 2) The charset used for txt reports, 3) The rules used for soft line breaks (this mostly affects Thai), and 4) the locale used for <wr:out>. The passed in value can be any locale or the values LOCALE_DEFAULT or LOCALE_SYSTEM. LOCALE_DEFAULT will use the locale in the report template. LOCALE_DEFAULT will use the system locale.  
Public PropertyModeProcessEmbeddedWhat to do processing embedded objects. Writing an embedded object to the generated report can only be done for the case of DOCX -> DOCX and XLSX -> XLSX(and in the future, PPTX -> PPTX). But for any other case, the screenshot of the object can be written(except TXT and CSV obviously). So these settings are valid for all combinations, but implemented in the context of object -> bitmap.  
Public PropertyNumPagesReturns how many pages long a report is. Can only be called after process completes. For html and text reports (which by definition are 1 page long) it will return the number of pages it would be if it was a paged report.  
Public PropertyOutputBuilderSet the output builder. Use this method instead of the properties file if you want to provide an object. This must be called after init.  
Public PropertyOutputBuilderDataData to pass to the output builder. For the embedded Windward builder this is either null or the Office Application object.  
Public PropertyParametersAdds a map that is used for ${variable} substitution. The key values cannot have any of the characters ${} in them. When ${key} is found in any tag, it is replaced with the matching value. The key and value are not evaluated in any way, it is just a text substitution. This replace occurs before any other evaluation of a tag so the value can have ${variable} values that will then be evaluated. This call sets the map so calling it a second time replaces the map passed in the first time. The map is copied so on return changes to the passed in map will not affect the data source. You can pass in either DateTime or DateTime objects on the set call. However, when you call get, they will all be DateTimeOffset objects (the engine converts att DaleTime objects to DateTimeOffset).  
Public PropertyPreservePodFramingTrue if UDT framing should be preserved for UDTs in the document. This is only valid for an OpenXML output format.  
Public PropertyPropertiesAs soon as the engine process is created, initialize properties with the engine's properties object.  
Public PropertyRemoveUnusedFormatsTrue if unused styles, fonts, etc. are not included in the generated report. Default is true.  
Public PropertyRenderExtentHow the generated report will be cropped. This is not supported by all report types. This is presently only supported by ProcessImage and ProcessTxt. Future support will be printer, PostScript, and page-based HTML.  
Public PropertyRenderPagesThe pages that will be generated. The string is in the form "0, 4, 6-11, 15" The numbers must be increasing with no overlap. This is not supported by all report types. Set to null for all pages. Pages are 0-based. This is presently only supported by ReportImage. Future support will be printer, PostScript, text, and page-based HTML.  
Public PropertyReportCharsetHtml and txt files are generated using a charset (the rest use unicode). Normally html files are generated using utf-8 (unicode) except for HTML_1 which uses the native charset. Txt files are normally generated using the native charset. The native charset is not the .NET native charset, it is the default charset set in the template document. This call allows you to force to charset the report is written in. The passed in value is the Windows codepage (Western Europe is 1252). This has nothing to do with reading in the template, it only affects the charset the output report is written in. The special enums CHARSET_* allow you to set this to values other than a specific charset.  
Public PropertyReportTypeGet the report format of the output stream.  
Public PropertySubjectThe subject of the document. In html this will set the description meta-tag.  
Public PropertyTagStyleThe style unprocessed tags are written out as.  
Public PropertyTemplateDrillDownInfoThis is not part of the public API. The base directory used for template files in the drill-down tag.  
Public PropertyTemplateVersionThe version of Windward/AutoTag this template was created for. The default is the latest major version number.  
Public PropertyTimeoutGet/set the number of seconds to timeout generating a report. If the report takes longer than this amount of time, it will throw a TimeoutException. A time of 0 means there is no timeout. The default is 0. The count starts when you call processSetup but will only throw the exception in processData and processComplete.  
Public PropertyTitleThe title of the document. In html this will set both the TITLE tag and the title meta-tag.  
Public PropertyTrackErrorsTurn on/off the error handling functionality. Call this method on an instance of Report class before calling its Process* methods. The error handling is off by default. Use values of ERROR_HANDLING enumeration.  
Public PropertyTrackImportsTrue if you want to call getImports after processing datasources. Default is false.  
Public PropertyUseExternalOutputBuilderReturns true if it will use the external output builder. The external output builder must be loaded and be capable of rendering from the template type to the output type, using all properties set in the ProcessReport object.  
Public Propertystatic (Shared in Visual Basic)VersionThe version of Windward Reports. Version numbers are generally in the form "MAJOR.MINOR.RELEASE" or "MAJOR.MINOR.RELEASE beta".  
Public Propertystatic (Shared in Visual Basic)VersionMajorThe major version number of Windward Reports. Version numbers are in the form MAJOR.MINOR.RELEASE.  
Public Propertystatic (Shared in Visual Basic)VersionMinorThe minor version number of Windward Reports. Version numbers are in the form MAJOR.MINOR.RELEASE.  
Public Propertystatic (Shared in Visual Basic)VersionReleaseThe release version number of Windward Reports. Version numbers are in the form MAJOR.MINOR.RELEASE.  
Top

Public Methods

 NameDescription
Public MethodAbortCall to abort the report processing. The report will throw a TimeoutException shortly after this is called.  
Public Methodstatic (Shared in Visual Basic)ApplyLicenseKeySet the license key to be used at runtime. Must be called before Report.Init() is called.  
Public MethodBatchNextGenerates the next document in the batch and returns the results of that document. Returns null if no more to run. Performs the equivilent of processData(), processComplete() for each generated report.  
Public MethodBatchSetupPrepares the object to run batch reports. Call processSetup() before calling this method. Do not call processData() or processComplete() after calling this method.After this setup batchNext() can be called repetitively for each batched report.  
Public MethodBuildSchemaCreate a UDT schema file for this template.  
Public Methodstatic (Shared in Visual Basic)CleanOverloaded. Clean the requested template.  
Public MethodCleanSelectsOverloaded. This is not part of the official API. This will convert selects to the parameter syntax.  
Public MethodCloseCall when you are done with this object, including done with the OutputStream returned by getReport if that stream was created by ProcessReport.  
Public MethodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.  
Public MethodDuplicateCreates and returns a copy of this object. You may call this before or after calling processData(). You may then call processData() on the created object. You must call this after calling processSetup() and before calling processComplete(). While this mostly does a deep copy, it does not do a deep copy of image data.  
Public Methodstatic (Shared in Visual Basic)FactoryCreate a report object based on the passed in extension. This calls Setup() on the created object.  
Public MethodFindPodsFinds Pods Located in this document. You need to call setup and then this method.  
Public MethodGetErrorInfoIf the error handling is on, call this to obtain information on issues that were encountered during a report generation. A correct time for calling this method is after all needed Process* methods are executed. Calling the method if the error handling is off or before any Process* methods has no effect and simply returns ErrorInfo with an empty list of issues.  
Public Methodstatic (Shared in Visual Basic)GetMetricsOverloaded. Returns information about all vars, datasources, and tags referenced in the template. If there is a <wr:set var='name' value='3'/> that will not be in this vars list.  
Public MethodGetReportReturn the final report. In the case of the ProcessReport(template) constructor, this is gauranteed to be of type MemoryStream. If an output stream was passed in on construction, this will return that stream. This can only be called after process() or processData(). For a ReportHtml with split pages enabled, the Pages property should be accessed instead.  
Public Methodstatic (Shared in Visual Basic)GetTagTreeCreate an XML file of the tags in the template.  
Public Methodstatic (Shared in Visual Basic)InitInitializes the reporting engine. It is not necessary to call this method as the reporting engine will do so if it was not called before generating any reports. It is useful to call this when initializing as this method will take several seconds and will write the starup lines to the console. It is safe to call this several times as it will just return after the first time it is called.  
Public MethodProcessCompleteProcess the final report and create the output. This must be called after processData and before getReport. This should only be called once for a given ProcessReport object! This method can only be called by objects create with Report(template) or Report(template, report).  
Public MethodProcessDataOverloaded. Process a set of data for the report. This method can be called multiple times - but only once for each datasource. This method can only be called by objects create with ProcessReport(template) or ProcessReport(template, report). Do not pass in buffered streams if you have the option. ProcessReport wraps all streams in buffers, generally BufferedReader and BufferedWriter.  
Public MethodProcessSetupOverloaded. Process the template and get the report ready to process data files. This should only be called once for a given Report object! This method can only be called by objects create with Report(template) or Report(template, report).  
Public Methodstatic (Shared in Visual Basic)ProcessTemplateGenerates a document from the passed in template. All parameters and datasources are read from the template and applied to the generation.  
Public Methodstatic (Shared in Visual Basic)ReportTypeToExtensionConvert a REPORT_TYPE to the extension for that file type. Does not include the . before the extension. For HTML it returns html and for a printer it returns printer. It returns xml for both WordML and SpreadML.  
Public Methodstatic (Shared in Visual Basic)ShutdownReleases all resources used by Windward Reports. You cannot call Windward Reports after calling this method.  
Top

See Also

Windward Studios - .NET Document Generation software