You are not logged in.
Dear users of this forum,
we are pleased to inform you that we will be updating the software behind this forum in the near future.
Existing posts, users and categories will remain untouched.
Important:
We will keep you informed in the pinned thread.
Kind regards,
Your ReportServer Team
Liebe Nutzer dieses Forums,
wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.
Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!
Wichtig:
Wir halten euch im angepinnten Beitrag auf dem Laufenden!
Mit vielen Grüßen
Euer ReportServer Team
Pages: 1
Hi
i do like to get more knowledge on Dynamic lists and reporting capacity .
Do we have a option to create a Dynamic list based on XML datasource ?
what is the approach to localize reports (ex: Column headings) ?
thanks
Last edited by mahesh (2016-07-24 11:17:08)
Offline
Hi,
XML datasource - you need to create a script datasource and then set is as your Dynamic List datasource. You'll find the details in the Script Guide: https://reportserver.net/en/guides/scri … tasources/
Cheers,
Karolina
Offline
As for localization of the Dynamic List:
One way would be to use metadata for this, as described in 6.2.4. section of the Admin guide, with a script datasource as the metadata datasource. The cache of the script datasource is set to 0.
The script gets the current locale of a logged-in user and, accordingly, sets the default column alias and description in a given language.
import net.datenwerke.rs.base.service.reportengines.table.output.object.RSTableModel
import net.datenwerke.rs.base.service.reportengines.table.output.object.RSTableRow
import net.datenwerke.rs.base.service.reportengines.table.output.object.TableDefinition
import net.datenwerke.rs.utils.localization.LocalizationServiceImpl
/* get locale */
LocalizationServiceImpl localizationService = GLOBALS.getInstance(LocalizationServiceImpl.class)
String locale = localizationService.getLocale().toString()
/* Making English the fallback locale */
if (locale != "pl"){
locale = "en"
}
/* define the default aliases and decriptions in different languages */
List technicalColumnNames = ["col_a", "col_b", "col_c"]
Map aliases = ["en": ["Column 1", "Column 2", "Column 3"], "pl": ["Kolumna 1", "Kolumna 2", "Kolumna 3"]]
Map description = ["en": ["My first column", "My second column", "My third column"], "pl": ["Moja pierwsza kolumna",
"Moja druga kolumna", "Moja trzecia kolumna"]]
/* create the datasource */
TableDefinition tableDefinition = [["column_name", "default_alias", "description"], [String.class, String.class, String.class]]
RSTableModel tableModel = new RSTableModel(tableDefinition)
/* add rows */
technicalColumnNames.eachWithIndex{name, i ->
ArrayList rowData = [name, aliases[locale][i], description[locale][i]]
RSTableRow row = new RSTableRow(tableDefinition, rowData)
tableModel.addDataRow(row)
}
return tableModelHope it helps.
Karolina
Offline
Hi,
Do you know how I can adapt parameters of reports? I mean name, description depending on language...
It seems to be an unsolvable problem in ReportServer which force you to create two different reports (and variants etc).
Offline
Hi Patryx,
as I mentioned here: https://forum.reportserver.net/viewtopi … 5838#p5838
we have a ticket open for multilanguage parameters.
Regards,
Eduardo
Offline
Pages: 1