Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on Ubuntu #27

Closed
verloka opened this issue Mar 12, 2021 · 2 comments
Closed

Issue on Ubuntu #27

verloka opened this issue Mar 12, 2021 · 2 comments

Comments

@verloka
Copy link

verloka commented Mar 12, 2021

I have an exception while generating local rdl reports

.ctor exception: Culture is not supported. (Parameter 'culture')
4096 (0x1000) is an invalid culture identifier., Stack trace:    at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean useUserOverride)
   at Microsoft.ReportingServices.ReportIntermediateFormat.RecordSetInfo..ctor(Boolean readerExtensionsSupported, Boolean persistCalculatedFields, DataSetInstance dataSetInstance, DateTime reportExecutionTime)
   at Microsoft.ReportingServices.OnDemandProcessing.ProcessingDataReader..ctor(OnDemandProcessingContext odpContext, DataSetInstance dataSetInstance, String dataSetName, IDataReader sourceReader, Boolean hasServerAggregateMetadata, String[] aliases, String[] names, DataSourceErrorInspector errorInspector)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.CreateProcessingDataReader(IDataReader reader, DataSourceErrorInspector errorInspector, Boolean readerExtensionsSupportedLocal)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.StoreDataReader(IDataReader reader, DataSourceErrorInspector errorInspector)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeLiveQueryExecutor.RunLiveQuery(List`1 queryParams, Object[] paramValues)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunEmbeddedQuery(List`1 queryParams, Object[] paramValues)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.RunDataSetQuery()
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSet.InitializeAndRunLiveQuery()
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.InitializeRowSourceAndProcessRows(ExecutedQuery existingQuery)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.Process(ExecutedQuery existingQuery)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSet.ProcessConcurrent(Object threadSet)

Please help or provide me an advice. Thanks!

@lkosson
Copy link
Owner

lkosson commented Mar 13, 2021

It looks like ReportViewer (both original and core version) doesn't play nice with custom cultures and .NET Core on Ubuntu defaults to one. Try setting System.Threading.Thread.CurrentThread.CurrentCulture for a thread used to render your RDLC to some predefined culture like new CultureInfo("en-GB") or even CultureInfo.InvariantCulture.

@verloka
Copy link
Author

verloka commented Mar 15, 2021

It looks like ReportViewer (both original and core version) doesn't play nice with custom cultures and .NET Core on Ubuntu defaults to one. Try setting System.Threading.Thread.CurrentThread.CurrentCulture for a thread used to render your RDLC to some predefined culture like new CultureInfo("en-GB") or even CultureInfo.InvariantCulture.

I found the problem. It works on Windows, but does not work on Linux unless the language is configured in the report (blank field).

image

@verloka verloka closed this as completed Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants