Find the original report of a linked report in SSRS - reporting-services

How to find the original report of a linked report in SSRS. Could anyone let me know how to find the main report of a linked report in the report manager.

To find the original report open Report Manager (YourReportingServer/Reports/Pages/Folder.aspx) in your browser and select 'Manage' in the option menu of report.
There in properties you can see 'Link to' field that's the main report and you can change it here.

You can also query in TSQL the list of linked reports.
SELECT
[Original_Report] = [prt].[Path]
, [Linked_Report] = [rpt].[Path]
FROM
[ReportServer].[dbo].[Catalog](NOLOCK) AS [rpt]
LEFT JOIN [ReportServer].[dbo].[Catalog](NOLOCK) AS [prt] ON [prt].[ItemID] = [rpt].[LinkSourceID]
WHERE
1 = 1
AND [rpt].[Type] IN(4);

Related

How to SSRS DrillThrough with multiple rows & multiple parameter

Hi currently i am doing a SSRS Report & i wanna make a drillthrough action
may i know how to make drillthrough depends on rows?
i had try like this & still not working
=SWITCH(ROWNUMBER("ReportDetails")=1 ,"Jan"
ROWNUMBER("ReportDetails")=2 ,"Feb")
my desired output
1 main table & 1 sub table
like if i clicked on the feb's amt then will drillthrough to the feb's details, if i click on jan's amt then will drillthrough to Jan's details
The basic process is as follows.
Create a new report that accepts 'Month' as a parameter.
The dataset should filter based on your parameter so it may look something like this...
SELECT * FROM myDetailTable WHERE Month = #Month
Test this is working by manully setting the parameter and once you are happy with it, go back to your main report.
In the main report, right-click the cell that you want the user to click on to drill into your new report. This could be any textbox in the row, for exmaple the 'Amt' column. When you right-click, choose "textbox properties" then click on the "Action".
In the Action dialog, select "Go to Report", select your new subreport (the one we created above) in the "Specify a report" drop-down.
In the paramaters list, add a new parameter,
In the "Name" column 'Month'
In the value column, select the name of the dataset column that contains your month, for example [Month]
That's pretty much all there is to it.

SSRS Subreport disappears after page is changed

I'm using Visual Studio 2019 with SSDT(SQL Server Data Tools) and "Microsoft Reporting Services Projects" to create a SSRS Report. In this Report I have several Subreports to show detail information.
It can happen that one of the subreports shows no additional data. In this case I still want the structure of the Subreport to be shown, like this (table structure with thinner Bordes is the Subreport):
But when I switch to another page and back to this page of the Report, the structure is gone:
This seems to be the case, when there is no information in the Subreport.
There are no visibility properties set, neither in the Subreport nor in the "parent"-Report, so everything should be visible all the time.
Yes it will happen because your sub report does not return anything and hence the blank.
For Testing just try running one of your sub report only (without main report) with parameter which does not return data and you will see your sub report page is completely empty
Now how to solve this issue:
For your sub report:
I would add static table (without datasets) and add it on top of your tablix.
I will add visibility rule to this static table to show only when your datasets does not return data. so that this static is visible only when original subreport data is not available, else you have your subreport data been shown.
This happend because SSRS think should hide the subreport since all the dataset are empty (or the only one you have) so to avoid that in your subreport just add a new dataset with
'select 1 as one'
that will do the job

How to enable "When Run" column in SSRS report manager

How to populate When Run field in ssrs report manager?
When you click show Details in Report Manager the last field is not populating.
If you really need to find out when a report was last run, you will get a lot more information going into the ReportServer database directly.
This will get you what you want:
select C.[Name]
,C.ExecutionTime
,max(EL.TimeStart) as LastRunTime
from dbo.ExecutionLog as EL
inner join dbo.[Catalog] as C
on EL.ReportID = C.ItemID
where c.[Name] = 'Your Report Name'
group by C.[Name]
,C.ExecutionTime;
Though I would recommend having a look around Catalog and Execution Log to see if there is anything else that you may find useful, like the report parameters that were used, how long the report took to run and who ran it etc.

Print description from Report Properties to report footer.

