OFFICIUM INSERVIO
Your reliable partner for your business software...
Sage 100 Bericht Kopiedruck erkennen / Detect if copy is printed
(alle Versionen/all versions)
Mittwoch, 5. Januar 2022
Situation
In einem Korrespondenzbericht, der im Rahmen der Einkaufsbelegerfassung oder Verkaufsbelegerfassung gedruckt werden soll, möchte der Endkunde zusätzliche Felder im Bericht eingebaut haben, die ausschließlich angezeigt werden sollen, wenn eine Kopie gedruckt wird.
Man könnte meinen, dass der Parameter "rpKopieText" im Bericht darüber Auskunft gibt, ob es sich um eine Kopie handelt.
Aber dieser Parameter ist immer "True", also auch, wenn es keine Kopie ist.
In a correspondence report that is to be printed as part of purchasing document edit window or within sales document edit window, the end customer would like to have additional fields on the report that should only be displayed when a copy is printed.
One might think that the "rpKopieText" parameter in the report tells you whether it's a copy.
But this parameter is always "True", even if it is not a copy.
Options
Es gibt keine Möglichkeit innerhalb eines Berichtes abzufragen, ob es sich um eine Kopie handelt.
Der Bericht wird einmal gerendert, aber mehrfach "gedruckt", wobei der Sage Druckprozess bestimmt, bei welchem Druck der Kopientext ausgeblendet oder eingeblendet wird.
Maßgebend dafür ist der Parameter "$OutputCopyText", welcher vom Frontend (MS-Access Client) übergeben wird.
Dieser Parameter kann ausschließlich über eine .net-DCM abgefragt werden, die dann im Anschluss den Bericht verändern kann.
Man könnte in einer solchen .net-DCM natürlich den "alten" Weg über "rpKopieText" wieder aktivieren, müsste dann aber auch alle Berichte anpassen, die diesen auswerten und das Label für den Text "Kopie" schon deaktivieren, bevor der Bericht zum Client kommt.
There is no way to check within a report whether it is a copy.
The report is rendered once but "printed" multiple times, with the printing process (Sage Druckprozess) determining which print will hide or show the copy text.
The "$OutputCopyText" parameter, which is transferred from the front end (MS Access client), is decisive for this.
This parameter can only be accessed via a .net DCM, which can then change the report afterwards.
In such a .net-DCM, one could, of course, reactivate the "old" way via "rpKopieText", but then you would have to adapt all reports that evaluate this and deactivate the label for the "Copy" text before the report is printed.
