How to play video or music from SSRS

In this post, I will show how to play video or music from SSRS using two options.

Option 1: Using SSIS package that invokes the video or audio file that is stored in SQL Server filetable (or normal windows directory folder)

To see an example on SQL server filetable, refer my previous post.


Option 2: Directly from SSRS by using jump to URL feature.

Option 1 Solution shown below:

Create an SSIS package with Execute Process task






In the Executable, provide the path to windows media player exe file
In Arguments, provide the path to video or audio file.

Deploy the SSIS package to Integration Services catalogs, So that packages can be executed using Stored procedures catalog.create_execution and catalog.start_execution



Create another procedure that encapsulates this SSIS package execution stored procedures.



CREATE PROCEDURE SSRS_PlayVideo
AS
BEGIN

Declare @execution_id bigint  
EXEC [SSISDB].catalog.create_execution 
       @folder_name =  'Package_OnPremise'  
     , @project_name = 'Integration Services Project1'
     , @package_name = 'Package.dtsx' 
     , @execution_id = @execution_id OUTPUT

EXEC [SSISDB].[catalog].[start_execution] @execution_id  

END





Now create SSRS report with just a parameter to handle whether to display the video or not.
I have just added a text box with message as shown below, no other report items are added.



Create a dataset, Query type as Text and write an expression as shown below:


=IIF(Parameters!PlayVideo.Value = "no"," ","SSRS_PlayVideo")









Option 2 Solution:

Create SSRS report with just text box and then right-click -> Text box Properties -> Action ->  Go to URL -> provide the video or audio URL.





Reference: 

See Also: 

No comments: