lazyload the images

最新精選 Featured post

異世界穿越作品整合

訂閱


每月雙數周日為固定發佈日

本站內任何媒體的內容,包括但不限於 影片/聲音檔/文章/圖片,純屬資訊分享和教學用途, 本站內容只作為一般用途,它並沒有考慮您的個人需要、投資目標及特定財政狀況。 本站內容並非投資意見,亦不構成任何投資產品之要約、招攬或建議購買或出售任何存款或投資任何下述投資產品。

投資者須注意,所有投資涉及風險(包括可能會損失投資本金),投資產品的價格可升或可跌, 而所呈列的過往表現資料並不表示將來亦會有類似的表現。

投資者在作出任何投資決定前,投資者應進行所須或適當的獨立調查,包括評估所涉及的投資風險。

03/07/2026

Crystal Report win11 Compatibility

文章分類: ,

 


在 .net application 上運用 Crystal Report

全攻略在此

https://pages.community.sap.com/topics/crystal-reports/visual-studio

今天只說在win11 上遇到的問題


Crystal Report win11 Compatibility 相容性

海豚的win11 是24H2

首先 Crystal Report 要升到 SP 37 或更加新版本


見下圖



然後,海豚試到 win11 print dialog有問題


遇到的問題

假設report有1-10頁

Print 2-3 ok

Print 全部 ok

print 第2頁, 最終只會print第1頁

print 第3頁, 最終只會print第1頁


了解和分析問題

整個 .net application 用 Crystal Report Print 東西的流程如下

Crystal Report Preivew 是按照windows的Default Printer 的 Print preferences

在Crystal Report上按print後,卻會交給 windows print dialog


所以workflow推斷如下

.Net application > Crystal Report runtime > Win Default Printer (Print preference) > Printer Driver > Crystal Report Preview > Print (Win Print Dialog) > Printer Driver > Physical Printer


海豚在用VS2019 + Crystal Report SP27

按照 Crystal Report for VS,用到就算了

沒有一直追版本

大家可以留意一下新版本 fix 了什麼,再決定要追到什麼版本

https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html?locale=en-US





試過

海豚在舊電腦win10上試過,沒有發生以上bug


在win11上

更新printer driver 版本,無法解決

更新Crystal Report 到 SP33, 37, 39,無法解決



解決方法(臨時)

run regedit

go to 電腦\HKEY_CURRENT_USER\Software\Microsoft\Print\UnifiedPrintDialog

add DWORD with

name: PreferLegacyPrintDialog

value: 1


AI reference

https://techcommunity.microsoft.com/discussions/windows11/windows-11-print-dialog-does-not-support-preview/4429740


後續處理

但見那路徑是current user

所以只算暫時解決方案


可能可以透過win server group policy 落條policy給全部人

或 任何AD user登入時都會tigger 自動加入那值到regedit


其次是programmatically 加入那值到regedit

前提是如果user 執行的.net application 時有admin right


或 programmatically overright Crystal Report Print behavior

https://gist.github.com/dolphinotaku/c2f12537a236872a2b3a85be44ddf783

那個海豚沒有去試,估是改完後,在不動regedit的情況下

crystal report按print 可以跳出舊print dialog



AI reference

https://help.sap.com/docs/SAP_CRYSTAL_REPORTS,_DEVELOPER_VERSION_FOR_MICROSOFT_VISUAL_STUDIO/0d6684e153174710b8b2eb114bb7f843/45b09e4f6e041014910aba7db0e91070.html

https://stackoverflow.com/questions/54351762/how-to-take-direct-print-of-crystal-report-using-c-sharp-code


碎碎怨念

跳到結論,垃圾 win11 / 垃圾 Crystal Report


用臨時方案先撐一會

執屎隊大隊長很忙,要趕去處理其它屎


Reference

Downloads for SAP Crystal Reports, SAP Crystal Presentation Design and SAP Crystal Dashboard Design

https://origin.softwaredownloads.sap.com/public/site/index.html


SAP Crystal Reports for Visual Studio (.NET)

https://pages.community.sap.com/topics/crystal-reports/visual-studio


Crystal Reports, Developer for Visual Studio Downloads

https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html?locale=en-US


SAP Crystal Reports, version for Microsoft Visual Studio Supported Platforms (PAM)

https://www.sap.com/documents/2016/06/f871031e-757c-0010-82c7-eda71af511fa.html

No comments:

Post a Comment