How to get analytics reports programmatically in SharePoint 2013?
In SharePoint 2010 it was possible to obtain data from web analytics programmatically using Microsoft.Office.Server.WebAnalytics.Reporting.AnalyticsReportFunction class.
How can you get search reports programmatically in SharePoint 2013? Are there new assemblies or classes that can be used to obtain them?
In my scenario, i am mostly interested in the most searched terms at web application or service application level.
In SharePoint 2013 the Web Analytics Service Application was merged into the Search Service Application. It seems now that the old assemblies used for this (Microsoft.Office.Server.WebAnalytics.dll
and Microsoft.Office.Server.WebAnalytics.UI.dll) are not available any more.
They are available in the user interface as Excel reports, in CA->Application Management->Manage Service Applications->Search Service Application->Usage Reports , but I am interested to obtain these reports programmatically.
Is this scenario still supported in SP 2013?
try this
using (SPSite site = new SPSite(MainBUPageUrl))//open root
using (SPWeb web = site.OpenWeb())
AnalyticsReportFunction AnalyticReport = new AnalyticsReportFunction(); //create object of analyticsReport
Thread.CurrentPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());//this is used only
in timer job if not used then GetWebAnalyticsReportData will not work
object[,] result = null;
web.AllowUnsafeUpdates = true;
result = AnalyticReport.GetWebAnalyticsReportData(SiteCollurl, "2", ReportType.TopDestinationForSiteReport.ToString(),
DateTime.Today.AddDays(-3.0), DateTime.Today); //this gives top visitor for provided site collection by providing time duration(start and end date),report type and url
SPList list = web.Lists.TryGetList("AppreciationsList");//list
for (int counter = 0; counter < 10; counter++) //show top ten pages
Item = list.AddItem();
s_count = result[rcount, 1].ToString(); //code
to get top vistor usage count
Username = result[rcount++, 0].ToString();//get
top vistor name
user = null;
try
user = web.EnsureUser(Username);//check
user available?
catch (Exception)
counter--;
continue;
IfExist = checkUserExistence(user);//call the
function // IfExist = false; //this flag is used to check existence of user in insightMember group
if (IfExist == true)//if user is not in the insight2
group member list
Item["Appreciated Person"]
= user;
Item["Title"] = s_count;
Item.Update();
else //if user is in the insight2 group member
list
counter--;
continue;
web.AllowUnsafeUpdates = false;
Similar Messages
-
How to get a report in pdf format.
Hi Experts,
Could any one let me know that, how to get the report in PDF format.
Once a report is generated it should be displayed in pdf format or downloaded in pdf format.
Thanks in Advance,
Regards,
Irfan HussainHi,
Check out this code:
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
* Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
* Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
* Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
* Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
* Write statement to represent report output. Spool request is created
* if write statement is executed in background. This could also be an
* ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
*** Alternative way could be to submit another program and store spool
*** id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
* to sap-spool
* spool parameters %_print
* archive parameters %_print
* without spool dynpro
* and return.
* Get spool id from program called above
* IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
* FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
* FORM get_job_details *
FORM get_job_details.
* Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
* FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
* Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
* FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
Regards,
Gayathri -
How to get customised reports through Flexible Analysis available in PMIS
Dear Sir,
Please guide us how to get customised reports through Flexible Analysis available in PMIS.
Thanks & Regards,
PM Team[Sap Help|http://help.sap.com/erp2005_ehp_04/helpdata/en/c1/375e9c449a11d188fe0000e8322f96/frameset.htm].
Regards
Narasimhan -
How to get the Reports of Change Tracking Table in MDM?
Hi!
Please tell me how to get the reports of Change Tracking Table in MDM which is a System table, directly from MDM without using any interface.
Thanks in advance for the reply.
With Best Regards
Devendra PandeyHi Devendra,
MDM can track changes on tables and fields. <u>The level of change tracking, and which tables/fields to track, are configurable in the MDM Console</u>. MDM opens a new database on the same database engine as the MDM repository and writes all change records to this database.
For information of various steps you can visit
<a href="http://help.sap.com/saphelp_mdm550/helpdata/en/45/c7b20339ee570ae10000000a114a6b/content.htm">this URL</a>
Regards,
Krutarth -
Please help! How to get the report in SAP that include information of PR number, PR amount, PO number, PO amount and cost center in one report??
I try ME5A but th
ere are no information of PO amount.Thank you for your help.
I have no authorize to use SQVI as I am only the user. I will use your information and ask my SAP team to help.
Thank you again (^_^) -
Dear Friends,
I have attached my report in my .aspx file.
I am passing the condition through myCrystalReportViewer.SelectionFormula
It was showing all record's reports those are tested in CR2008.
But as soon as we have entered a new record through our web form, it is not displaying the report.
I have added "myCrystalReportViewer.RefreshReport()".
Then also it is not displaying the report for the new record entered, where as the previous records are running fine.
Can any one please tell what code should I add or steps in CR2008 to get this report after entering any record.
Thanks and regards
Edited by: Md. Mushtaque on Sep 1, 2008 5:03 PMDear The Panda,
As per your reply I have followed all steps.
Unchecked "Save Data with Report" in Sub Report
Checked the Links between Sub Report and Main Report
Now on calling the report from my web form only a blank page with TextObject's text is coming.
I Could not understand that why this is happening or what is the concept behind linking a report from Web forms.
How to get refreshed report?
Well thanks for your reply, but now God knows how to solve this problem.
Thanks again -
Is it possible to publish reports to SharePoint if SQL Server 2012 reporting service is on native mode?
How to do it?
I have SharePoint 2013 and SQL Server 2012. I have created cube and reports with its data tools. This is single server environment.
This is what I have done:
A) I can successfully see from SQL Server installation tool that "Reporting Service-SharePoint" and "Reporting Services Add-in for SharePoint Products" are checked.
B) I don't see Reporting Services under the Manage Service Application of the SharePoint Central Admin.
c) When I choose report from reporting service project and I click deploy, it asks Reporting Services Login, but it does not accept admin logins. Server path should be valid.
I got idea from following instruction that I should register and start the Reporting Services SharePoint service
http://msdn.microsoft.com/en-us/library/jj219068.aspx
C) I tried to run command Install-SPRSService, but it was not recognized cmdlet command.
D) I see from Reporting Service Configuration Manager that Reporting Server Mode is Native. Report Service Status is Started.
Kenny_IHi Kenny_I,
Since the release of SQL Server 2012, Reporting Services SharePoint Integrated mode has been changed from a Windows Service to be a SharePoint Shared Service. In this way, Reporting Services Configuration Manager no longer supports Reporting Services SharePoint
mode, and all the configurations of SharePoint mode is completed using SharePoint Central Administration.
In SSRS 2008 R2 or lower version, only one report server (either native mode or SharePoint integrated mode) can be active at one time in one SSRS instance. In SSRS 2012, the report server that runs in SharePoint integrated mode and the report server that
runs in Native mode work separately at the same time in one SSRS 2012 instance. So, in this issue, you don’t need to care about the report server that runs in native mode when you work with the report server that runs in SharePoint mode.
First, please install SQL Server 2012 SP1 which introduces more BI features.
For the issue you encounter when running the commands to register the Reporting Services SharePoint Service, it may occur if you run the commands in the Windows Powershell instead of the SharePoint Management Shell. Please launch the SharePoint Management
Shell by clicking Start-> All Promgrams -> Microsoft SharePoint 2013 Products -> SharePoint 2013 Management Shell. Then, please continue the steps in the following document or blog to create a Reporting Services Service Application:
Install Reporting Services SharePoint Mode for SharePoint 2013
Installing and configuring SQL Reporting services on SharePoint 2013
After a SSRS Service Application is created properly, to deploy the project to the SharePoint integrated mode report server, please see the project property settings in the following document:
Project Property Pages Dialog Box
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
How to get the reporting icon in cube.
hi,
i have a successful request(with all the required data) in the cube (manage screen) but i could n't get the reporting icon next to request id in the cube manage screen how to get ithe reporting icon.This might be because of issue -- data is not ready to view in the Query level. So that it happened.
Go to the 'Manage' in the InfoCube level and verify the last updated request are ready to report.
The possible causes may be
1. If the previous request may be an error in Cube level, the other requests will not be ready to report.
2. If there is Aggregate is maintaining in the Cube level, you should perform rollup to fill aggregates and made the requests available to report.
Edited by: prashanthk on Aug 31, 2010 10:48 AM -
How to get the report server name in Forms 10g.
How to get the report server name in Forms 10g.
I'm using the Application Server 10g 10.1.2.Hello,
I do not think that you can get this value from anywhere. A solution is to put the Reports server name in an environment variable stored in the /forms/server/default.env file, then to query it at Forms runtime with the TOOL_ENV.Getvar() built-in.
Francois -
How to get a report on Installed Software Updates on client computers.
Hi, I'm working with a large company who plans to deploy mac's nationwide. ARD is what we will be using for remote management of the cient systems. My question is; how to get a report on Installed Software Updates on client computers.
Thanks in advance!Hi,
Try this.
Go to SE16 give table input as T511
and select OPKEN / Operation indicator field input as A and execute.
This will give you output of wage types wich configured for deduction. -
Itunes u public - How to get daily report
Hello,
does anybody have any suggestion about how to get daily report for iTunes U public site ?
The only information I've found is in iTunes U Administration Guide for Private Site with the following example
http://deimos.apple.com/WebObjects/Core.woa/API/GetDailyReportLogs/example.edu? StartDate=2007-09-12&EndDate=2007-09-13 &credentials=Administrator@urn:mace:itunesu.com:sites:example.edu &identity=%22Jane+Doe%22+%3Cjdoe%40example.edu%3E+%28jdoe%29+%5B42%5D &signature=38bda70d9aa6975ae8756754034feb6e3c794aca4b21665f6dc85d2ed42d4f6b
but I do not understand how I can apply that for a public site.
How to get "credentials" ? What baout identity and signature? What I've is just my iTunes U Site Manger account name and pssword.
Any help is very appreciated.
Kind Regards,
DiegoFind the solution by myself.
There are two iTunes U sites with different credentials: one is the original iTunes U Public before first activation and another created automatically by the activation process. The last is the actual iTunes U Public site
managed by iTunes U Public Site Manger. The difference is the domain name of the site: if I sign in using my domain name with "-dz" added at the the end, I can access the actual credentials (Site URL, Debug Suffix, Shared Secret, Administrator Credentials) that differs completely by the ones of the original iTunes site.
No where I found information about that, neither I've received any notification mail about the domain name change after the site activation process.
Hope that can help. -
How to Implement custom share functionality in SharePoint 2013 document Lib programmatically?
Hi,
I have created custom action for Share functionality in document library.
On Share action i'm showing Model pop up with Share form with addition functionality.
I am developing custom share functionality because there is some addition functionality related to this.
How to Implement custom share functionality in SharePoint 2013 document Lib pro-grammatically?
Regards,
- SiddhehswarHi Siddhehswar:
I would suggest that you use the
Ribbon. Because this is a flexible way for SharePoint. In my project experience, I always suggest my customers to use it. In the feature, if my customers have customization about permission then i can accomplish this as soon
as possible. Simple put, I utilize this perfect mechanism to resolve our complex project requirement. Maybe we customize Upload/ Edit/ Modify/ Barcode/ Send mail etc... For example:
We customize <Edit> Ribbon. As shown below.
When user click <Edit Item>, the system will
render customized pop up window.
Will -
Best Usage reporting tool for SharePoint 2013 (onpremises)
Please suggest me best reporting tool for SharePoint 2013 on premises.
Need to get site usage summary for any time in last one year.
Need to get library/list usage summary for any time in last one year. etc.
How many peak hits and unique no of users across all levels.
Thanks, Ram ChHi Ram
We have two links “Popularity Trends” and “Popularity and Search Reports” in the site settings. By Clicking on the two links we can view the usage reports in SharePoint 2013.
More references:
http://technet.microsoft.com/en-us/library/jj715890(v=office.15).aspx
http://sureshpydi.blogspot.com/2013/06/usage-reports-and-popularity-trends-in.html
http://blogs.msdn.com/b/chandru/archive/2013/08/31/sharepoint-2013-web-analytics-report-where-is-it.aspx
http://www.prweb.com/releases/2012/8/prweb9821144.htm
Amit Kotha -
SSRS 2012 report integrated with SharePoint 2013 issue :Report refreshing after some idle time
we have SSRS 2012 report integrated with SharePoint 2013 , when we click on any toggle item after some idle time of 60 secs and try again to expand
another toggle item then complete report is getting refreshed and if we are in child report it is redirecting to parent report. . we didn’t set any refreshing property at report level. I hope there will be some idle time setting at sharepoint site
level.
what we observed.
1. there is no problem when we expand toggle items without any idle time.
2. when we open the report and expand few toggles and keep idle for 60 seconds and try
again to expand another toggle item then complete report is getting refreshed (all toggle items are collapsing).
3. If you keep idle for 60 minutes and if you didn’t do any action like expanding toggle
items it is not refreshing.
why it is happening and how to stop that complete refresh.
Surendra ThotaHi Surendra,
I have tested on my local environment and the issue can be caused by the session time out ,the time out of the report precessing, database timeout,DataSet query execution timeout and so on.
I would like to confirm that the refresh you have mentioned is the page refresh or the report reloading?
Please reference to the setting below to don't limit the timeout values if you got the report reloading:
Point to a report in the library.
Click the down arrow, and select Manage processing options.
In Processing Time-out, select Do not time out report processing or
Limit report processing in seconds if you want to override that value with no time-out or different time-out values.
If you got the session timeout that refresh the page, please reference to the setting in below article:
http://msdn.microsoft.com/en-us/library/gg492284.aspx#bkmk_session_settings_section
Details information in the article below about the timeout setting for your reference:
Set Processing Options (Reporting Services in SharePoint Integrated Mode)
If you still have any problem, please feel free to ask.
Regards
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support -
Cannot launch Report Builder in SharePoint 2013
I am trying to launch report builder in SharePoint 2013 Library i have.
I am not able to launch the report builder.
In IE it doesn't do anything there is no activity.
in firefox and Chrome it downloads the application and gives followingerror in the attached image.
I have tried following this already still not able to work
1. Installed the report builder 2012
2. Ran this in command prompt :rundll32 dfshim CleanOnlineAppCache
3.tried in compatible version in IE with IE 9,8 still same
How can i launch the report builder from client machines.
But when i try to launch the application from the server itself then it runs fine. I am not able to run it from client machines
kukdaiHi,
According to your post, my understanding is that you could not launch report builder in the client machine.
Did you install the .Net 4.0 framework on your machine?
.Net 4.0 framework needed to be installed on each user's machine, you can install it, then check whether it works.
More information:
http://social.technet.microsoft.com/Forums/en-US/ac51a022-6173-4840-96b5-32119b132bb5/unable-to-launch-report-builder-30?forum=sqlreportingservices
As this is the forum for SharePoint server on-premise, I’m not familiar with the Reporting service, for this issue, I recommend you can post a new question in the forum for SQL Server Reporting Services.
https://social.technet.microsoft.com/Forums/en-US/ac51a022-6173-4840-96b5-32119b132bb5/unable-to-launch-report-builder-30?forum=sqlreportingservices
More experts will assist you, then you will get more information relation to Reporting Services.
Thank you for your understanding and support.
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support
Maybe you are looking for
-
How much tax for the macbook air in NYC?
im looking into buying the macbook air 128gb 11.6" and i just want to know more or less how much it will be after tax along with the education discount. can anyone help? =]
-
Hi guys, i have to change a quantity in a item when I post the reserve in MIGO. For example, I have a reserve for 100 UNI of the material A, Nro.Reserv: 90000 Then, I go to a transaction MIGO and I select "Good Issue" and the system, by default, set
-
3GS doesn't work correctly with Bluetooth headset?
Why won't my husband's 3GS work correctly with Bluetooth headset? I have a 4S, and I bought a Plantronics 903 Bluetooth headset, and it plays music great out of headset, but when I tried to do that with my husband's 3GS, only one earpiece plays?
-
Error capturing SOAP fault for Sync Messages
Hi We have a Sync interface which makes a Proxy call from ECC to PI and then PI makes Soap Sync call to Web application. We are having issues when handling Exceptions. Sender is getting misleading errors in response, even though they are application
-
Hi We have around 400 cheques issued(by automatic payment program) to vendors and not cashed by them since coouple of years.Our requriement now is 1.Want to cancel or void the cheque and also simultaneously we need to rest&reverse the related documen