.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to hide information based on whether the report is being printed/exported

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :Sql Server


I have created reports with drill thru functionality. I use a blue foreground and bold font to give the user hints as to what they can drill into.

I would like to be able to turn off the blue, bold, and even the drill thru action when the report is being printed or exported.

I have thought of basing those properties on a hidden/non hidden report (ex. @ShowLinks) parameter, but the best scenario would be if I could determine (via a global variable) whether a report is being exported or printed rather than the user having to remember to set a parameter.

Any ideas?



View Complete Post

More Related Resource Links

RDLC Report Hide Export Option

The article RDLC Report Hide Export Option was added by mandandeo on Sunday, August 15, 2010.

protected void ReportViewer1_PreRender(object sender, EventArgs e) {DisableFormat(ReportViewer1, "Pdf"); }protected void DisableFormat(ReportViewer viewer, string formatName) {const System.Reflection.BindingFlags Flags =System.Reflection.BindingFlags

how to hide/display controls in NewForm.aspx based on dropdown value in SharePoint list



I have 1 dropdown in my sharepoint list with other columns. If dropdown value equal to 'xyz' i need to display some other controls, otherwise these controls should be hidden.

I know we can achieve this with javascript. If any one can provide code or sample then it will be appreciated. or is there any other alternative methods to do this ........

Thanks & Regards, Neerubee

CrystalReport:- The report you requested requires further information.

Hi Guysi am trying crystal report first time and i used xsd file  in this example and when  i tried to run this example at that time i got one page which ask me a database name and user name and password but It not allow me to write Database name.and it have one check box of integrated security. so now what to do i get stucked plz can any one help me?i have tried on other pc to but i got same request page.i want a solution which not ask me this id pass all the time.

The report you requested requires further information?

I have this prebuilt crystal report used access db with out logon information. It works in the dev. using VS2005. When I created a build and installed on the server, it popup the following info when invoked the crystal report. The report you requested requires further information '\\xxx\yyyy\TestDB.mdb Server name:                   [\\xxx\yyyy\TestDB.mdb] Database name:               [\\xxx\yyyy\TestDB.mdb] User name: Password: [] Use Integrated Security                                            [Log On]   Any idea why or any suggestion?  

SSRS Report based on SSAS Cubes doesn't show NULL values correctly

I have a SSRS report which is based on an SSAS Cube. In the Cube the formating of numeric fields that NULL values are properly shown as NULL values. In the Cube Browser and Excel this is shown correctly. However when I design the report already the query against SSAS shows these fields as "0" instead of NULL. Is there a way to fix this or is this a bug ?  

set the Report URL property to a specific report dynamically based on the selection in the list.

Hi I want to use  embedding the Report Viewer Web Part in a Web page, and I know we  should set the Report URL property to a specific report. but  is there a way by which we can set the url  dynamically based on the selection of the report  from  the list How can I customize this  feature Any Help on this is appreciated. Thanks

Dynamic or Expression-based Report Page Properties

Hello, I have a tablix(table) with column grouping making the number of columns dynamic. Although our customers have been warned that this could lead to the columns going beyond the edge of the normal landscape 8.5x11 inch page, they have asked for alternate solutions. Beyond rotating the column labels and reducing fontsizes, the issue is not so much that it goes off the page, but the fact that in print preview mode the data is broken up requiring that you go to the next page to get the remaining data. What I am investigating is whether the Page Properties of the report body, either the pagesize property and/or the interactivesize property, can be manipulated at run time? This way if a user, based on their experience with the parameters they usually select and pass into the report, knows that the results will span the length of the page onto a second page, could choose a new parameter such as pagesize/interactivesize so that it changes from 8.5/11 to perhaps the next standard page size of 8.5/14 inches? This does not mean the contents would change during the course of rendering the report, just a new input that could decide at run time what paper size to use in print preview mode.   Thanks.

Suppose we are building a web-based application to retrieve and enter information into a database.

Please help me out with thisSuppose we are building a web-based application to retrieve and enter information into a database.  The user-interface invokes web services.  Which architecture  would use for the application.

Infopath 2007 Repeating Table hide row based on Text values of column

Infopath 2007 browser based form Full Trust Example: I have a repeating table (FruitChoice) that has multiple columns. Both drop down list point to sharepoint list data sources. Choose your tree ft. drop down list – 6Ft Choose your Department drop down list - 103 This repeating table is conditional on the drop down values. This works great. Trees     Fruit       Cost   Date Ordered    Date Delivery Department 6Ft        Peaches                                                        103 3Ft        Apples                                                          102 3Ft        Peaches         &

How to invalidate one control based on information in a second control

An expiration date is required for a license unless it is a lifetime license.  I have two controls; a ComboBox for the license type and a DateTimePicker for expiration date.  I have created a class called RequiredExpirationDateValidationRule. The only way to invalidate just the DateTimePicker appears to be to place the RequiredExpirationDateValidationRule in the binding for the SelectedDate property of the DateTimePicker.  However, I can't get the SelectedItem property of the ComboBox to see if I have a lifetime license type selected.  So I have to place the RequiredExpirationDateValidationRule in a BindingGroup that includes both the ComboBox and the DateTimePicker.  But now the DateTimePicker is not invalidated by the RequiredExpirationDateValidationRule when it returns a false ValidationResult. How do I solve this problem?

Sub report query based on main report (Microsoft Report Viewer)



I searched the forum but couldn't find anyone with the same problem with me.  They were close but didn't help me solve my issue.

I'm trying to learn how to make the sub-report get data from SQL Server based on a primary key passed from the main-report.

An example:
Main report displays all student names and the sub-report would display all their contact phone numbers.

A visual:
Bobby Smith

Home Phone: 555-1212
Cell Phone: 555-2323
Work Phone: 555-3434

Jane Doe

Home Phone: 555-2020
Cell Phone: 555-3030
Work Phone: Null

Ginger Doe

Home Phone: 555-5062
Cell Phone: 555-9586
Work Phone: 555-2356

Student ID   |   Name
1                | Bobby Smith
2                 | Jane Doe
3                 | Ginger Doe

Phone ID &n

Hide static Column in matrix report


I created one matrix report. i have 2 static columns and some dynamic (PIVOT) coulmns.

I have one boolean variable. If it is true need to hide first column else hide second column.

For matrix report Column visibilty property is disabled.

How to do this?

kindly help me.

Hide Report Builder link in 2008 r2


I would like to hide the link to report builder. I have taken the role away but the link still shows up. I am using a security extension.



Hide Label Based on Label Text?


Is it possible to display or hide a label based on the text rendered in it?
I have a label that will display the value of a control on the previous page. If the value rendered is "0" then I want to hide the label or hide the label and one more label associated with it. (or if the value is more than "0" make it visible)

Any suggestions would be great.


Show or hide programmatically based on audience


I'm trying to either show or hide a datalist control based on a users Audience.

      AudienceLoader audienceLoader = AudienceLoader.GetAudienceLoader();

      string audienceFieldValue = "United States";

      if ((AudienceManager.IsCurrentUserInAudienceOf(audienceLoader, audienceFieldValue, false)))
        DataList2.Visible = true;
        DataList2.Visible = false;

I have tried couple different things this is where I'm at now... any help would be appreciated.




Report Model based on Analysis Services Cube doesn't work


Hi all,

I am working in BIDS and would like to create a Report Model based on a cube.

Creating a Data Source based on SSAS goes well, but when I want to make a Data Source View, the earlier created Data Source doesn't show up, which is necessary for the final resulting Report Model.

Could somebody help me out in solving this issue? (And also tell me why this is issue is rising?)


SQL Server 2008 & BIDS 2008 (Version 9.0.3x)

Report exported to Excel 2007 is EXTREMELY slow once a filter is applied.


I am exporting a 12,000 row, 20 column report to Excel from SSRS 2008.  Once opened in Excel, everything is fine.  If I further filter the data through Excel (no external data connections) performance degrades.  If I filter down to say 20 rows, it nearly completely bogs down my entire PC.  I've emailed this spreadsheet to several others, who then experience the same issue.

If I export this same set of data from a different BI tool, such as Microstrategy, there are no performance issues what so ever.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend