#1 2019-08-29 10:31:22

Thabo
Member
Registered: 2019-08-29

RE RS Enterprise's Data Edit Feature

Hi all,

may someone please assist here,how does RS Enterprise's data edit feature work? I want to be able to edit and/or update data directly from RS to my  MSSQL database,so please guide me on how do I achieve that.

Thank you.

Last edited by Thabo (2019-08-29 10:32:09)

Offline

#2 2019-08-29 10:39:49

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

for editing data you can use the Grid Editor Report, a very flexible spreadsheet-like database editor that can be used in situations where you want to enable a user to do some basic data administration. You can read more information here: https://reportserver.net/en/guides/admi … r-Reports/

Regards,
Eduardo

Offline

#3 2019-08-29 10:49:10

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Thank you very much Eduardo,let me go through it and see how can I apply it.

Offline

#4 2019-10-28 13:27:00

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi RS team,

May you please assist here...

We have created an example  form in RS,but it seems the governing script that drives it is not being executed by RS on the back end,thus we do not get a form to fill out.Is there a setting that we are missing?

Thanks.

Offline

#5 2019-10-28 13:31:12

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

what were your steps? What are you seeing? do you get an error message?

Regards,
Eduardo

Offline

#6 2019-10-29 06:39:43

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

the error I am getting says,'the report could not be executed:script does not return object of type interface.'...I am following section 6.10.1 A Basic Grid Editor from Documentation.I wanted to attach the screenshots so that you can see what I have currently done,but I don't see the option where I can attach the image to this message.I do understand how the below 'img tag' works.

Thanks.

Offline

#7 2019-10-29 09:40:44

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

you can upload the images to http://www.imgbb.com and then copy the URL inside the img tags. Please do not copy the complete imgbb url but only the url to the PNG: example:

[img]https://i.ibb.co/4PzhH1V/rs-logo-2-250.png[/img]

Then you should see something like:
rs-logo-2-250.png

Regards,
Eduardo

Offline

#8 2019-10-30 09:16:12

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

please advise on the below error message:
the error I am getting says,'the report could not be executed:script does not return object of type interface.'...I am following section 6.10.1 A Basic Grid Editor from Documentation.

Please provide me with your email address,the image links is not working for me to upload.

Thanks.

Offline

#9 2019-10-30 09:23:02

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

you don't have to upload the image in the forum, you only have to upload it to http://www.imgbb.com and then just copy the link to the png / jpg as I explained above. Please try again (you have to select BBCode in http://www.imgbb.com after uploading the image), then you have the BBCode you need. Then copy the BBCode here and you will see the images.

If this doesn't work, you can send an email to info at infofabrik.de

Regards,
Eduardo

Offline

#10 2019-10-30 09:37:48

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

Thanks for your response...while am still working on the image part,

please advise on the below error message:
the error I am getting says,'the report could not be executed:script does not return object of type interface.'...I am following section 6.10.1 A Basic Grid Editor from Documentation.

Thanks.

Offline

#11 2019-10-30 10:03:36

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

I can only see and understand the problem if I know exactly what you are doing. Only with the error message I cannot know what is going wrong. As you are writing a script I have to see the script to being able to understand why you are getting this error message.

Regards,
Eduardo

Offline

#12 2019-10-30 10:50:11

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

you can also of course post the script you are using as text. Images/screenshots only as support for understanding what you are doing. But the script please as text inside

[code]script[/code]

Regards,
Eduardo

Offline

#13 2019-11-01 06:53:12

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

below is the code:

import net.datenwerkewerke.rs.grideditor.service.grideditor.definition.db.*
def definition=GLOBALS.getRsService(dbGridEditorDefinition.class)
def adapter =definition.getAdapter()
adapter.setTable("bDealers")
adapter.setPrimaryKey('recid','s_dealer_code')
return definition;

and the error says...

'the report could not be executed:script does not return object of type interface net.datenwerkewerke.rs.grideditor.service.grideditor.definition.GridEditor of type interface net.datenwerkewerke.rs.grideditor.service.grideditor.definition.'


Thanks.

Offline

#14 2019-11-01 08:39:10

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

please try to replace

def definition=GLOBALS.getRsService(dbGridEditorDefinition.class)

with

def definition=GLOBALS.getRsService(DbGridEditorDefinition.class)

Does this help?

Regards,
Eduardo

Offline

