Announcement

Migration of this forum

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:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

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:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2016-07-23 12:08:18

mahesh
Member
Registered: 2016-07-16

Dynamic list datasource and cap size

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

#2 2016-07-24 17:58:38

karolina
Member
Registered: 2014-08-09

Re: Dynamic list datasource and cap size

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

#3 2016-07-24 19:30:13

karolina
Member
Registered: 2014-08-09

Re: Dynamic list datasource and cap size

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 tableModel

Hope it helps.
Karolina

Offline

#4 2019-06-04 13:23:38

Patryx
Member
Registered: 2019-03-25

Re: Dynamic list datasource and cap size

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

#5 2019-06-04 14:19:35

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Dynamic list datasource and cap size

Hi Patryx,

as I mentioned here: https://forum.reportserver.net/viewtopi … 5838#p5838
we have a ticket open for multilanguage parameters.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB