How to access data from resources files in a report template

Stimulsoft Reports.NET discussion
Post Reply
shlinux
Posts: 3
Joined: Mon Jun 22, 2015 8:28 am

How to access data from resources files in a report template

Post by shlinux »

i have multiple stimulsoft reports and localization .resx files.
how to "programmatically" and (dynamically "thought") load these resources file into stimulsoft reports
thnx :D
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to access data from resources files in a report temp

Post by Alex K. »

Hello,

Please check the sample project in the attachment.

Thank you.
Attachments
Globalized Reports.zip
(35.95 KiB) Downloaded 192 times
shlinux
Posts: 3
Joined: Mon Jun 22, 2015 8:28 am

Re: How to access data from resources files in a report temp

Post by shlinux »

Thank you for your reply, it was very helpful,
still i have little problem
the resources files are in a differenent project but within the same solution, so i created the GlobalizationManager in that project and then i referenced it in the main project

in the controller i made:

Code: Select all

report.GlobalizationManager = new GlobalizationManager("Culture.Resources", new CultureInfo("ar-JO"));
and finally i render

Code: Select all

return stiMvcViewer.getReportSnapshotResult(report) ;
but i still view the report in the default language

EDIT:
After some debugging i noticed that the globalizationManager of the object "report" is being set to "ar-JO" as wanted ! still the view is with the default language "fr-FR"
shlinux
Posts: 3
Joined: Mon Jun 22, 2015 8:28 am

Re: How to access data from resources files in a report temp

Post by shlinux »

I figured out the problem,
I didnt supplied the correct path of the resources to the resource manager
:mrgreen:
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: How to access data from resources files in a report temp

Post by Jan »

Fine!
Post Reply