#15 2019-11-01 08:51:38

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Thanks...

Have tried it but am still getting the same error message.

Offline

#16 2019-11-01 09:03:00

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

I see also this is incorrect in your script:

import net.datenwerkewerke.rs.grideditor.service.grideditor.definition.db.*

->

import net.datenwerke.rs.grideditor.service.grideditor.definition.db.*

and

adapter.setTable("bDealers")

->

adapter.setTableName("bDealers")

I just tested with this script and it works:

import net.datenwerke.rs.grideditor.service.grideditor.definition.db.*
def definition=GLOBALS.getRsService(DbGridEditorDefinition.class)
def adapter =definition.getAdapter()
adapter.setTableName("mytable")
adapter.setPrimaryKey('id')
return definition;

Regards,
Eduardo

Offline

#17 2019-11-01 09:42:06

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Alright thanks Eduardo....I will test it and I do realise  that I had made a number of typos in my script.

Offline

#18 2019-11-01 13:35:18

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

just a quick one...I have generated a file and did put the code below inside that file:

import net.datenwerke.rs.grideditor.service.grideditor.definition.db.*

def definition = GLOBALS.getRsService(DbGridEditorDefinition.class)

def adapter = definition.getAdapter()

adapter.configure(report,"bDealers")
    .setPk('recid')
    .columns()
        .add('s_dealer_code')
    .done()

return definition;

the name of the file is Dealer.rs

I then in my terminal window navigated to my file location then ran this file by:

 exec Dealer.rs 

command,but it just blinks and nothing happens.

Is there anything that am missing here Eduardo?

Thanks.

Offline

#19 2019-11-02 15:21:51

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

For creating a grid report, you have to take these steps:

1) create your script, e.g. Dealer.rs (or better: Dealer.groovy). Just rename the script and put "text/groovy" in its content type.
2) Create a grid editor report.
3) Set a datasource on the grid report.
4) Select the script you created in 1) in the grid report.

Then you should see the editable grid if you double click on your grid report.

Regards,
Eduardo

Offline

#20 2019-11-15 06:59:45

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

Can I please see the screenshot of a sample grid editor that you have done by following the above recommendations.

May you please also include the code....

Thanks.

Offline

#21 2019-11-15 07:42:14

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

I include screenshots for recreating this. Please try first to recreate this exact example using the demo data. The code I used is the same you see here: https://reportserver.net/en/guides/admi … r-Reports/

1.png
2.png
3.png

Regards,
Eduardo

Offline

#22 2019-11-15 07:44:15

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Thank you very much Eduardo.

Offline

#23 2020-02-18 07:06:13

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

Hi Eduardo,

Please review what I have done below and advise on what seems to be an issue on my side:

1.I have firstly created a .groovy file under FileServer Root/bin and the contents of the file entails the below code:

import net.datenwerke.rs.grideditor.service.grideditor.definition.db.*
def definition=GLOBALS.getRsService(DbGridEditorDefinition.class)
def adapter =definition.getAdapter()

adapter.configure(report,"T_AGG_CUSTOMER")
   .columns()
      .add('CUS_CUSTOMERNUMBER')
      .add('CUS_CUSTOMERNAME')
      .add('CUS_CREDITLIMIT')
   .done()

return adapter

2.Then went to the reports created a folder called 'GridReports',then right clicked,insert,Grid Editor Report.On the name text field I typed 'CustomerGrid',for Datasource properties I went on to attach the Demo Data ,and lastly on the Script I have attached the .groovy file created above then applied changes.

3.Now when I execute this report I still get the error message 'the report could not be executed:script does not return object of type interface net.datenwerkewerke.rs.grideditor.service.grideditor.definition.GridEditor of type interface net.datenwerkewerke.rs.grideditor.service.grideditor.definition.'

Please advise on what is it that I might have left behind on what I have done on the above steps.

Thanks.

Offline

#24 2020-02-18 09:46:47

eduardo
Administrator
Registered: 2016-11-01
Website

Re: RE RS Enterprise's Data Edit Feature

Hi Thabo,

the exact steps you described work for me. Which reportserver version are you using exactly ( rsversion.properties ) ?

Regards,
Eduardo

Offline

#25 2020-02-18 10:00:30

Thabo
Member
Registered: 2019-08-29

Re: RE RS Enterprise's Data Edit Feature

RS3.0.5-6005

Offline

Board footer

Powered by FluxBB