We have this sub to load the Report (and display it in Print Layout Mode)
rv.Reset()
rv.LocalReport.DataSources.Clear()
'Base setting
Dim exeFolder = Application.StartupPath
Dim reportPath = Path.Combine(exeFolder, "kensaku/rp_kensakukekka.rdlc")
rv.ProcessingMode = ProcessingMode.Local
rv.LocalReport.ReportEmbeddedResource = reportPath
rv.LocalReport.ReportPath = reportPath
rv.SetDisplayMode(DisplayMode.PrintLayout)
'Data setting
Dim rds As New ReportDataSource("booksearchprint", dataSource)
rv.LocalReport.DataSources.Add(rds)
'Refresh GUI
rv.LocalReport.Refresh()
rv.RefreshReport()
The dataSource
is declared as: Private dataSource As List(Of stadVBBookSearch_Result)
The stadVBBookSearch_Result
class is just a normal class with some String and Integer properties.
Everythings worked just fine until there are some special characters in the dataSource
.
For example:
日本-貿易 /スポーツ用品 /コンテンツビジネス /玩具 /映画 /音楽 /ゴム /サッカー /自転車 /出版 /釣り /テニス /図書 /花火 /皮革 /プラスチック /貿易 /木材 /野球 /レクリエーション /ぬいぐるみ /テレビゲーム /知的財産 쬀ര꠰괰☰☀뤀쐰༰툰☰☀대옰쐰༰폿렰촰뤰☰☀가뀰☰☀ꠀꐰ갰☰☀ꨀ갰꼰☰☀됀☰☀딀쐰ꬰﰰ☰☀렀옰뜰☰☀뜀쐰터☰☀쐀☰☀였쬰뤰☰☀저뜰☰☀케쨰팰☰☀툀ꬰ꼰☰☀휀뤰섰쐰꼰☰☀꠰괰☰☀꼰똰ꐰ☰☀괰☰☀꼰꠰ﰰ
The japanese characters are well displayed, but those others characters caused an error while rendering the local report: Please see this image: Error
How to fix this issue ? I don't know if it is the encoding of the datasource or of the whole application.