We have a bunch of small single pupose reports (individual charts, tables, etc.) that we used as subreports across several larger reports. I want to sperate the subreports into their own folder on the Reporting Server and I tried to tdo this by creating a solution with subprojects and specifying different publishing folders. That seems to be going well, but when I want to add a subreport from one project to a report in another project Visual Studio doesn't seem to like this at all. It won't let me drag them to the layout surface.
Shoudl this work? Is there something different I need to be doing since I'm working with multiple projects now?
Thanks,
-p
I'm not sure it's going to work that way -- somebody else will have to confirm, not really my area -- but, if it does not, could you create a custom post-build step that copied the RDLs from their source folders to where they needed to go within each individual project?
I realize it's not ideal to replicate the files, but this would keep them up to date/synched.
>L<
|||Actually -- one more thought -- I'm not sure if this utility will do what you want, but it looks like it might -- you could check it out...
http://www.sqldbatips.com/showarticle.asp?ID=73
>L<
|||That tool is for taking one report and publising it multiple places. I want to do the exact opposite publish a set of subreports to one location and reuse them in another. The idea being that then people don't have to see the noise of all the subreports we can just use the nice well formatted project reports which include a variety of subreports as needed.
I don't think a post-build script would be very easy to maintain (or even possible) it seems that the subreport control can't refer to a report outside of its own namespace (i.e., its own folder).
|||I understand what the tool does, and in essence the post-build script I suggested does the same thing, I just thought the tool would be more "automatic".
What I did *not* understand was why you wanted to do it (the "noise" of the subreports) -- I thought it was a maintenance issue. IOW, let's assume (as we both think so far) that a subreport can't refer to a report "somewhere else". Since we don't have control over that, both the tool and the postbuild at least make sure you don't have to *update* all the copies of a single subreport that you've had to "litter" all of your projects with, if changes have to be made.
I agree with you 100% about the "noise/litter" issue and I wish I had a better solution to offer.
FWIW, I have a similar problem: I wanted to set different deployment folders for different reports in a *single* project <shrug>. Yes I know you can do this in different configurations. I want to have my "Production" configuration deploy all reports to the same server, but different locations on that server. IOW, I would like to have a single reporting project that serves a whole bunch of different departments, each of which has a different reporting folder with its own set of permissions assigned to it.
I suspect the problems are connected. IOW, if it's really true that reports can only reference other reports in one folder, then if you could deploy the way I want to it would break the subreport references...
>L<
|||Interesting note:
You can specify project interdependance, among subprojects, which implies that one subproject can reference another somehow. (otherwise, why would you need to set one project to be dependant on another)
|||Of course one project can reference another <s>. That applies when (say) I build a report that references a custom code DLL or -- more commonly in my case -- I build a solution that has some black box code in C# and white box code in VB.
The "somehow" is by instancing classes from other DLLs...
I think what we've been saying in this thread is that, if the same applies to different *report* projects, we don't understand how it works and haven't gotten it to work the way we might have expected it to.
As an example, and one we haven't discussed in this thread yet: suppose I create a second report project in a solution and make it dependent on my first report project. When I want to create a report, can I use a shared data source from the first project? As far as I know... not. FWIW: I have tried referencing the shared datasource in a "solution folder" but that doesn't seem to do the trick.
>L<
|||Ah, I had wondered what it was for. I have not delved much into custom code for RS yet. I am still primarily a SQL person.
The only solution I have found thus far is to use Source Safe to share my subreports between projects, ala the tool mentioned previously.
To get around the messy listings all these subreports creates, we're building a simple web front end to redirect the users to the correct report.
|||I have one big project,
within that I have sub projects that publish the reports under them to a different folder on the report server... something like..
Accounts Receivable.
AR Reports
Accounts Payable
AP Reports
etc...
Data Sources has it's own folder.
If I have a AR subreport I want to share with other reports in that folder I simply share them.
If you are going to have a sub report span multiple projects then you need to copy the sub report from one project to the other which in vs2005 is simple as highlighting the sub report, ctrl-c then goin to your other project and press ctrl-v.
you can also have a sub folder in your main folder to hold sub reports.
lots of ways to do it.
|||You can have one solution and multiple sub projects and have each sub project publish to a different server and/or folder, That seems to work just fine and I think as long as there was no overlap in the reports it would meet your needs.
For reports you want to put in multple locations you'd either need to use the tool you reccomended or copy the report into each project as a later poster reccomends.
I think we're all in agreement that there is no way (or we don't know how) to have a subreport be from a different project than the main report.
Anyway, I guess I'll go back to a single project and make up some clever naming schema so the main reports are at the top of the list and the subreports are at the bottom OR mark the subreports as Hidden. I've not played much with that. I hope I can do that from Visual Studio or if not that when I set it in the Web UI its not overwritten each time I deploy.
Thanks,
-p
|||Are you letting your users see the reportserver directory as it stands?
You might want to consider doing a little webpage that reads a table that lists where the reports are.
My company has implemented this type of thing.
We have a webpage where the user selects which report group they want and then hit a button and get a list of reports that match...
It is two tables, a group table and a reports table. inthe reports table we have a friendly name for the report and the location to where it is..
works fine for us and the users NEVER see what we don't want them to.
|||The Original querstion was not answered, but I worked around this by keeping all of the reports in one project and then marking the sub reports as Hidden on the server side.
This setting is preserved even after you re-dpeloy a report. Kind of hard to setup, but bearable.
I wish the original method of using projects with different target folders woudl work though, that would be best.
|||If I understand your original question correctly, you can use a report from a different project as a subreport.
Let's say that your subreport is "MySubReport.rdl" in project "MyProjectA" and you want to use it from a project in "MyProjectB". Both projects have the same TargetServerURL and the same parent folder (e.g. TargetReportFolder is set to "MySolution/MyProjectA" and "MySolution/MyProjectB").
In Report Designer, drag and drop a subreport item onto your report. Set its subreport property to "./../MyProjectA/MySubReport" and manually set any parameters.
Hope this helps.
No comments:
Post a Comment