Hide a field/paramater in SSRS - sql

Is it possible to hide a field in a SQL 2008 Report, based on the value of a parameter? I'm leaning towards a custom application and if push comes to shove I'll have do manually code each piece, but I would like to leverage SSRS as much as possible. I've included a screen shot of the report before it is populated. The area in red is what I would like to hide say, =iif(X=1,true,false)

Set up the Expression In Text box Property >> Visibility >> Show or Hide on axpression.
=iif(X=1,true,false)
Hope this help..
Look for the screen shot and more detail click here
using SSRS manager, Parameter field cannot hide programtically. but you can create asp.net webform with SSRS report. MSDN link

Related

Disable navigation on clicking Sub report from main Crystal Repert - VB.net

How to disable navigation to the sub-report when clicked on it? I have report with 1 sub-report that displays Company information and I need to disable it once it has been clicked by Customer.
it can be disable from crystal report viewer control.Use
CrystalReportViewer1.EnableDrillDown = False
this will work for crystal report 2008 or above.
Edits:
AS per comments by Question owner,in order to disable just navigation.there is no defined way.but it can be achieved by some other means.
"Create an empty text cell that is as wide as the report, and use it to "cover" the clickable fields to prevent drilldown.
Seriously, this is the only way we've found to do this. This is also documented on the BusObj support knowledge base (http://support.businessobjects.com/library/kbase/articles/c2013204.asp)"
for more information,Refer the link Disable Navigation

JasperReports dynamic input controls

I'm currently trying to create a JasperReport report with some special input control behaviour. My needs are:
four input controls, two of them are dateboxes, the other ones are radio buttons
depending on radio button choice, one of the databoxes should be visible or not
so if option 1 is chosen, show both dateboxes; if option 2 is chosen, show only one datebox
I wonder if there's a "clean" solution - didn't find anything.
Any pointers will be helpful.
The Print when expression is not relevant for input controls on JasperReports Server.
There is no built-in support for hiding and showing an input control based on the value of a different one. The infrastructure for cascading input controls can certainly be extended to achieve this... but it would not be trivial.
The path I would take is to customize the .jsp page that displays the input control. There is a section in the JasperReports Server Ultimate Guide called "Customizing the Input Controls Form" which would get you started down this path.
For datebox part, you can use print when expression to decide whether certain blocks of the report is visible.
For other "input", if you meant some data you want to display inside the report, you can make some Parameter in your report, then set the Parameter from user input before you export the report.

ReportViewer: two text colors, one cell

Is it possible to have 2 areas of text in one cell such that each can have a different color? You can do this in crystal reports but I cannot see a way to do this in ReportViewer. What it is doing is essentially highlighting an important text fragment if it appears in a cell description to draw the users attention. I am fairly new to reportviewer so it for now I am assuming it's my lack of knowledge that is making this difficult. I am using VS2010.
Thanks.
Turns out VicarlnATutu wasn't quite right.
You can do this, but only if you are using VS2010 (which I am) because it includes the new SSRS rendering engine for SQL-Server 2008. This allows you to put some basic HTML into a field and have multiple formats in one cell. For more info see below:
http://msdn.microsoft.com/en-us/library/cc645967.aspx
http://msdn.microsoft.com/en-us/library/cc627491.aspx
One thing that tripped me up is what they call a 'placeholder' in the MS documentation is the little bit of text inside the textbox control that shows up by default. You can select two different things on the control in VS2010. One is the textbox itself. Right clicking on the textbox gives you 'text box properties'. The other thing you can select is the default text INSIDE the textbox. Right clicking on this 'placeholder' text gives you a different context menu where you can select 'placeholder properties'. This is where you can change the cell to accept HTML.
No, unfortunately not. I don't know if there are custom controls out there for ReportViewer, but the built-in TextBox only supports setting color (be it Foreground or Background) for the entire thing.
ah, good to know. kind of a unintuitive way to tell a TextBox to display HTML, but nice to know that you can!

Displaying multiple Reports in a single report viewer

i want to know is it possible to bind my all crystal reports to a single reportviewer, somewhat in tabbed view or treevie. If tabbed then visible through navigation button.
If yes then how?
any help would be highly appreciated.
Amit Ranjan
Having reviewed the micrososft documentation, it seems you can not bind multiple reports to a viewer. As suggested here:
"Displaying a report using the CrystalReportViewer control
The CrystalReportViewer control displays only one report at a time. Which report is displayed by the control is determined by which report you bind to your code. To tell the control which report to display, you bind the ReportSource property of the control to a particular report. At runtime, the control loads the report that is bound to the ReportSource property and displays it. "
The diocumentation goes on to say you can only bind a report type to the report source.
So, basically you need to build the multi view yourself. In my mind this can be done in two ways.
Create a report viewer for each
report (maybe using a tab control)
Create a single viewer and display
different reports based on what the user
selects in your application. i.e.
I have done something simular in the past, but rather than using the report viewer, i used crystal to export the report to pdf and displayed those to the user.
I hope this is clearer. :-)
Could you not hold your reports in a hierarchical structure in memory , which relates to a visible tree view and displayed the relevant report one at a time as the users selects various nodes..
If you can't pass a colection of reports to your viewer. I would hold a list of reports in a Dictionary or some other kind of list , which has a report and an identifier for that report.
Then display a tree view which represents the reports structure you have, with each node holding the id of the report it represents, when the user selects the a TreeView node, you can look up you report from the dictionary and load it into the report viewer.
I hope that makes sense...

DataSet panel (Report Data) in SSRS designer is gone

In the layout screen of an SSRS designer e.g. Visual Studio, I have lost the report data panel.
It has disappeared and I can't remember what it is called in order to get it back.
This usually lists the following items:
Built-in Fields
Parameters
Images
Data Sources
Datasets
Previously it was in the same area as the general Toolbox and Server explorer panels.
Does anyone know how to restore it?
With a report (rdl) file selected in your solution, select View and then Report Data.
It is a shortcut of Ctrl+Alt+D.
If you are using BIDS with SQL 2008 R2 you can only get the "Report Data" menu by clicking inside the actual report layout itself.
Click inside the actual report layout.
Now select "View" from the main menu bar.
Now select "Report Data" which is the last item.
With a .rdl, .rdlc or similar file selected, you can either:
Click View -> Report Data or...
Use the keyboard shortcut CTRL + ALT + D
For future people CTRL+ALT+D or just view > report data in ancient ssrs 2008 VS BI. In newer 2017 SSRS, it's still the same. Funny how they change a bunch of things around, yet kept this the same.
View -> Datasets (bottom of menu, above Refresh)
First you have to click on the report, Then
View -> Report Data
If you are working with SQL 2008 R2 then from View---->Report Data option at bottom