Su Crystal Report spariscono linee ed immagini in Crystal Report

Chi ha implementato dei report con Crystal report utilizzando immagini e linee colorate, a meno che non le abbia importate direttamente come immagini, si è trovato davanti ad una brutta sorpresa.

Le immagini e le linee colorate anche se messe in secondo piano sono sparite lasciando dei vuoti nei report.

Come risolvere questo problema?

Dopo qualche mesetto di studio ho scoperto che questo errore è collegato con le modifiche apportate a MSPaint con Windows 11.

Paint su Windows fino  Windows 10 è sempre stato il server OLE per le immagini (bitmap).

La nuova versione dell’app di MSPaint in Windows 11 non sembra avere la capacità del server OLE, quindi Crystal report  non può visualizzare l’immagine.

Per risolvere il problema ci sono due strade: o riconvertire le immagini di tutti i report  da immagini ole a Device Independent Bitmap (Picture) oppure aggiungere al Paint di Windows 11 le chiavi mancanti estratte da Windows 10 che sono le seguenti.

Copiate le chiavi seguenti in un file di testo mettendoci come intestazione

Windows Registry Editor Version 5.00

salvatelo con estensione reg ed eseguitelo sul vostro Windows 11 e le immagini ricompariranno per magia.

 

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}]
@=”Bitmap Image”

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\Conversion]

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\Conversion\Readable]

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\Conversion\Readable\Main]
@=”8″

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\MiscStatus]
@=”512″

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\Ole1Class]
@=”PBrush”

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\ProgID]
@=”PBrush”

[HKEY_CLASSES_ROOT\CLSID\{0003000A-0000-0000-C000-000000000046}\TreatAs]
@=”{D3E34B21-9D75-101A-8C3D-00AA001A1652}”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}]
@=”Paintbrush Picture”
“LocalizedString”=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,31,00,38,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType\2]
@=”Bitmap Image”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,31,00,39,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType\3]
@=”Paint”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,37,00,33,00,34,00,34,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DataFormats]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DataFormats\PriorityCacheFormats]
“#8″=””

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DefaultIcon]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,33,00,00,\
00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\InProcHandler32]
@=”ole32.dll”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Insertable]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\LocalServer32]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\MiscStatus]
@=”32″

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\PersistentHandler]
@=”{098f2470-bae0-11cd-b579-08002b30bfeb}”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\ProgID]
@=”Paint.Picture”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb\0]
@=”&Edit,0,2″
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,32,00,30,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb\1]
@=”&Open,0,2”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,32,00,31,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}]
@=”Paintbrush Picture”
“LocalizedString”=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,31,00,38,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType\2]
@=”Bitmap Image”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,31,00,39,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType\3]
@=”Paint”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,37,00,33,00,34,00,34,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DataFormats]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DataFormats\PriorityCacheFormats]
“#8″=””

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DefaultIcon]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,33,00,00,\
00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\InProcHandler32]
@=”ole32.dll”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Insertable]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\LocalServer32]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\MiscStatus]
@=”32″

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\PersistentHandler]
@=”{098f2470-bae0-11cd-b579-08002b30bfeb}”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\ProgID]
@=”Paint.Picture”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb\0]
@=”&Edit,0,2″
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,32,00,30,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb\1]
@=”&Open,0,2”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,32,00,31,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}]
@=”Paintbrush Picture”
“LocalizedString”=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,31,00,38,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType\2]
@=”Bitmap Image”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,31,00,39,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\AuxUserType\3]
@=”Paint”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,37,00,33,00,34,00,34,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DataFormats]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DataFormats\PriorityCacheFormats]
“#8″=””

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\DefaultIcon]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,33,00,00,\
00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\InProcHandler32]
@=”ole32.dll”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Insertable]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\LocalServer32]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,\
70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\MiscStatus]
@=”32″

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\PersistentHandler]
@=”{098f2470-bae0-11cd-b579-08002b30bfeb}”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\ProgID]
@=”Paint.Picture”

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb]

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb\0]
@=”&Edit,0,2″
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,32,00,30,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\Verb\1]
@=”&Open,0,2”
“LocalizedString”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,\
6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,\
00,5c,00,6d,00,73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,\
2c,00,2d,00,35,00,39,00,34,00,32,00,31,00,00,00