#1 2016-11-03 20:58:15

phillipjohnson
Member
From: Columbus, OH, USA
Registered: 2016-11-03
Website

Support for NVARCHAR in GridEditor

It appears that the NVARCHAR datatype may not be supported in the grid editor report. When specifying an NVARCHAR column, the data does not appear in the UI.

z2lY2vn.png

Here is my SQL:

create table customers (
	id INT primary key,
	first_name VARCHAR(50),
	last_name VARCHAR(50),
	email VARCHAR(50),
	city NVARCHAR(50)
);
insert into customers (id, first_name, last_name, email, city) values (1, 'Ruth', 'Walker', 'rwalker0@ezinearticles.com', 'Kyaiklat');
insert into customers (id, first_name, last_name, email, city) values (2, 'Stephanie', 'Black', 'sblack1@com.com', 'Risaralda');
insert into customers (id, first_name, last_name, email, city) values (3, 'Ruby', 'Murphy', 'rmurphy2@phoca.cz', 'Nanger');
insert into customers (id, first_name, last_name, email, city) values (4, 'Arthur', 'Lewis', 'alewis3@furl.net', 'Makilala');
insert into customers (id, first_name, last_name, email, city) values (5, 'Jeremy', 'Robertson', 'jrobertson4@biglobe.ne.jp', 'Káto Miliá');

Here is my report code:

def adapter = gridHelper.initDbGridEditor()

adapter.configure(report, "customers")
    .setPk("id")
    .columns()
        .add("first_name", "First Name")
        .add("last_name", "Last Name")
        .add("email", "Email")
        .add("city", "City")
    .done()

return adapter

If I change the datatype of the city column to VARCHAR, it works correctly.

30sB4bg.png

Versions:
SQL Server 2008 SP3
ReportServer RS3.0.2-5855 (2016-05-29-17-55-24)

Offline

#2 2016-11-04 13:45:57

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Support for NVARCHAR in GridEditor

Hello phillipjohnson,

you can try changing the report query to return a varchar instead of an nvarchar:

select ...,
CONVERT(VARCHAR(50), [city])
, ...
from table customers

In such a way, reportServer would get a varchar and should work normally.

Offline

#3 2016-11-04 15:06:04

phillipjohnson
Member
From: Columbus, OH, USA
Registered: 2016-11-03
Website

Re: Support for NVARCHAR in GridEditor

edulid wrote:

Hello phillipjohnson,

you can try changing the report query to return a varchar instead of an nvarchar:

select ...,
CONVERT(VARCHAR(50), [city])
, ...
from table customers

In such a way, reportServer would get a varchar and should work normally.

Since this is GridEditor report, I'm not actually specifying the SQL. The documentation says you can do formatting for foreign keyed columns, but is it possible for the columns of the main table?

Also, converting to VARCHAR will cause any unicode characters to not display properly.

It also looks like the "real" datatype is not supported. Is there a list of supported and unsupported datatypes?

Offline

#4 2016-11-08 18:20:16

jalbrecht
Administrator
Registered: 2016-10-21

Re: Support for NVARCHAR in GridEditor

Hi phillipjohnson,

thx for the remark, pls. remember :

Remark. The grid editor is an experimental feature at the moment and its API might change in future versions. We are also very interested to hear your feedback in order to make the editor better fit your needs.

see: https://reportserver.net/en/guides/admi … r-Reports/

We are using it ourselfs and have some funny errors as well. We look into it and get back to you

wbr jan

Offline

#5 2016-11-17 09:19:09

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Support for NVARCHAR in GridEditor

Hi phillipjohnson,

we corrected the NVARCHAR bug, indeed, it was only not working for Grid Reports. This will be fixed in the next reportserver release.

Greets,
Eduardo

Offline

Board footer

Powered by FluxBB