Split parameters from ExecutionLog to SSRS (string functions)

"Another String Function Function" for TSQL.

The ExecutionLogStorage table in the ReportServer $ InstanceName database for SSRS 2008 puts all the parameters called in the report in one column -

FullName = LastName, FirstName & CalledBy = Lastname, FirstName & DateSelected = MM / DD / YY & CheeseorFries = Fries

Some of them are null values, so the user may just have a DateSelect or FullName or CalledBy ... etc. I need to parse the value "CalledBy = Lastname, FirstName"; but between LOWER and LTRIM, as well as left and interlinear and Charindexes .... I will not go anywhere.

Any ideas? = /

The goal is to be able to get a list of those who called the report at this time ....

There is a username column in the SSRS execution log, but due to messages that are called from the DNN portal using linked servers, managers decided that all delegation of network interaction was easier to bypass simply by using a domain service account - so all Fields are "username "populated with a service account, not a separate one.

Thank you!

+3
source share
1 answer
    SELECT  
RTrim(Substring(ex.Parameters, Charindex('&CalledBy=',ex.Parameters, 1) + 10, 1000)) 
as 'User',
ex.Format, ex.TimeStart, cat.Name as 'Report', 
CONVERT(varchar(max), ex.TimeStart, 100) AS rundate
FROM ReportServer$MCSQL1.dbo.ExecutionLog AS ex, ReportServer$MCSQL1.dbo.Catalog AS cat
where ex.ReportID = cat.ItemID

, . , , - DNN, , . CalledBy , DNN.

, , - , , "CalledBy" ( "1000" )..... , .

rtrim (substring...) , , ( )

, !

+1

Source: https://habr.com/ru/post/1766254/


All Articles