How to get name of report used by different user in jasperserver - jasperserver

I am using jasper server enterprise version 7.0. Multiple users login to the server I can get the user name by using parameter - LoggedInUsername. But how can i get which report is used by the Logged in user. Is there any method to do so or is there any workaround for this?

Inside a report template (JRXML), you can get its own name calling $P{JASPER_REPORT}.getName():
And this is what you see when it's published to the server (6.4.2 in my case):
As you can see from the screenshot, the report file name and report name do not necessarily have to match.
For further details, see: http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/JRParameter.html#JASPER_REPORT

Related

How to retrieve User Management Report?

I have been using Python to explore smartsheet api in order to retrieve information for Power BI and/or user management.
Some of the reports I will like to retrieve are the ones from Account Administration tab. For example the report from "Download User List (csv)" or "Download Sheet Access Report (csv)".
Is there a report id for these, or a direct link?
The API documentation has all the details and code examples you may need.
First, list the reports the user has access to, to find the name of the report you're looking for.
response = ss_client.Reports.list_reports(include_all=True)
reports = response.data
Then once you've identified the corresponding report, use the report's id to then request a csv export.
ss_client.Reports.get_report_as_csv(
3882962191181700, # report_id
download_folder_path
)

How to call a jasper report through REST_V2 service with a specification what dataSource from repository should be used?

I have this scenario:
Created a jasper report and uploaded to JasperSoft Server:
"MyTestReport"
Uploaded report does not have a link to dataSource in JSS
In JasperSoft Server I have defined two datasources: AGD and AGL
I would like to call report through "rest_v2" service from database.
My URL to list resources looks like:
http://myserverurl:8081/jasperserver/rest_v2/resources
Q1: How to pass a correct datasource to this report?
http://myserverurl:8081/jasperserver/rest_v2/reports/reports/MyTestReport.pdf?j_username=jasperadmin&j_password=jasperadmin
Q2: Is there an option how to authenticate it in more secured way?
I don't think you can pass the datasource with the rest interface (but feel free to check that in the JasperReports-Server-Web-Services-Guide).
What I'd do is copy the report in Jasperserver and link one to datasource AGD and one to AGL. Then you can get your code to call the required report.
It's possible to integrate your application using single sign on so you don't have to pass the login on the url line (or I guess you could also use ssl)
This is covered in the jasperserver authentication cookbook which is available on the jaspersoft community site.

Requesting Report with URL Parameters

My issue is exactly the same as Mr. John Ortega's described here.
However, both of the proposed solutions have not worked for me.
If I replace "Report.aspx" with "ReportViewer.aspx" in the Report Manager URL (ex: "http://servername/Reports/Pages/Report.aspx?ItemPath=%2fFolder+1+Name%2fFolder+2+Name%2fReport+Name"), I'm given a 404.
If I use the Web Service URL structure instead (ex: "http://servername/Reports?/Folder 1 Name/Folder 2 Name/Report Name"), I just get redirected back to the home page of my report server (which is "http://servername/Reports/Pages/Folder.aspx").
So I'm not really given an opportunity to pass report parameters via URL parameters, because the report itself won't come up.
If your requirement to jump to any other report in the same report server and directory, you can use “go to report” option instead of using “go to URL”.

Need help with Zend Framework dynamic Namespaces

I want to make my system redirect unknown requests such as
www.address.com/a_company
to the adress
www.address.com/companies/company/ and display the company a_company if it exists in the database, otherwise throw the user to a 404 not found page.
So in detail, I want to make namespace that is as the first example dynamically, if the company exist in the database, I have no problem connecting to the database and retrieving information or finding a way to parse a company name, I just need help how to make my system check and run a function every time the address doesn't exist and show the second page (/companies/company/)..
I am using an Acl as well, but I think it should be fine if the page is /companies/company and then possibly add /?c=a_company or similar.
Thank you.
/Marcus
simply create a front controller plugin which checks the request params agains the database before the request is dispatched.

Facebook API - Feed.registerTemplateBundle issues

I'm trying to build a feature into my framework wrapper that automates registering template bundles. I've gotten to the point where it seems like I can do so successfully using the Feed.registerTemplateBundle API method - I don't get an error, and I do get a template id back. However, the template doesn't show up in the "Registered Templates Console", and if I try to publish a story using the id, it gives me an "invalid template bundle id" error.
Any suggestions?
I had this problem in Facebook's official example application (TheRunAround)
it was registering template but when it tried to get an id it was
using sprintf (like: sprintf('%d', ))
current template ID's are out of the 32bit range so it was returning wrong id.
May it be the cause?
Turns out there were two problems:
I was erroneously double-json-encoding the short story template
Facebook was accepting the erroneously-formatting calls and returning an id, thus resulting in the creation of "phantom" template bundles that weren't showing up in their console.
I've fixed my code, and the bug has been reported (and I believe since fixed).