I am working on Telerik Reporting and I need to hide/show Extension column base on the users input. Can I do this using a filter or report parameter?
The table column is just a virtual grouping instance of all the report items in the cells of that column (textboxes, panels, etc.). Therefore you can just add a ConditionalFormatting rules to the textboxes in that column, setting their visibility according to a report parameter value.
Related
I am building a report in MS Access based on a crosstab query. Therefore I do not know the number of columns or column headers in advance. I have created a template report with one column. In VBA I make a copy of this template report. Using the report recordsource, I then add labels to the report header and textboxes to the report detail and give the report headers the correct name. I set the label and textbox properties using the settings of the label and textbox from the template report. All this is done in VBA.
Is there a better way to create a report with dynamic number of columns? If not, using VBA, is it possible to add columns to the report grid and snap the labels and textboxes that were dynamically created to the grid.
I have a query that returns relevant data about inspectors and how long it takes them to respond to issues. The only parameters are a BeginDate and EndDate so for any given date range there could be anywhere from 0 to 100 inspectors.
I am using only one dataset and it contains an "Inspector" field that I'm hoping can be used as a filter to create as many tables as there are inspectors.
I know you can set filters on tables but from my (limited) SSRS knowledge, you must already have the tables created and the filters are typically hard-coded. What I need, is some way for the report to see how many Inspectors there are in the dataset and group those records into their own tables, repeating the same one created tablix over and over as needed.
This is being done strictly in SSRS 2012, not using a ReportViewer where back-end code could help me out unfortunately...
I don't have any code examples to provide, like I said I know you can do filtering but I am at a loss when it comes to doing something like this dynamically based on data... Sorry.
Depending on the report design you could either...
Single report with grouping
1. Create a single tablix.
2. Create a row group by Inspector and then add whatever fields you need to the details section.
3. You can optionally set page breaks between instances of your Inspector rowgroup from the rowgroup properties.
Sub report method
1. Create a subreport that accepts a parameter (InspectorID for example).
2. In the subreport filter the dataset using the parameter passed in so it only return data for a single inspector.
3. Add whatever controls you need to the report to handle a single Inspector
4. Create a main report
5. Add a dataset that gives you a simple distinct list of Inspectors, this will be used to pass parameters to the subreport.
Lets assume it just contains a list of InspectorIDs.
6. Add a list control to the report and set it's dataset property to the dataset that contains your list of InspectorIDs
7. Right-click in the list control's 'cell' and insert a subreport.
8. Set the subreport property to the subreport you created earlier and set that parmameter IsnpectorID to your InpsectorID field.
This will produce a subreport for each instance of inspector it finds.
Sorry about the format of this answer, in a rush!
I've created many SSRS reports with multiple tabs, and am able to name the tabs at will using the page break/page name section of the properties window for a given tablix.
What I'm trying to solve for now, and can't find any good answers on the web for, is to create new tabs based on the result of my dataset.
The simplest example of which would be a new tab for each year of data, so now that we are in 2017 I would expect the report to add in a new tab for 2017 data (this is just a hypothetical example).
Is this possible in SSRS-2014, or do I have to settle for manual updates/additions every time I want a new tab?
You can do this. What you need to do is put the controls in the body of your report into a List control. In the Details group properties of that List control, group by year and set it up to page break between each group.
The basic steps are in the answer here below.
Create a new report with an empty body.
Add the Data Source(s), Parameter(s), and Dataset(s) that are needed. Make sure to include Year in your main dataset.
Add a List object to the body. Drag and drop it into the body from the Toolbox.
Set the Dataset for the list to the main data that has the year in it.
In the Row Groups pane of the Visual Studio report designer, right click on the Details row, and choose Group Properties. On the General page, click the Add button under Group expressions, choose Year from the Group on dropdown. This assumes you are getting this in the data.
While in the same dialog, go to the Page Breaks page and check the Between each instance of a group option. Click OK.
Add a Tablix inside the List. This is what will show your data.
Add some fields to the Tablix.
Run the report.
If your data returned information across more than one year, upon export to Excel, you will have one sheet for each year.
To set the sheet labels, you set the PageName property on the List detail properties pane.
Click the List control
In the Row Groups pane of the Visual Studio report designer, click on the Details row
Find the Page Name property in the Properties Pane, and set the expression to the Year value from the dataset =Fields!Year.Value
Now the sheets should be labeled with the year.
Per alejandro zuleta's comment, Set the desired group properties to page break between each instance of the group, when the report renders to excel it should interpret this as a sheet break.
If your group is dynamic, so too will the number of sheets.
You may also consider having a nested table (one table inside the other) where the "parent" table has no header and a single group (and cell) that controls your pagination. for instance; in your hypothetical, you could set the grouping to be something like =YEAR(fields!date.Value). then the "child" table contains the headers and groups that make up the report.
I have created one report in SSRS-2012. I need to show/hide(not inactive) one parameter based on one formula. Is it possible. I am using Visual studio 2010 for my front-end development and report viewer control for showing the report.
Help me please
Currently there is no way to dinamically hide parameters in SSRS. Depending on your requeriments you may have two ways to handle this issue.
Create one subreport for all parameters and another subreport that does not include the parameter you want to hide, then show dinamically the subreport to the user based on your expression.
Other option is have another parameter set as internal. And conditionally populate that parameter based on your expression. If your condition yields true, populate the parameter with the user selection, otherwise use a default value or populate it to null. At presentation level your parameter keeps appearing but the user selection will take effect only based on your expression.
I think the second option is easier, let me know if you need further help.
I have a report where I have about 5 fields right next to eachother that dont return data in about 90% of the reports. Is there a way to hide these fields if they are empty otherwise display them if they do contain data?
Thanks
You can suppress columns conditionally in the report designer in SSRS, by selecting the table column and editing the Visibility>Hidden property (in the Properties window) to be the suppression condition.
Note that if the suppression condition is False at any point in the report, the columns will be displayed throughout the whole report.
Yes, you can write VBScript in the RDL file to display the field if it is not Nothing and the like.