#1 2016-11-04 14:03:22

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

Bug: GridEditor: setHidden() method causes data loss

There appears to be a bug with the .setHidden() method of the GridEditor fluid API. When updating a record the value of the hidden column is not remembered and therefore NULL is used.

Here is a sample table:

create table customers (
	id INT primary key,
	first_name VARCHAR(50),
	last_name VARCHAR(50),
	email VARCHAR(50),
	city VARCHAR(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á');

And here is a a sample report:

def adapter = gridHelper.initDbGridEditor()

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

return adapter

And here is a workflow:

1. Current state of data

select * from customers

id  first_name   last_name    email                        city
--- ------------ ------------ ---------------------------- -----------
1   Ruth         Walker       rwalker0@ezinearticles.com   Kyaiklat
2   Stephanie    Black        sblack1@com.com              Risaralda
3   Ruby         Murphy       rmurphy2@phoca.cz            Nanger
4   Arthur       Lewis        alewis3@furl.net             Makilala
5   Jeremy       Robertson    jrobertson4@biglobe.ne.jp    Káto Miliá

2. Edit a row
a3jjGWL.png

3. The email is now NULL

select * from customers

id  first_name   last_name    email                       city
--- ------------ ------------ --------------------------- -------------
1   Ruth         QQQQQ        NULL                        Kyaiklat
2   Stephanie    Black        sblack1@com.com             Risaralda
3   Ruby         Murphy       rmurphy2@phoca.cz           Nanger
4   Arthur       Lewis        alewis3@furl.net            Makilala
5   Jeremy       Robertson    jrobertson4@biglobe.ne.jp   Káto Miliá

This does not seem to happen if you use the "Edit" button to open the window to change the row.

You can prevent data loss by using .setEditable(false).setWidth(0), but it looks a little weird in the UI:
UFu05rM.png

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

Offline

#2 2016-11-08 18:18:46

jalbrecht
Administrator
Registered: 2016-10-21

Re: Bug: GridEditor: setHidden() method causes data loss

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 orselfs and have some funny errors as well. We look into it and get back to you.

wbr jan

Offline

#3 2016-11-17 10:51:55

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Bug: GridEditor: setHidden() method causes data loss

Hi phillipjohnson,

we are taking a look at the bug. Thanks for reporting. We are reproducing the bug and are working on correcting it.

Best regards,
Eduardo

Offline

#4 2016-11-18 10:29:11

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Bug: GridEditor: setHidden() method causes data loss

Hi phillipjohnson,

the bug has been corrected and will be fixed in the next reportserver release.

Best regards,
Eduardo

Offline

#5 2016-11-18 11:48:52

karolina
Member
Registered: 2014-08-09

Re: Bug: GridEditor: setHidden() method causes data loss

Great news, Eduardo - thank you :-)
Karolina

Offline

Board footer

Powered by FluxBB