OFFICIUM INSERVIO IT
Your reliable partner for your business software...
Search Results
Diese Website durchsuchen
320 Ergebnisse gefunden mit einer leeren Suche
- Sage100V908
Wichtiges / Important - Sage 100 Version 9.0.8.x <<< Sage 100 Version 9.0.8.x 6. Nov. 2024 Sage Wichtiges / Important - Sage 100 Version 9.0.8.x Siehe / see www.officium-inservio.com Sage100Version908 Sage100Version908 Siehe auch aktuelle Fehler und Breaking Changes: www.officium-inservio.com Sage100BreakingChanges
- VatIdChjeck1
9.0.x - Builds * <<< Sage 100 - 9.0 - USt-ID Prüfung nur mit neuster Programmversion / VAT-ID check only with latest program version 9.0.x - Builds * Umsatzsteuer-ID Prüfung / VAT ID check Deutsch Änderung der Umsatzsteuer-IdentNr-Prüfung in Sage 100 ab 1. November 2025 Ab dem 1. November 2025 nutzt Sage 100 zur Prüfung der Umsatzsteuer-Identifikationsnummer eine neue REST-API statt der bisherigen XML-RPC-Schnittstelle. Diese Änderung betrifft insbesondere deutsche Unternehmen und erfordert ein Update auf die Sage 100 Version 9.0. 10 .x. ⚠️Nur die kommende Sage 100 Version 9.0. 10 .x unterstützt die neue Schnittstelle. Ältere Versionen können ab dem Stichtag keine automatische USt-IdNr.-Prüfung mehr durchführen und verursachen Fehlermeldungen. Alternativ kann die USt-IdNr. manuell über das BZSt-Portal geprüft werden: https://www.bzst.de/DE/Unternehmen/Identifikationsnummern/Umsatzsteuer-Identifikationsnummer/eVatR/eVatR_node.html English Change to VAT ID Number Verification in Sage 100 from 1 November 2025 From 1 November 2025, Sage 100 will use a new REST API for verifying VAT identification numbers , replacing the previous XML-RPC interface. This change primarily affects companies in Germany and requires an update to Sage 100 version 9.0. 10 .x. ⚠️ Only the upcoming Sage 100 version 9.0. 10 .x supports the new interface. Older versions will no longer be able to perform automatic VAT ID verification after this date and may generate error messages. Alternatively, the VAT ID number can be verified manually via the BZSt portal: https://www.bzst.de/DE/Unternehmen/Identifikationsnummern/Umsatzsteuer-Identifikationsnummer/eVatR/eVatR_node.html <<< >>>
- ToolsSSDT
(alle Versionen/all versions) <<< Tool Visual Studio SSDT (alle Versionen/all versions) Samstag, 12. September 2020 Siehe/see https://www.officium-inservio.com/ms-net-1/toolsssdt <<< >>>
- SqlWithReaduncommitted
Die "ewige" Diskussion bez. SQL-Abfragen / A "never ending" discussion about SQL queries <<< Abfragen in Sage 100 mit WITH(Readuncommitted) / WITH(Nolock) - Fluch oder Segen? / Blessing or curse? 11. Mai 2024 Sage / MS-SQL Die "ewige" Diskussion bez. SQL-Abfragen / A "never ending" discussion about SQL queries Deutsch WITH(Readuncommitted) bzw. WITH(Nolock) Die einen verwenden es in möglichst jeder SQL-SELECT-Anweisung, die Daten liest und sehen es als "Segen" an - die anderen "verfluchen"diese Isolationsanweisungen! Wir haben in einer Übersicht in unserem MS-SQL-Blog zusammengetragen, was es dazu zu beachten gibt: www.officium-inservio.com WithReaduncommitted (alle Versionen/all versions)
- VSTeamExplorerMru
VSTeamExplorerMru <<< Visual Studio 2022 - Team Explorer - Projects Visual Studio 2022 Freitag, 21. März 2025 Deutsch Hintergrund Projektliste bearbeiten English Background Editing the Project List Deutsch Hintergrund Wer sich über den Visual Studio "Team Explorer" auf ein Quellcode-Repository verbindet (DevOps, GIT etc.) , der wird feststellen , dass die Liste der zuletzt benutzten Projekte in der Liste der Verbindungen im Laufe der Zeit immer länger und damit unübersichtlicher wird. Projektliste bearbeiten Visual Studio bietet leider keine Möglichkeit , über die UI/UX diese Liste "aufzuräumen". Man kann jedoch die zugrundeliegende Datei "TeamExplorer.config" manuell bearbeiten. Diese findet sich in folgendem Ordner , passend zur jeweiligen Visual Studio Version. %APPDATA%\Microsoft\VisualStudio\17.0_xxxxx\TeamExplorer\TeamExplorer.config Für den Benutzer "JDoe" und Visual Studio Version "17.0_09c5908e" wäre dies beispielsweise: c:\Users\JDoe\AppData\Roaming\Microsoft\VisualStudio\17.0_09c5908e\Team Explorer\TeamExplorer.config English Background Anyone who connects to a source code repository (DevOps, GIT, etc.) via the Visual Studio "Team Explorer" will notice that the list of recently used projects in the connections panel becomes increasingly long and cluttered over time. Editing the Project List Unfortunately, Visual Studio does not provide a way to "tidy up" this list through the UI/UX. However, you can manually edit the underlying file named "TeamExplorer.config" . This can be found in the following folder, depending on the respective Visual Studio version: %APPDATA%\Microsoft\VisualStudio\17.0_xxxxx\TeamExplorer\TeamExplorer.config For the user "JDoe" and Visual Studio version "17.0_09c5908e" , for example, this would be: c:\Users\JDoe\AppData\Roaming\Microsoft\VisualStudio\17.0_09c5908e\Team Explorer\TeamExplorer.config <<< >>>
- PathPlaceholders
PathPlaceholders <<< Pfad Platzhalter / Path placeholders (alle Versionen/all versions) Montag, 17. April 2023 Auflistung Platzhalter / List of placeholders Beispiel / Example Sage Quellcode / Sage source Auflistung Platzhalter / List of placeholders Beispiel / Example Die Platzhalter enthalten seitens Sage einen Backslash am Ende. Um eine Datei in den Unterordner "Test" im \Shared-Ordner des Sage ERP-Systems auszurollen, ist wie folgt vorzugehen. $[SharedPath]Test\Test.exe Sage Quellcode / Sage source Sagede.OfficeLine.Shared.Placeholders.FilePathPlaceholderResolver <<< >>>
- OpenFileDialog
OpenFileDialog <<< Datei-Speichern Dialog aus Makros benutzen / File-Save dialogue from macros 9.0.x Dienstag, 23. Juni 2026 Deutsch Hintergrund Datenherkunft Kontextmenü Makro-Code Integration in das Oberflächen-Element Deutsch Hintergrund Sehr häufig muss man dem Anwender die Möglichkeit geben , eine Ziel-Datei für eine Datei-Aktion in einem Dialog zu verwenden , z.B. in einem Selektionselement. Dies ist recht leicht über entsprechende Makro-Befehle und einen Kontextmenü-Eintrag für eine Datei-Speichern-Funktion umsetzbar. Beispielansicht: Vorgabe eines Export-Dateinamens - in dem Fall eine anzulegende MS-Excel-Exportdatei. Datenherkunft Üblicherweise hat man eine Datenstruktur oder ein sonstiges Daten-Element , in dem die Definition des Dateinamens zu erfolgen hat. Kontextmenü Entscheidend ist das Kontextmenü. In diesem definiert man alle Details zur eigentlichen Datei-Auswahl , was auf den ersten Blick merkwürdig erscheint , aber klarer wird , sobald man sieht , dass man den Kontextmenü-Eintrag dem Daten-Element zuordnen kann (siehe nachfolgend weiter unten). Im Kontextmenü definiert man als nächstes einen klassischen Makro-Aufruf: Makro-Code Der Makro-Code ist überschaubar. Es wird " OpenFileDialog " bzw. " DateidialogÖffnen " verwendet - entscheidend ist der Modus " DateiSpeichern " als Parameter 1. Der Rest ist relativ selbsterklärend. Integration in das Oberflächen-Element Der letzte Schritt ist konsequenterweise der Einbau des Datenfeldes in das jeweilige Oberflächen-Element , im vorliegenden Fall ein Selektionselement. Genau an dieser Stelle schließt sich der Kreis. Dem Oberflächen-Element ist natürlich o.g. Kontextmenü zuzuordnen. Im Datenfeld im Oberflächen-Element definiert man nach Bedarf ein Symbol/ein Icon (siehe Icons, die Sage ausrollt) und - ganz wichtig - man muss dem Datenfeld im Oberflächen-Element natürlich den konkreten Menüeintrag aus dem Kontextmenü zuweisen. Das ist schon alles an dieser Stelle - den Rest erledigt der AppDesigener komplett automatisch , wie es sein soll 👍🏻. Die Ansicht zeigt die entscheidende Verbindung zwischen dem Datenfeld im Oberflächen-Element und dem Kontextmenü! <<< >>>
- ErrorMacroCollectionKey
ErrorMacroCollectionKey <<< 9.0.x - Makrofehler Collection Key bei Variablen-Übergaben / macro error collection key if passing variables (alle Versionen/all versions) Freitag, 13. März 2026 Deutsch Situation/Fehler Es wird in einem AppDesigner-Makro eine Variablen-Liste definiert und an Folge-Prozesse übergeben , z.B. an eine Client-DLL. Beim Ausführen des Makros erhält man im Sage TraceLog einen äußerst kryptischen Fehler. Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroException: Fehler beim Ausführen des Makros 'x.OnExecute' in Zeile 21, Makrobefehl 'AufrufenDllClient | Tests.Sage.OL.x.RealTimeData.dll | Tests.Sage.OL.x.RealTimeData.ClientCode.y | [_Mode];[_UserId];[_Geschaeftsjahr];[_ImportType];[_SourceFolder];[_SourceFileEncodingType];[_ReturnLocalTempFileNameForBlobStorageUpload];[_ReturnText];[_ReturnMustCancel] '. ---> System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add ) at Sagede.OfficeLine.ControlCenter.Host.ControlCenterHostBase.NamedParametersToTransferParameters(NamedParameters parameters, Dictionary2& transferParameters) at Sagede.OfficeLine.ControlCenter.Host.ControlCenterHostBase.CallClientDLL(String libraryFile, String className, NamedParameters parameters, NamedParameters result) at Sagede.Shared.ControlCenter.Controller.PartControls.PartViewModelBase.ExecuteMacroFunction(CallDllOnClientParameters parameters) at Sagede.Shared.ControlCenter.Controller.PartControls.PartViewModelBase.OnMacroCallbackFromField(MacroCallbackArgs args, String activeMacroFieldname) at Sagede.Shared.ControlCenter.Controller.PartControls.Selection.View.SelectionPartViewModel.OnMacroCallbackFromField(MacroCallbackArgs args, String activeMacroFieldname) at Sagede.Shared.ControlCenter.Controller.Shared.DialogDataFields.OnMacroCallback(MacroCallbackArgs args) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.Commands.CallDllOnClientMacroCommand.Execute(IMacroCommandsParent parent, IndexedList parameters, IndexedList debugParameters) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.Commands.MacroCommands.ExecuteMacroCommand(IMacroCommandsParent parent, Macro macro, Macro debugInfo, Boolean& handled, Boolean isRunningOnServer) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroInterpreter.ExecuteMacroCommand(Macro macro, Macro debugInfo) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroInterpreter.Run(Macro macro, Int32 lineNumber) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroInterpreter.RunMacros(Macros macros) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroHandler.InterpreterExecuteMacros(Macros macros, Boolean& cancel, Boolean& closeDialog) at Sagede.Shared.RealTimeData.Common.MacroInterpreter.MacroHandler.ExecuteMacros(MacroContext macroContext, Macros macros, Boolean resetInterpreter, Boolean& cancel, Boolean& closeDialog) Ursache/Lösung Schaut man sich die Parameter-Liste an , so fällt sofort auf , dass es gar keinen doppelten Schlüssel gibt. Die Meldung von Sage ist komplett irreführend (wie so oft!). Die tatsächliche Ursache ist der leider sehr schlechte Makro-Parser von Sage , in Kombination mit dem internen Definieren und Serialisieren der Collections mit den Parametern , insbesondere bei Boolean-Werten. Sage hat ein massives Problem mit Boolean-Zuordnungen wie "SetVariable ..." / "VariableFestlegen ..." , wenn der Wert z.B. mit "False" vorbelegt wird. Der einfachste Workaround ist , statt eine Variable mit "False" zu definieren , einfach einen Integerwert 0 vorzubelegen. Beispielansicht: Wurde "False" anstatt 0 eingetragen , um Sage zum generischen Typ "Boolean" zu bewegen , erscheint eine "abstruse" Key-Verletzungsmeldung. Die Vorbelegung als Integer Typ lässt die Meldung sofort verschwinden! <<< >>>
- SageLicenceServerTestConnection
SageLicenceServerTestConnection <<< Sage 100 Verbindung zum Lizenzserver prüfen / check connection to Sage 100 license server (alle Versionen/all versions) Dienstag, 13. Januar 2026 Deutsch Hintergrund Damit die Sage 100-Anwendung ohne Probleme die Lizenz prüfen kann , muss der Sage 100 Lizenzserver von Sage erreichbar sein. Um auf einer Maschine zu testen , ob die Netzwerk-Internet-Verbindung zum Sage Lizenzserver erfolgreich möglich ist , kann nachfolgende PowerShelll-Anweisung benutzt werden. PowerShell-Script für Test der Verbindung Öffnen Sie die PowerShell und führen Sie folgende Anweisung aus. test-netconnection licensing2.services.sage.com -Port 443 Beispielansicht PowerShell-Script Was dieser Befehl macht: Dieser Befehl verwendet das Cmdlet "Test-NetConnection" , um eine Netzwerk-Diagnose durchzuführen. Im Einzelnen: "licensing2.services.sage.com": Dies ist der Ziel-Hostname. Er verweist auf den externen Server , den Sage zur Validierung von Softwarelizenzen verwendet. "Port 443": Gibt an, dass der Test versucht, eine Verbindung über den TCP-Port 443 herzustellen. Dies ist der Standardport für sicheren Web-Datenverkehr (HTTPS). Zusammengefasst: Der Befehl prüft, ob ein Computer den Sage-Lizenzserver erfolgreich über das Internet erreichen kann. Ergebnis im o.g. Screenshot: Die Zeile "TcpTestSucceeded : True" zeigt an, dass die Verbindung erfolgreich war. Die Firewall oder das Netzwerk blockiert die Verbindung zum Sage-Lizenzserver nicht . <<< >>>
- ProcedureGetHtmlTable
(alle Versionen/all versions) <<< Prozedur: Datentabelle als Html / Procedure: Datatable as Html (alle Versionen/all versions) Freitag, 30. Dezember 2022 Beschreibung/Description Beispielverwendung/Example how to use Ergebnis/Result Abhängigkeiten/Requirements Wichtig/Important T-SQL Definition Beschreibung/Description Ein möglicher Ansatz, um Daten als Html-Tabelle zu erhalten. A possible approach to get data as Html table . Beispielverwendung/Example how to use DECLARE @lRC int DECLARE @sSqlSelect nvarchar(max) DECLARE @lOptionalTopRecord int DECLARE @sTableHtmlId nvarchar(255) DECLARE @sTableHeaderCaptions nvarchar(max) DECLARE @bTableHeaderCaptionsContainHtml bit DECLARE @nStyle smallint DECLARE @bTableDataContainsHtml bit DECLARE @bTableAllowSort bit DECLARE @sReturnHtml nvarchar(max) -- Avoid complex Sql! Use a view instead! SET @sSqlSelect = N'SELECT Artikelnummer, Matchcode FROM dbo.KHKArtikel WITH(Readuncommitted) WHERE Mandant=123 ORDER BY Artikelnummer' -- It is recommended to limit the output, like in paging! -- Otherwise the stored procedure might run a long time, depending on the amount of data. SET @lOptionalTopRecord = 50 -- If the Html table is being referred to in any other Html code, the table should be given a proper name! -- Otherwise, use a dummy name. SET @sTableHtmlId = N'MyTable1' -- You must set the header captions! SET @sTableHeaderCaptions = N'Item number;Item caption' SET @bTableHeaderCaptionsContainHtml = 1 SET @nStyle = 1 SET @bTableDataContainsHtml = 0 -- Allowing to sort the result might not work in all browsers! SET @bTableAllowSort = 1 EXECUTE @lRC = [dbo].[spSAGGetHtmlTable] @sSqlSelect ,@lOptionalTopRecord ,@sTableHtmlId ,@sTableHeaderCaptions ,@bTableHeaderCaptionsContainHtml ,@nStyle ,@bTableDataContainsHtml ,@bTableAllowSort ,@sReturnHtml OUTPUT SELECT @sReturnHtml GO Ergebnis/Result Abhängigkeiten/Requirements https://www.officium-inservio.com/ms-sql/functionremoveleftorright https://www.officium-inservio.com/ms-sql/functiontablesplitstring Wichtig/Important Der in dieser Datenbankprozedur verwendete Ansatz ist bewusst sehr einfach gehalten und ausdrücklich für kleine Datenmengen konzipiert. Mit dem primären Ziel, den Quellcode einfach und lesbar zu halten, um bei Bedarf auch bei einzelnen Ausgabezeilen in die Datenausgabe eingreifen zu können. Es steht völlig außer Frage, dass es mit SQL (insbesondere mit dem Microsoft SQL-Server) weitaus performantere Wege gibt, um sehr umfangreiche Datenmengen in Html umzuwandeln! Um den Quellcode lesbar zu halten, wird für einige Parsingvorgänge ein etwas "hässlicher" Workaround verwendet. Es gibt höchstwahrscheinlich bessere Möglichkeiten, die Daten zu analysieren, aber die aktuelle Version erfüllt die Aufgabe gut, eine schnelle Datentabelle für eine begrenzte Anzahl von Datensätzen zu erhalten. Sie sollten sich darüber im Klaren sein, dass der Ansatz dieser Datenbankprozedur nur eine sehr begrenzte Prüfung zur Vermeidung jeglicher SQL-Injection enthält! Bitte stellen Sie sicher, dass die Eingabe-SQL gültig und in keiner Weise "schädlich" ist. Es wird dringend empfohlen, die Quelldaten in einer SQL-Sicht zu kapseln und diese Datenbankprozedur nur mit einer sehr einfachen SQL-Select-Anweisung aufzurufen! The approach used in this stored procedure is deliberately kept very simple and designed specifically for small amounts of data . The primary goal is to keep the source code simple and readable in order to be able to intervene in the data output, even with each individual output line if necessary . There is absolutely no question that with SQL (especially with the Microsoft SQL Server), there are far better-performing ways to convert very large amounts of data into Html! To keep the source code readable, for some parsing, a somewhat "ugly" workaround is being used. There are most likely better ways to parse the data, but the current version serves the purpose well of getting a quick data table for a limited amount of data records. You should be aware that this procedure only contains a very limited approach to avoid any SQL injection! Please, make sure that the input SQL is valid and not "harmful" in any way. It is highly recommended to encapsulate the source data into an SQL view and just call this stored procedure with a very simple SQL select statement only! T-SQL Definition File_MSSQL_gtblSAG_Get_Text_Split_gsSAG_Remove_LeftOrRight_gsSAG_Remove_LeftOrRight .zip ZIP herunterladen • 8KB IF EXISTS ( SELECT TOP 1 [Name] FROM dbo.sysobjects WITH(Readuncommitted) WHERE id = OBJECT_ID(N'[dbo].[spSAGGetHtmlTable]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1 ) BEGIN DROP PROCEDURE [dbo].[spSAGGetHtmlTable] END GO CREATE PROCEDURE [dbo].[spSAGGetHtmlTable] ( @sSqlSelect nvarchar(max) ,@lOptionalTopRecord int ,@sTableHtmlId nvarchar(255) ,@sTableHeaderCaptions nvarchar(max) ,@bTableHeaderCaptionsContainHtml bit ,@nStyle smallint ,@bTableDataContainsHtml bit ,@bTableAllowSort bit ,@sReturnHtml nvarchar(max) OUT ) AS -- Purpose: -- Get a simple Html table! -- The column data will be transformed into simple strings. -- Any complex Sql statements should be put into a Sql view! -- Which gives you more control also how to transfer the data columns into strings. -- Like currency or date value formatting. -- Returns 0 if success; otherwise an error code might be returned. -- Requirements/dependencies: -- This procedure needs other functions, and/or procedures: -- "gtblSAG_Get_Text_Split" -- "gsSAG_Remove_LeftOrRight" -- Parameters: -- @sSqlSelect = -- Mandatory: Simple SQL select statement. No(!) complex joins, no "update", "alter" SQL statements or the like. -- Also no "TOP" instruction (see the separate parameter of this procedure). -- Tip: Encapsulate more complex queries in an SQL view and then pass the view in a simple SQL select statement! -- -- @lOptionalTopRecord = -- Recommended: Record count for a "TOP" selection. -- If specified (>0), then this maximum number of data records is selected. -- -- @sTableHtmlId = -- Recommended: Content for ID tag of table/name of table for returned html. -- -- @sTableHeaderCaptions = -- Mandatory: Column header captions. Use semicolon to separate the columns. -- -- @bTableHeaderCaptionsContainHtml = -- Mandatory: Specify if the parameter for the column header captions contain Html instructions. -- Caution: If activated, the caller is responsible for ensuring that the column header captions are valid HTML statements! -- -- @nStyle = -- Mandatory: Select the CCS formatting style. -- Currently, this procedure supports six types (1-6). -- -- @bTableDataContainsHtml = -- Mandatory: Specify if the parameter for the column data contain Html instructions. -- Caution: If activated, the caller is responsible for ensuring that the column data content is valid HTML! -- -- @bTableAllowSort = -- Mandatory: Specify whether the table should be designed as sortable using JavaScript (not supported by all browsers!). -- Any JavaScript is "manageable", i.e. "uncritical" for most browsers and is usually not(!) blocked. -- Under certain circumstances, however, such scripts are ignored/blocked, e.g. in HTML-formatted e-mail content by certain e-mail programs! -- Common HTML scripting standards are adhered to. -- -- @sReturnHtml = -- Mandatory: Ouput of the fully generated HTML for the table, including the data. -- Any JavaScript is "manageable", i.e. "uncritical" for most browsers and is usually not(!) blocked. -- Under certain circumstances, however, such scripts are ignored/blocked, e.g. in HTML-formatted e-mail content by certain e-mail programs! -- Common HTML scripting standards are adhered to. -- To keep the source code readable, for some parsing, a somewhat "ugly" workaround is being used. -- There are most likely better ways to parse the data, but the current version serves the purpose well of getting a quick data table for a limited(!) amount of data records. -- You should be aware that this procedure only contains a very limited approach to avoid any SQL injection! -- Please, make sure that the input SQL is valid and not "harmful" in any way. -- Again, it is highly recommended to encapsulate the source data into an SQL view and just call this stored procedure with a very simple SQL select statement only! SET NOCOUNT ON DECLARE @sProcedure NVARCHAR(255) SET @sProcedure = 'spSAGGetHtmlTable' SET @sReturnHtml = N'SAG: 202111171: ' + @sProcedure + N': No valid data!' SET @bTableHeaderCaptionsContainHtml = ISNULL(@bTableHeaderCaptionsContainHtml, 0) SET @lOptionalTopRecord = ISNULL(@lOptionalTopRecord, 0) SET @nStyle = ISNULL(@nStyle, 0) IF @nStyle = 0 SET @nStyle =1 SET @bTableDataContainsHtml = ISNULL(@bTableDataContainsHtml, 0) SET @bTableAllowSort = ISNULL(@bTableAllowSort, 0) SET @sTableHtmlId = LTRIM(RTRIM(ISNULL(@sTableHtmlId, N''))) IF @sTableHtmlId = N'' BEGIN SET @sTableHtmlId = REPLACE(CAST(NEWID() AS nvarchar(255)), N'-', N'') END SET @sTableHtmlId = ( SELECT TOP 1 @sTableHtmlId FOR XML PATH('') ) SET @sSqlSelect = LTRIM(RTRIM(ISNULL(@sSqlSelect, N''))) -- Check table header columns DECLARE @sErrorTableHeaderCaptions NVARCHAR(MAX) SET @sErrorTableHeaderCaptions = N'No table header captions provided! You must provide a semicolon separated list of table header captions! ' + N'The amount of header captions must match the selected field column count!' SET @sTableHeaderCaptions = LTRIM(RTRIM(ISNULL(@sTableHeaderCaptions, N''))) IF @sTableHeaderCaptions = N'' BEGIN SET @sReturnHtml = N'SAG: 202111174: ' + @sProcedure + N': ' + @sErrorTableHeaderCaptions RETURN 1 END -- Check Sql statement IF @sSqlSelect = N'' BEGIN SET @sReturnHtml = N'SAG: 202111176: ' + @sProcedure + N': No Sql select clause provided!' RETURN 3 END DECLARE @sErrorSqlSelectStatement NVARCHAR(MAX) SET @sErrorSqlSelectStatement = N'Invalid or too complex Sql select clause provided. Premises: Sql must be a most simple Sql select statement.' + N'It must contain one "Select" and "Where" clause.' + N'It must not contain a TOP clause!' + N'It must not contain * for column selection! I.e. provide all column names separately!' + N'No semicolon allowed!' + N'No altering Sql keywords allowed!' + N'Hint: consider putting complex Sql into an Sql view and provide this method with the name of the Sql view with a very simple Sql-Clause instead.' + N'Also, consider converting all data columns of your view into string values. By doing so, you can control yourself how currency or data values are to be formatted.' + N'Be aware to set the parameters for the table generation properly, regarding whether the actual data content contains valid Html code or not!' + N'' IF CHARINDEX(N';', @sSqlSelect) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'DROP ')) = N'DROP ' OR CHARINDEX(N' DROP ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'DELETE ')) = N'DELETE ' OR CHARINDEX(N' DELETE ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'INSERT ')) = N'INSERT ' OR CHARINDEX(N' INSERT ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'UPDATE ')) = N'UPDATE ' OR CHARINDEX(N' UPDATE ', UPPER(@sSqlSelect)) > 0 OR LEFT(UPPER(@sSqlSelect), LEN(N'ALTER ')) = N'ALTER ' OR CHARINDEX(N' ALTER ', UPPER(@sSqlSelect)) > 0 OR CHARINDEX(N' TOP ', UPPER(@sSqlSelect)) > 0 -- Must contain Select and Where OR CHARINDEX(N' SELECT ', UPPER(N' ' + @sSqlSelect)) = 0 OR CHARINDEX(N' WHERE ', UPPER(N' ' + @sSqlSelect)) = 0 BEGIN SET @sReturnHtml = N'SAG: 202111177: ' + @sProcedure + N': ' + @sErrorSqlSelectStatement RETURN 4 END DECLARE @sSqlOnlyFromClause NVARCHAR(MAX) DECLARE @sSqlOnlyFields NVARCHAR(MAX) SET @sSqlOnlyFromClause = [dbo].[gsSAG_Remove_LeftOrRight] ( @sSqlSelect , N'SELECT' , 1 , 0 ) SET @sSqlOnlyFields = SUBSTRING( @sSqlOnlyFromClause , 1 , CHARINDEX( N'FROM ', @sSqlOnlyFromClause ) - 1 ) SET @sSqlOnlyFromClause = SUBSTRING( @sSqlOnlyFromClause , CHARINDEX( N'FROM ', @sSqlOnlyFromClause ) , LEN(@sSqlOnlyFromClause) ) IF CHARINDEX(N'*', @sSqlOnlyFields) > 0 BEGIN SET @sReturnHtml = N'SAG: 202111178: ' + @sProcedure + N': ' + @sErrorSqlSelectStatement RETURN 5 END DECLARE @sHtmlCss nvarchar(max) DECLARE @sHtmlClassId1 nvarchar(20) DECLARE @sHtmlTableOuter nvarchar(max) DECLARE @sHtmlTableHeaders nvarchar(max) DECLARE @sHtmlTableHeaderCaptionTemplate nvarchar(255) DECLARE @sHtmlTableRows nvarchar(max) DECLARE @sHtmlTableRowTemplate nvarchar(MAX) DECLARE @sHtmlTableRowColTemplate1 nvarchar(MAX) DECLARE @sHtmlTableRowColTemplate2 nvarchar(MAX) DECLARE @sHtmlSortScript nvarchar(max) SET @sHtmlSortScript = N'' SET @sHtmlTableRowColTemplate1 = N'' SET @sHtmlTableRowColTemplate2 = N'' -- Usw free www tools for CSS , example: https://www.tablesgenerator.com/html_tables# IF @nStyle < 0 OR @nStyle > 6 BEGIN SET @nStyle = 1 END SET @sHtmlClassId1 = N'tg-0lax' IF @nStyle = 1 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 2 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 3 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 4 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 5 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @nStyle = 6 BEGIN SET @sHtmlCss = N'' SET @sHtmlTableRowColTemplate1 = N'||$ColInnerFieldContent$||' SET @sHtmlTableRowColTemplate2 = N'||$ColInnerFieldContent$||' END IF @bTableAllowSort <> 0 BEGIN SET @sHtmlSortScript = N'' END SET @sHtmlTableHeaderCaptionTemplate = N'||$ColName$||' + NCHAR(13) + NCHAR(10) SET @sHtmlTableRowTemplate = N' ||$TblRowAllColumnsContent$|| ' SET @sHtmlTableOuter = @sHtmlCss + NCHAR(13) + NCHAR(10) + N' ||$TblHeaderCol$|| ||$TblRows$|| ' -- Determine table captions DECLARE @lColCountHeaders INT SET @lColCountHeaders = 0 SET @sHtmlTableHeaders = N'' DECLARE @sCaption nvarchar(max) IF CHARINDEX(N';', @sTableHeaderCaptions) = 0 BEGIN SET @sTableHeaderCaptions = ISNULL(@sTableHeaderCaptions, N'') + N';' END DECLARE cSAGHtmlHelpersGetHtmlTableDataCaptions CURSOR FOR SELECT [TextPart] FROM [dbo].[gtblSAG_Get_Text_Split] ( @sTableHeaderCaptions , N';' ) WHERE LTRIM(RTRIM(ISNULL([TextPart], N''))) <> N'' ORDER BY [Nr] OPEN cSAGHtmlHelpersGetHtmlTableDataCaptions IF @@Cursor_Rows <> 0 BEGIN FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataCaptions INTO @sCaption WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @lColCountHeaders = @lColCountHeaders + 1 IF @bTableHeaderCaptionsContainHtml = 0 BEGIN SET @sCaption = ( SELECT TOP 1 ISNULL(@sCaption, N'(undefined)') FOR XML PATH('') ) END SET @sHtmlTableHeaders = @sHtmlTableHeaders + REPLACE(@sHtmlTableHeaderCaptionTemplate, N'||$ColName$||', @sCaption) FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataCaptions INTO @sCaption END CLOSE cSAGHtmlHelpersGetHtmlTableDataCaptions END DEALLOCATE cSAGHtmlHelpersGetHtmlTableDataCaptions IF @lColCountHeaders = 0 BEGIN SET @sReturnHtml = N'SAG: 202111175: ' + @sProcedure + N': ' + @sErrorTableHeaderCaptions RETURN 2 END -- Table definition SET @sHtmlTableOuter = REPLACE(@sHtmlTableOuter, N'||$TblHeaderCol$||', @sHtmlTableHeaders) IF LTRIM(RTRIM(ISNULL(@sHtmlSortScript, N''))) <> N'' BEGIN SET @sHtmlTableOuter = @sHtmlTableOuter + NCHAR(13) + NCHAR(10) + @sHtmlSortScript END SET @sReturnHtml = @sHtmlTableOuter -- Build own Sql column clause DECLARE @lColCount INT DECLARE @sColSep NVARCHAR(10) DECLARE @sColSepBugFixReplacement NVARCHAR(10) DECLARE @sColAll NVARCHAR(MAX) SET @lColCount = 0 SET @sColSep = N'||_||||_||' -- Note, the method 'gtblSAG_Get_Text_Split' got a bug in some versions, where parts of the replacement will be added as content: SET @sColSepBugFixReplacement = N'|_||||_||' SET @sColAll = N'' IF CHARINDEX(N',', @sSqlOnlyFields) = 0 BEGIN SET @sSqlOnlyFields = ISNULL(@sSqlOnlyFields, N'') + N',' END DECLARE cSAGHtmlHelpersGetHtmlTableDataColumns CURSOR FOR SELECT [TextPart] FROM [dbo].[gtblSAG_Get_Text_Split] ( @sSqlOnlyFields , N',' ) WHERE LTRIM(RTRIM(ISNULL([TextPart], N''))) <> N'' ORDER BY [Nr] OPEN cSAGHtmlHelpersGetHtmlTableDataColumns IF @@Cursor_Rows <> 0 BEGIN DECLARE @sCol AS NVARCHAR(1025) DECLARE @lIdx INT FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataColumns INTO @sCol SET @lIdx = 0 WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @lColCount = @lColCount + 1 SET @lIdx = @lIdx + 1 SET @sCol = REPLACE(REPLACE(LTRIM(RTRIM(ISNULL(@sCol, N''))), N'[', N''), N']', N'') IF @sCol <> N'' BEGIN IF @lIdx > 1 BEGIN SET @sColAll = ISNULL(@sColAll, N'') + N' + ' + NCHAR(39) + @sColSep + NCHAR(39) + N' + ' END SET @sColAll = ISNULL(@sColAll, N'') + N'CAST(ISNULL([' + @sCol + N'], N' + NCHAR(39) + NCHAR(39) + N') AS NVARCHAR(MAX))' END FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataColumns INTO @sCol END CLOSE cSAGHtmlHelpersGetHtmlTableDataColumns END DEALLOCATE cSAGHtmlHelpersGetHtmlTableDataColumns IF @lColCount <> @lColCountHeaders BEGIN SET @sReturnHtml = N'SAG: 2021111719: ' + @sProcedure + N': Column count missmatch! ' + N'Provided header columns: ' + CAST(@lColCountHeaders AS nvarchar(50)) + N'. ' + N'Provided data columns: ' + CAST(@lColCount AS nvarchar(50)) + N'. ' RETURN 6 END IF LTRIM(RTRIM(ISNULL(@sColAll, N''))) <> N'' BEGIN SET @sColAll = @sColAll + N' AS [DataBigCol] ' SET @sSqlSelect = N'SELECT ' IF @lOptionalTopRecord > 0 BEGIN SET @sSqlSelect = @sSqlSelect + N' TOP ' + CAST(@lOptionalTopRecord AS NVARCHAR(50)) + N' ' END SET @sSqlSelect = @sSqlSelect + @sColAll + N' ' + @sSqlOnlyFromClause -- PRINT @sSqlSelect -- Get the actual data DECLARE @lRC INT DECLARE @sSQL NVARCHAR(MAX) -- Define cursor SET @sSQL = N'DECLARE cSAGHtmlHelpersGetHtmlTableData CURSOR FOR ' + N' ' + @sSqlSelect + N' ' EXEC @lRC = sp_executesql @sSQL IF @lRC <> 0 BEGIN SET @sReturnHtml = N'SAG: 2021111710: ' + @sProcedure + N': ' + CAST(ISNULL(@lRC, 0) AS NVARCHAR(50)) + N': Error while executing the SQL statement: ' + ISNULL(@sSQL, N'') RETURN 7 END -- Open cursor OPEN cSAGHtmlHelpersGetHtmlTableData SET @sHtmlTableRows = N'' IF @@Cursor_Rows<>0 BEGIN DECLARE @lRow INT DECLARE @lCol INT DECLARE @sAllData NVARCHAR(MAX) DECLARE @sAllDataReal NVARCHAR(MAX) DECLARE @sHtmlTableRow NVARCHAR(MAX) DECLARE @sHtmlTableCol NVARCHAR(MAX) DECLARE @sHtmlTableColAll NVARCHAR(MAX) DECLARE @sHtmlTableColTemplInner NVARCHAR(MAX) -- Select first record FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableData INTO @sAllData SET @lRow = 0 SET @lIdx = 0 -- Loop all records WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @sAllData = ISNULL(@sAllData, N'') SET @lRow = @lRow + 1 SET @lIdx = @lIdx + 1 IF @lIdx = 1 BEGIN SET @sHtmlTableColTemplInner = @sHtmlTableRowColTemplate1 END IF @lIdx = 2 BEGIN SET @sHtmlTableColTemplInner = @sHtmlTableRowColTemplate2 END IF @lIdx >= 2 SET @lIdx = 0 SET @sHtmlTableColAll = N'' -- Main work IF CHARINDEX(@sColSep, @sAllData) = 0 BEGIN SET @sAllData = ISNULL(@sAllData, N'') + @sColSep END DECLARE cSAGHtmlHelpersGetHtmlTableDataInner CURSOR FOR SELECT [TextPart] FROM [dbo].[gtblSAG_Get_Text_Split] ( @sAllData , @sColSep ) OPEN cSAGHtmlHelpersGetHtmlTableDataInner IF @@Cursor_Rows <> 0 BEGIN FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataInner INTO @sAllDataReal SET @lCol = 0 WHILE ( @@FETCH_STATUS = 0 ) BEGIN SET @lCol = @lCol + 1 IF @lCol > 1 SET @sHtmlTableColAll = ISNULL(@sHtmlTableColAll, N'') + NCHAR(13) + NCHAR(10) IF @lCol <= @lColCountHeaders BEGIN SET @sAllDataReal = REPLACE(REPLACE(ISNULL(@sAllDataReal, N''), @sColSep, N''), @sColSepBugFixReplacement, N'') SET @sAllDataReal = ISNULL(@sAllDataReal, N'') -- This is the real content of the column! IF @bTableDataContainsHtml = 0 BEGIN SET @sAllDataReal = ( SELECT TOP 1 ISNULL(@sAllDataReal, N'') FOR XML PATH('') ) END SET @sHtmlTableCol = REPLACE( @sHtmlTableColTemplInner , N'||$ColInnerFieldContent$||' , @sAllDataReal ) SET @sHtmlTableColAll = ISNULL(@sHtmlTableColAll, N'') + @sHtmlTableCol END FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableDataInner INTO @sAllDataReal END CLOSE cSAGHtmlHelpersGetHtmlTableDataInner END DEALLOCATE cSAGHtmlHelpersGetHtmlTableDataInner SET @sHtmlTableColAll = ISNULL(@sHtmlTableColAll, N'') IF @lRow > 1 SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + NCHAR(13) + NCHAR(10) SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + REPLACE(@sHtmlTableRowTemplate, N'||$TblRowAllColumnsContent$||', @sHtmlTableColAll) -- Next record FETCH NEXT FROM cSAGHtmlHelpersGetHtmlTableData INTO @sAllData END -- Close cursor CLOSE cSAGHtmlHelpersGetHtmlTableData END ELSE BEGIN SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + NCHAR(13) + NCHAR(10) END -- Free cursor DEALLOCATE cSAGHtmlHelpersGetHtmlTableData END ELSE BEGIN SET @sHtmlTableRows = ISNULL(@sHtmlTableRows, N'') + NCHAR(13) + NCHAR(10) END SET @sHtmlTableOuter = REPLACE(@sHtmlTableOuter, N'||$TblRows$||', @sHtmlTableRows) SET @sReturnHtml = @sHtmlTableOuter RETURN 0 GO <<< >>>
- XmlHtmlEncode
(alle Versionen/all versions) <<< String sicher für Xml/Html codieren / Encode string safely for Xml/Html (alle Versionen/all versions) Sonntag, 1. Januar 2023 Simples Beispiel zum sicheren Codieren von Strings für Xml/Html. A simple example to safely encode strings for Xml/Html. DECLARE @sValue NVARCHAR(MAX) SET @sValue = N'This is an example !' SELECT TOP 1 @sValue FOR XML PATH('') <<< >>>
- UpdStim12
9.0.11.x - Build 847 - 12.05.2026 <<< Sage 100 - 9.0.11.x - Update StimulSoft -> Version 2026.1.3 9.0.11.x - Build 847 - 12.05.2026 Verbesserungen Berichtsdruck AppDesigner / Improvements report printing AppDesigner Deutsch StimulSoft Bibliotheken wurden von Sage auf Version 2026.1.3 aktualisiert. Bestehende eigene Lösungen, die diese Bibliotheken referenzieren, müssen i.d.R. neu compiliert werden, sofern die Report-Instanzen von Sage-Methoden abgerufen werden. Ansonsten schlägt das Deserialisieren der Report-Instanzen im Quellcode fehl. English StimulSoft libraries have been updated to version 2026.1.3 by Sage. Existing custom solutions that reference these libraries usually have to be recompiled if the report instances are called by Sage methods. Otherwise the deserialization of the report instances in the source code fails. <<< >>>
