generalInvoiceRequest  -  the module for
generating XML and/or paper based general invoices
generalInvoiceRequest
    API DocBrowser   ·  Revision history
    Download area
    FAQ
 
home
system
integrators
search the
site
 

validator
modules
invoice
modules
credit
modules
miscellaneous
modules
tools

  Design by TMR AG
  © by sumex1.net
 
IGeneralInvoiceRequestManager::Print method

 Description  V4.30/26 Aug 2010 
The Print method validates the defined invoice/reminder data and prints the request on the local printer. The printer selection is done via the used report generator template file. If the template file was not connected to a printer with the PrintSetup method then the default printer with its default settings is used.

The bstrPrintTemplate variable obeys a special syntax and can optionally be used to set special print commands like using electronic webstamps, producing PDFs or changing print object dynamically.


As a migration help a transparent downgrade function is built in allowing to print either V4.3 documents or downgrade to V4.0, V4.1 documents, respectively. The decision process is implicit and based on a white list of insurances ready to process V4.3. If an insurance EAN is not in the list there is an automatic downgrade. The white list itself is maintained by Suva - cf. compatibility measures for the details.

To allow for even more flexibility there is a patch implemented that allows to override the white list behavior and to enforce a downgrade or upgrade - cf . argument plTimestamp or pbstrUsedSchema!

IMPORTANT LICENSE NOTE
The report engine used is Hexatech's ViewPro (www.hexatech.com). If you supply your own template files then you must have your own ViewPro license. By using this COM module you implicitly agree upon this restriction!

 C/C++ syntax
HRESULT  Print( BSTR   bstrPrintTemplate,
YesNoType   ePrintPreview,
YesNoType   eAddressRight,
YesNoType   eSortTimeTariff,
long   lEsrExcludeAttributes,
BSTR   bstrSenderID,
IAddress   *pIReceiverAddress,
long   *plTimestamp,
BSTR   *pbstrUsedSchema,
IGeneralInvoiceResult   **ppIGeneralInvoiceResult,
VARIANT_BOOL   *pbStatus);

 Parameter description
[in]   BSTR   bstrPrintTemplate   The bstrPrintTemplate is either empty or build as defined in "Syntax of the printTemplate variable".

If bstrPrintTemplate is empty then the default print template of the supplied data language (IGeneralInvoiceRequest::Initialize method) is used.

[in]   YesNoType   ePrintPreview   A Boolean that defines if print preview is used (enYes) or printing is done (enNo)
[in]   YesNoType   eAddressRight   A Boolean that defines on which side -left or right- the receiver address should be printed.

Note that currently only right-sided addressing is allowed. Therefore eAddressRight is internally always set to enYes.

[in]   YesNoType   eSortTimeTariff   A Boolean that defines how the services are sorted:
  • primary axis: ascending date, secondary axis ascending tariff number (enYes)
  • primary axis: ascending tariff number, secondary axis ascending date (enNo)
[in]   long   lEsrExcludeAttributes   This variable defines which principal parts of the ESR should not be printed. lEsrExcludeAttributes is a 32-bit integer where the possible excludes are values from the EsrExcludeAttributes data type and are ORed together to form the overall command.

This feature is necessary to exclude certain parts of the ESR data from printing due the pre-printed forms.

[in]   BSTR   bstrSenderID   Short sender address identification or empty.

If set then the sender identification is printed atop of the receiver address as an alternative to the sender address on the envelop.

[in]   IAddress   *pIReceiverAddress   An optional receiver address given via an IAddress interface.

This is used whenever the supplied insurance should be overridden as receiver by the supplied address. Note that the "inner" data is not affected or changed by this override.

[out]   long   *plTimestamp   The timestamp of the XML document as epoch time (seconds elapsed since 1.1.1970) that is used as timestamp of the topmost object reference from that point on.

If the timestamp for the topmost object reference was already set (e.g. to produce a copy) then this same timestamp is returned.

PATCH: by setting the plTimestamp variable as

  • lTimestamp = -323456780  -  enforce upgrade
  • lTimestamp = -223456780  -  enforce downgrade
the white list behavior is overridden and the downgrade or upgrade action is enforced.
[out]   BSTR   *pbstrUsedSchema   The full XSD name that was used to print the data.

Normally this would be generalInvoiceRequest_430.xsd. However, in the downgrade situation the XSD schema name is adjusted appropriately.

PATCH: by setting the pbstrUsedSchema variable as

  • bstrUsedSchema="forceUpgrade"  -  enforce upgrade
  • bstrUsedSchema=" forceDowngrade"  -  enforce downgrade
the white list behavior is overridden and the downgrade or upgrade action is enforced. Note, that this patch might not work for some languages (e.g. VB) but the plTimestamp approach should always work.
[out]   IGeneralInvoiceResult   **ppIGeneralInvoiceResult   The IGeneralInvoiceResult interface handle that allows to get all loaded data back.
The handle is NULL if an error occurred.
[out, retval]   VARIANT_BOOL   *pbStatus   Return status of the method. If pbStatus is VARIANT_FALSE then an error occurred and GetAbortInfo should be called to retrieve the error string.

 C/C++ return value
S_OK This value is returned if the function call was successful or if the return value of a boolean method signalling a true value. In this case the VARIANT_BOOL is set to VARIANT_TRUE.
S_FALSE This is the return value of a boolean method signalling a false return value. In this case the VARIANT_BOOL is set to VARIANT_FALSE.
E_name This value is returned if the function call was unsuccessful and an error exception was generated. Note that if you are using SmartPointers an exception is thrown under these conditions.
generalInvoiceRequest
  IGeneralInvoiceRequestManager
    Print