#1 2020-01-21 12:47:55

razvan.bunea
Member
Registered: 2019-06-13

'Save version' button on embedded report execution view

Hi,

Is there any way to have the 'Save version' button appear also in the embedded report execution view, like it does in the full execution view available in ReportServer's interface? I have tried to grant the user write permissions on the report but in the embedded execution view (we have a business intelligence portal integrated with the ReportServer Enterprise Edition) still does not appear.

Maybe through a custom script? I have figured out how to place a custom button on the toolbar of report execution view and to call a custom script from there, but I can't find a detailed documentation of the API (except from the javadoc - which is rather thin), nor of the data model and I am unable as such to save the customised report variant of the user from that script.

Our users want to be able to save, should they choose so, their customised version of the embedded report. They can choose columns, filters, parameter values etc. but they have to do that each time they log in (I have also developed a script that logs them in automatically when accessing the embedded report execution view from our portal) and they want to be able to persist those changes as new variants. From obvious reasons we do not want to grant them access to the ReportServer interface, so they have to be limited to only embedded views.


Many thanks in advance for your help.

Offline

#2 2020-02-06 09:48:34

razvan.bunea
Member
Registered: 2019-06-13

Re: 'Save version' button on embedded report execution view

No update on this question? I would really appreciate to at least find out if this is possible or not, to save more digging time in the docs or on the forums.

Offline

#3 2020-02-10 08:54:35

eduardo
Administrator
Registered: 2016-11-01
Website

Re: 'Save version' button on embedded report execution view

Hi razvan.bunea,

please check net.datenwerke.rs.core.service.reportmanager.ReportServiceImpl.persist(AbstractReportManagerNode) for saving your variant per script. For extending the client: https://reportserver.net/en/guides/scri … he-Client/ and https://reportserver.net/en/guides/scri … onService/

You can find the services.html with a list of all services in reportserver.

Regards,
Eduardo

Offline

#4 2020-07-07 12:23:05

razvan.bunea
Member
Registered: 2019-06-13

Re: 'Save version' button on embedded report execution view

Hi eduardo,

Thanks for previous response and sorry for necroing this thread after such a long time. We have postponed our actions due to the pandemic and now we are back on track with this issue. As I sad, I currently was able to put a button on the toolbar of the inline execution view, which calls a script when pressed. I also can fetch in that script the id of the report being prepared inline through context['id'] variable. However, by downloading the sources of Report Server - we are using 3.0.8 Enterprise for now, as we did not yet get the necessary breathing window to upgrade - and inspecting the code that saves a new variant in net.datenwerke.rs.core.server.reportexecutor.ReportExecutorRpcServiceImpl , I see that it looks like this:

@Override
@Transactional(rollbackOn={Exception.class})
public ReportDto createNewVariant(@Named("report") ReportDto reportDto, String executeToken, String title, String description)  throws ServerCallFailedException {
	Report referenceReport = (Report) reportService.getReportById(reportDto.getId());
	
	/* check permissions */
	if(! securityService.checkRights(referenceReport, Execute.class))
		throw new ViolatedSecurityException();
	
	/* create variant */
	Report adjustedReport = (Report) dtoService.createUnmanagedPoso(reportDto);
	Report variant = referenceReport.createNewVariant(adjustedReport);

	variant.setName(title);
	variant.setDescription(description);
	
	reportService.prepareVariantForStorage((ReportVariant) variant, executeToken);
	
	/* persist variant */
	reportService.persist(variant);
	
	return loadFullDtoForExecution(variant);
}

What I need is to do the same thing in my script, but the question is how can I retrieve the current modifications the user did on report configuration (columns, formatting, parameters), which in that function I assume are in the reportDto object, and also where from do I fetch the executeToken (if it's really needed).

Or maybe it is possible through a hook to leave the 'Save' and 'Save variant' buttons available even for inline report execution frames? If so, how exactly?

Thanks for your help,

All best.

Offline

Board footer

Powered by FluxBB