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 2019-02-07 17:52:18

louisrbli
Member
Registered: 2019-02-07

Computed columns not working even with basic arithmetic operations

I run a Bitnami turnkey ReportSever 3.0.5 vm. Nothing had been modified. In using the Dynamic List, Computed Columns, I couldn't even use a simple arithmetic operation. For example, I tried to calculate a profit margin in an invoice line, ([Unit Price] - [Unit Cost]) * Quantity This will return an error message saying "Could not tokenize: ([Unit Price] - [Unit Cost]) * Quantity. Problem occured at [Unit Price] - [Unit Cost]) * Quantity". [Unit Price] and [Unit Cost] are a valid field from my MSSQL database. I've tried many variations of the syntax but still no good. I tried the built in Dynamic List reports with the demo database, the Computed Columns worked with the demo database! My Dynamic List reports worked in every other way, just can't get the Computed Columns...Help!

Offline

#2 2019-02-08 10:34:03

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Computed columns not working even with basic arithmetic operations

Hi louisrbli,

you have to put the functions in the white list:
https://forum.reportserver.net/viewtopic.php?pid=3378

be careful to not to add "too much" to the whitelist in order to avoid sql injection. The whitelist is there in order to prevent sql injection and give you the control of which functions are allowed.

Regards,
Eduardo

Offline

#3 2019-02-08 19:36:51

louisrbli
Member
Registered: 2019-02-07

Re: Computed columns not working even with basic arithmetic operations

Thanks a lot, eduardo! It works perfectly now.

For those out there new to ReportServer, if you use Computed Columns, and if your database fields contain a space, you must use [] to enclose the field name, then go to the config list to add the function '[]' as 'eduardo' suggested in the above thread.

Offline

Board footer

Powered by FluxBB