How to hide a column when exporting to Excel from SSRS - excel

I am trying to hide a column when exporting to Excel, although the column should still be rendered, only hidden. For instance, if I export columns A, B, C and D, only A, B and D should be visible, with C hidden.
If I set the visibility to false within the SSRS designer, it completely omits the column.
Is this possible to achieve?

If you use a column group, set the visibility as hidden and to be toggled by a textbox, it will export the hidden column and put a little + at the top of the spreadsheet to allow you to expand the hidden column.
If you're unsure what to group on, you can always group on 1 (literally the number 1 in the group by properties). This will always show a single column with whatever you then select in the textbox.

I was able to do it without grouping using Report Builder 3.0. I highlighted the column that I wanted hidden, and opened the "Column Visibility...". I set it to "Hide" when the report is initially run, and then just chose a text box (not a field) in the drop down "Display can be toggled by this report item".
Hiding the column:
Excel screenshot:

Related

Export ssrs report to excel in 1 sheet

I have two tablix in ssrs. I want all the data in the first Tablix in sheet 1, but when I export my ssrs report to excel, it breaks it down to 10 sheets.The second tablix is on the 11th sheet, which i want to be the second sheet. I Added "a page break after" on the first tablix but it is still splitting up the data from the first tablix. How do i go about this?
There must be a Page Break on a Row or Column Group in the first table that is causing it to create pages for each Group.
Click on the table and click on the drop down by the Grouping for each Group at the bottom and go to the Group Properties.
Then go to the Page Break tab and make sure that the Page Break property box is unchecked.

Insert Table header Row when column value changes

I have a table of overdue customer invoices. Each customer could have several overdue invoices and I want to collate these into separate customer tables, with a sum total of due amount.
I want this to be in one worksheet, with the header row above each customer table.
Therefore, I'm looking for a VBA macro that will go through the data in column A and when it sees a change, from one customer number to the next, it totals up the values for that customer and inserts the header row, ready for the next customer. And continues on...
Example sheet Here
Sheet(tab)1 shows raw data, sheet2 shows how the formatted data should look.
I'm stumped sorry and any help or direction appreciated. Hope the info is clear.
To get started I suggest you search google "creating vba macros read and write column"
Are you familiar with VBA macro? If not, you could use a combination of index, and match formula.
Otherwise VBA solution logic, in VBA editor - which is accessible by Alt +F11:
Click on the sheet you want your VBA code to apply to and start writing your function. For example a function to check a cell range called "myFunction" would be as follows,
A single example:
Sub myFunction ()
If range.("A1").value = "Customer1" then
Range("B1:E1").Insert([Shift], [CopyOrigin])
end If
Sub End
More work required to check condition on event, dynamic insert, and will need to be wrapped in a loop. The below are tutorials specific to the job you need to program your macro for.
VBA copy and paste code if condition is met tutorial here : https://youtu.be/qGZQIl9JJk4
VBA insert tutorial here : https://powerspreadsheets.com/excel-vba-insert-row/#Excel-VBA-Constructs-to-Insert-Rows
VBA How to SUM Totals At Bottom of a Column Dynamically : https://youtu.be/_0Vcnb3xdOM
The first question is-- What VBA have you tried?
Next, change col A heading to Customer, and col E heading to Amount
because these are the desired output headings .
Next, did you know that by dropping down View, and then Macros,
that there is a RECORD button? Click it.
Finally, it records your pressing Insert / PivotTable on a New sheet.
Drag the Amount field down to the Values box
After you drag each of the other fields to the Rows box,
left click on it in the Rows box, and select FieldSettings --
Subtotals tab -- Automatic for Customer, None for the others
Layout tab -- Show item labels in tabular form for each field
and just for Customer field--Insert page break after each item
At the end, click on any cell of the pivot, select PivotTableOptions --
Totals&Filters tab -- unclick Column totals
Click PageLayout,
then Margins -- make them narrow
then Sheet -- Rows to print at the top
Maybe Header -- Custom Header
Finally click on View / Macro
StopRecording
Presto, now the VBA has been captured.
Ok, so all you have to do is insert a Subtotal. Check out these screen shots.
Before:
After:
Depending on which version of Excel you are using, would probably determine how to navigate to the Subtotal button. Google for that, if you can't fine it. Should be super-simple.

Dynamic Filters in Excel

I'm using Office 2013, and working on a worksheet in Excel.
My question is, is there a way to create a dynamic filter in Excel?
To explain in more detail, I have a dynamic worksheet, where upon opening the user will get a few drop-down options. After the user has selected one option from each of the drop-downs, the worksheet will display a table of data based on the user's inputs. The user can change their selections from the drop-downs after the table has been displayed, and can also clear their selections. If they clear their selection, the table will disappear.
Now, the first column in the result Table will contain Text values, but can also contain blanks. These values or blanks are all decided based on the user's selections in the previously mentioned drop-downs, which are displayed permanently to the left of the table. I want to add a filter to this first column of the result table (and to the rest of the table with it) such that only the non blank cells are displayed in the table every time the drop-downs are changed.
As I understand your need correct, I can give you this solution:
For getting a better result make your range to Table.
Select Power View from Insert items;
A sheet Power View 1 will added to your workbook;
From right pane select Table1 and its fields;
From Filter pane select as you want for filtering.

How to filter by cell color?

Some of my managers have access to Office 2010 or later. I know in the newer Office there is the option to filter by cell color. But on my floor we only have Office 2003. I am wondering is there a way I can filter by the fill of the cell?
The way I am doing it right now is create another column, putting an "x" manually on the highlighted rows. And then filter it with the "x". Is there a easier way to do this? (They have hundreds of rows like that). I am using Window XP with Excel 2003.
Install ASAP utilities http://www.asap-utilities.com/
Click on ASAP Utilities tab
Choose "Select" with the big mouse pointer over it
Choose "Select cells based on content, formatting and more...
go to the tab "Based on formatting and more"
Select "cell color" and choose the example cell which contains your color
Choose your cell range and choose entire row
click ok
This will allow you to select all the rows. Color the entire rows which are now selected. Find an empty column and use find/replace to find the color just added and replace it with an 'x'. Now you can filter in this new column for x, which is just like filtering on the original columns color. This is better so you don't have to add a new character to the existing column which might contain data.

excel group with hidden rows

I have an Excel sheet where several rows are grouped together using "Group and outline".
By default the group is to be expanded but I have one row that I have hidden using vba in Workbook_Open.
After I click the [-] to collapse the group and then the [+] to expand it again my hidden row is now visible.
Is there a way to keep the hidden row hidden even after the group is collapsed and expanded again? Or is there a way to capture an event so that I can use vba to hide the row every time the group is expanded?
From a link on another site Excel VBA Trap the Group and Outline expand/collapse (Show Detail / Hide Detail) events
What it states is
the only event you can trigger with a
group collapse/expand action is the
calculation event. To do so you need
to use the SUBTOTAL function which is
aware of whether or not rows are
hidden.
I hope this helps you

Resources