Jump to content

Copying a Dashboard from one Organization to Another


cbarlow3

Recommended Posts

With superuser access to JasperServer, I can create a new organization, I can copy reports, dashboards, etc. from one organization to another, and in the destination organization, I can change the data source for each report (either one at a time in JasperServer, or presumably in an automated loop via the JasperServer web services, although I haven't gotten around to building a working web service client for that yet).  So far, so good.

BUT...when I try to run a Dashboard in the destination organization as a normal user, it complains “Error Message: You may not access resources which do not belong to your organization”.  That makes sense, because when I run that same Dashboard as superuser, I see that it is actually running the original reports in the source organization that also point to a different data source.

So it appears that a Dashboard contains some kind of full pathname to the reports that are included...all the way from root/organizations...rather than a relative pathname starting with the actual organization the dashboard is part of.  Not only is that a problem for me (obviously), but unlike a Report, JasperServer doesn't have an "Edit" option, I don't know of any way to bring up some kind of dashboard xml, I don't see that there are any JasperServer web services that could address this, etc.  Unless you're superuser, you can't even "Open in Designer" (not that it would be much help--you'd still have to delete each report and replace it with its counterpart in the destination organization, resize, etc.).

Anyone know how to get at the guts of a Dashboard?

Carl

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1. I understand that ur first issue is a BUG. can u please file bug on it in tracker. [ absoluytes vs relative path for reports in dashboards]

2. Regd second issue , Joeuser cannot "open in designer" dashboard. This is not an issue. If the ROLE_USER has permisison, read + write + delete for the dashboard, he is able to "open in deisgner = EDIT" the dashboard and change the reports and use the right reports . so, this is not right that only superuser can "open in designer " the saved dashboard. it is more controlled by permisisons ..

hope it helps ,

 

ramnik

 

 

 

Ramnik Kaur

Senior QA Engineer

Link to comment
Share on other sites

Well, if the first issue gets fixed, the second issue won't be an issue.  Right now NOBODY can open the dashboard, because it errors out.  I have to delete the dashboard and redesign it from scratch with the right reports.  But even if I could open a dashboard and one report at a time drag the (bad) report off the screen and drag back on its good twin that is in the current repository, that would be too much manual work...even more than I had to do going into "Edit" (not the designer) for each report.

I think that if Dashboards kept relative repository names instead of full pathnames (or there were at least an option to do that), then copying a dashboard from one repository to another would continue to work without any manual intervention, assuming that the appropriate reports were also copied over, naturally.

I'll file a bug report (my first!).  Thanks.

Carl

Link to comment
Share on other sites

  • 7 months later...

I'm still on 3.7, but based on the documentation, I don't think there's any change to this situation yet.  I HAVE made some peace with how copying a REPORT from one organization to another works.  There's a lot of manual work involved, but if I want to copy a lot of things from one org to another where the reports are the same, but they're all supposed to hit a different instance of the database (maybe nobody else does things this way...for us, that other instance might be a test directory, it might be a month-end backup where reports can be run repeatedly and have results that agree with each other because no actual transactions are happening, etc.), the basic method I use is this:

1. I copy and paste several folders over from the source org to the destination org, using the Repository Navigator.

2. I first modify the data source and kind of work my way out from there...next I modify all my queries (which I keep in a Queries folder) to point to the correct data source.  Then I modify all my library of Input Controls that are based on these Queries (again, in a special folder) to point to the correct copy of the queries.  I don't need to change the things in my Public folder (like input controls that don't use a query), because they don't access the database.

3. Lastly, I go through each report and change it to point to the right data source.  AND I have to also change any links to input controls that use database queries.  This last one is the most difficult, because when you go to modify a report input control that is really a link, it really has you editing the input control itself.  If I copied a report from org A to org B and then I go into report B and try to modify an input control that uses a query, what I will see is a reference to a query in org A.  If I change that to point to my query in org B, I've just modified the input control from org A to use a query in org B.  Now neither version of the report will work!  I can not find a way to JUST modify the link attribute itself...that is, which copy of an input control a link points to.  Instead, I need to delete the input control link and create a new one.  Which isn't horrible when there's only one, but when there are multiple ones, you have delete ALL of them from your first one on and recreate them in the same order if the order is important to you and your users, because I ALSO don't see any method of reordering the input controls for a report via the Repository Navigator (or directly in JasperReports Server edit, for that matter).

So...NO way I know of to copy dashboards and then edit properties to get them working again, and a LOT of chances for mistakes if you try to copy a report from one organization to another.  Once it's working of course, making a mod to multiple versions isn't so bad...each one is a right-click and replace away from being updated.  But it would be nice if when you copy/paste there were some kind of checkboxes that let you control having all the organization-specific references be updated automatically.  I think you would still have to be careful to copy things over in the right order (you couldn't copy an input control over if you didn't already have copies of the queries it uses, for example), but you wouldn't need to do all that risky and tedious manual work if you did it in the correct order.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...