You are not logged in.
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
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
Thank you very much Eduardo,let me go through it and see how can I apply it.
Offline
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
Hi Thabo,
what were your steps? What are you seeing? do you get an error message?
Regards,
Eduardo
Offline
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
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:
Regards,
Eduardo
Offline
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
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
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
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
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
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
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
Thanks...
Have tried it but am still getting the same error message.
Offline
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
Alright thanks Eduardo....I will test it and I do realise that I had made a number of typos in my script.
Offline
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
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
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
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/
Regards,
Eduardo
Offline
Thank you very much Eduardo.
Offline
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
Hi Thabo,
the exact steps you described work for me. Which reportserver version are you using exactly ( rsversion.properties ) ?
Regards,
Eduardo
Offline
RS3.0.5-6005
Offline