conditional run report SSRS - reporting-services

what I need to complete: My report has a parameter: A or B. When A the report run table A. when B report run table A and table B (but when exported to Excel, table A will show up in sheet1, table B will show up in sheet2).
the problem: when choose parameter to A, the table A run, table B not show but exported to excel, still show sheet2 as a blank page with report header.
So far, I put condition on visibility to table B to conditionally show table B. and change a report properties (ConsumeContainerWhitespace = True)
how to get rid of the extra sheet when only run TableA? thanks.

In the properties for the last Tablix on the report (which is expected to be the last worksheet upon exporting to excel) - set the Page Break > Break Location = None.

Related

SSRS Multi Value Parameter

I have a report having two tab-lix and also two data set(e.g=dataset1,dataset2) for each tab-lix. When i am generating report by passing the multiple parameter location id(38,39 & 40) value if there is no record of id-38 in dataset2 i want blank space but in my report it is showing report of 39. But i want if there is no data in data set based on the parameter it is showing only blank space.Because always dataset1 having data and so it showing properly.When i am generating report with multiple parameter(38,39,40) it showing tablix1 of 38 parameter but tablix2 of 39 parameter in on page because of there is no data in dataset2 of 38 parameter.So i want to display a blank space on behalf of tablix2 if there is no data.
Give me a solution.
This answer assumes you have a table that contains all locations e.g. DimLocations, if not you should consider creating one.
You can then change your dataset query to be something like.
SELECT loc.LocationID, t.SomeColumn, t.AnotherColumn
FROM DimLocations loc
LEFT JOIN myTable t ON loc.LocationID = t.LocationID
WHERE loc.LocationID IN(#myLocationParameter)
This will ensure that you get a record for each location as long as it appears in the DimLocations table.
If this does not help, edit your question to show the dataset query you are using now and the structure of your locations table (if you have one)

column hyperlink and pass data from master report to other report

I have a requirement to display data from table1 on reports. For this, i have created two reports: Mainreport and IdDataReport
Table1: Id, fName,lname,isactive.
Mainreport: It displays all columns - ID column should have hyperlink only if isactive=true else no hyperlink.
IdDataReport: This report should display other data based on ID value that comes / selected from this "Mainreport" report.
What i have done?
I went to Mainreport report "ID" textbox->Actions -> Goto report ->fx -> iif(IsNothing(Fields!isActive.value)=True,Nothing,"IdDataReport")
After performing above I'm getting data.
Problem: 1. Mainreport - 'ID' column records are having hyperlink (showing hand icon) irrespective "inactive=false".
2. Selected "ID" column value on "Mainreport" not going to "IdDataReport" report and not displayed selected value related data.

SSRS - Naming Excel Tabs based on Page Number/Contents

My SSRS Report has two 'pages'.
The first page [run time] shows a Text Box with the Criteria used for returning data.
The next page[s] has all the data.
I have given the Tablix Member for the Data pages the Page Name of 'Detail'.
When the report is exported to Excel, it is displayed on two Sheets.
The first Sheet [with the Criteria] is named "Sheet1".
The second Sheet [with all the Detail Data] is named "Detail" - which is how I want it.
How do I get the First Sheet [... currently being named "Sheet1"] to be named 'Criteria' when it is exported to Excel?
Can I use an Expression somewhere that says something like this:
IIf (PageNumber = 1, "Criteria", "Detail")
?
Thanks in advance!!
You don't actually need a conditional expression for this. You can use the PageName property to control the sheet names. You can give each table a separate page name. If there are no tables on the first page, insert a rectangle and give that a page name. In the Report properties there is also an InitialPageName you can use for the first page. Lastly, make sure that you do have a PageBreak defined, don't just let it roll over to the next page based on the height.

how to change sheet name in report-builder 2.0

I am building a report using report-builder 2.0 and i want to change the name of sheet while exporting data from ssrs to excel
Is there any way to change the name of default sheet name to custom sheet name ?
You can name the PageBreak in the properties of whatever it is configured for. For example, I have a report that has 7 different tables with the intent of it being exported to Excel with each table being its own separately named sheet. With the exception of the first table, every table has a page break configured for before the tablix. When I select the tablix, and go to properties, I can then name the PageName to whatever I would like the sheet to be named.
If I were to have the page break occur based on row groups in the tablix, I would select the Row Groups from the tablix, go to properties, and the page break, and then modify the PageName.
I also not found in report builder 2.0 version, I changed pageName by editing report file on 3.0 version cause there available pageName proporty. There is no any conflicts to editing with newer version.

Grouping In RDLC/SSRS reports

I am new to SSRS/RDLC reports and I have to create a report . I have two data sets and in the two sets i have an year field I have to group it by year . First dataset 1 should come based on year after that dataset2 should come according to year.
Thanks in advance
It appears that you have two options:
A)Use the Lookup Function to link your two datasets together.
B)Use a subreport(Easier):
Create a three row tablix.
Row 1: Column Headers
Row 2: DataSet 1 Data
Row 3: A Subreport.
Create a second report for your second dataset. You can then add it into the report by following the steps below.
1.Go to insert > Subreport and click on the third row. This will insert the subreport into the tablix.
2.Highlight all the cells in row 3 and press merge.
3.Right click the Sub Report > Properties.
4.In the text box entitle 'Use this report as the subreport' enter the URL from the second report.