Is it possible to use the Description Field in the Report Properties and print that on the footer? I have looked and did not find anything.
You can I think but it is a lame answer. You need to deploy the report and then check the catalog table in the ReportServer database of what you just deployed. As far as I have ever read or tried the 'Globals' and 'ReportItems' do not contain it, yet the database does. EG:
Create a variable named ReportName and have it's default be
=Globals!ReportName
Ensure the parameter is set to 'Internal' as you don't want users to see it.
Create a data set to get the name and description of your report
SELECT Name, Description
FROM ReportServer.dbo.Catalog
WHERE Name = #ReportName
Drag and drop the 'Description' of the new dataset to your Report Footer.
You must first deploy the report for the item to be in the catalog as the database is what is on the hosted server. Not what you are working on in BIDS.

Report Builder 3.0 does not generate clickthrough links

We are in the process of updating from the SSRS package in SQL 2005 to SQL 2012. SSRS seems to work fine, even with the original report model, but none of the reports we create have clickthrough functionality. Even if the entities are linked in the report model, the table simply doesn't have any clickthrough links. The older reports carried over from the SQL 2005 SSRS do still have the functionality however.
We are using the enterprise version of SQL, which claims to have the feature. Is there a manner in which I need to turn it on?
Clickthrough doesn't only matter on the underlying reporting server's capability which supplies the data, but also if the report designer application (in our case Report Builder 3.0) support it too.
#djangojazz is using SSDS (successor of BIDS) in his solution, and it also requires cubes. I think #ChargerIIC wanted to use Report Builder. It seems that Report Builder 3.0 is not a successor of Report Builder 1.0 in all respects. Particularly this clickthrough feature may be a difference.
See Report Builder 3.0 FAQ: http://download.microsoft.com/download/7/F/D/7FDAA75C-1273-4DFE-8EC6-D9699C3EE47F/SQL_Server_2008_R2_Report_Builder_3_0FAQs.docx
See the question: "What are the key differences between Report Builder 1.0 and Report Builder 3.0?". The last row in the answer table is crossed out, but it says that 1.0 support infinite click through, while 3.0 is manual.
"Q. Is this a replacement for Report Builder 1.0?
A. Not for this release. It does replace Report Builder 2.0 but there is still some additional functionality from Report Builder 1.0 that did not make it into this release that has been prioritized for a future release."
To set up a drill through report for a master report you must have two reports. For the sake of simplicity I will keep my example super simple. Let's start with the drill through report as that is the lowest level. For both examples assumple you are using a Shared Data Source you make up. This is written with instructions for 2012 Business Intelligence Development Studio assuming you are in a Report Solution for SSRS and a working SSRS Project. You get to this with All Programs > Microsoft SQL Server 2012 > SQL Server Data Tools (Once you open it, it will be called Business Intelligence).
Create a new 'Item' for a blank report and call it 'SubReport'
Open up 'Report Data' and add your Shared Data Source
Right Click 'Parameters' and 'Add Parameter'. Add a simple text parameter and call it 'Prompt'.
Open the 'Toolbox' and drag a text box onto the surface.
Type in 'Hello from [#Prompt]'. You can test the report in 'Preview' mode and see that you can pass whatever text string you want to it to get a value.
Now for the master report, repeat steps 1 and 2 but call the report 'MasterReport'
Add a 'DataSet' by right clicking the 'DataSource' you just created and click 'Add DataSet'. For example I will just create a super simple set I call 'People'
DECLARE #Person TABLE (person varchar(8)); INSERT INTO #Person
VALUES ('Brett'), ('Sean'), ('Chad'), ('Michael');
SELECT TOP 100 *
FROM #Person p
Now go to the 'Toolbox' and drag and drop a 'Table' element onto the report.
Click on the most left 'Data' cell of the 'Table' you just dropped and hover over it and select the little box that appears in the upper right and you should see a column named 'person' that matches my dataset above. Select that and the cell and header will now be populated.
Now for the real magic to actually happen.
A. Right click the cell you just created and 'Text Box Properties'.
B. Select 'Action' on the left pane.
C. Choose the radio button 'Go to Report'. (More options now appear)
D. Under 'Specify a report:' select the dropdown for the value 'SubReport'
E. Under 'Use these parameters to run the report:' click 'Add'
F. Under 'Name' you will see the parameter name 'Prompt' from the report we created in step 3
G. Under 'Value' select '[person]' which is from the dataset we created in this report in step 7.
Preview the report and now when you 'hover over' values in the table a pointer appears. When you click on a cell you DRILL THROUGH to the other report in a new screen.
I hope this helps, the important thing to keep in mind is that you can isolate your logic to seperate the two reports as distinct entitites that are loosely coupled by passing values from one to the other. You can make the parameters hidden, make more of them, you can nest the report inside of your cell if you like, etc.