Hide a button in SSRS pdf view but show in online view - pdf

I have a button in the SSRS report Report1. This buttons opens other report called DetailReport. In online view of the report for faster rendering the button on report1 opens the DetailReport. But when on pdf view the Button appears on the report, which is of no use.
I have found way to hide and show the entire page by passing parameter.
Using code for visiblity as :
=IIF(Parameters!ShowDetaiReport.Value=true,false,true)
But the button is shown or hidden both online and in pdf.
Is there any way to show button in the online view but hide it when I download pdf or word. Can i replace the Button with report itself when I download it.
FYI: I am using SSRS 2012

You can check to see what type of report is being rendered using the Globals!RenderFormat Built-in Field. You can either use .Name to check for a specific render format - such as PDF or Excel - or you can simply use .IsInteractive to check if the user can actually click things.
You can apply this check in the Button's Visibility -> Show or hide based on an expression property value as follows: =iif(Globals!RenderFormat.IsInteractive, False, True)
If you want to test this without exporting your reports, you can preview in Print Layout, which isn't interactive.

Related

Passing parameters while intent-based navigation in List Report

In my list report, when I click directly on the 'Document Number' field it opens another app but doesn't pass values. Only when I click the arrow on the right and move to 'General Information', then in this section when I click on the field, the value is passed and right document is opened. Is it possible to make it work with direct click on the report field?
If this is not possible, can you advise me how to change the logic in CDS to get "quick view" pop up appear after the click in which this hotspot can work for sure (attached screen from standard App where it works).

How to disable right click on rdlc report

I am creating an RDLC report. The report looks pretty well in print layout mode. I set it to printlayout mode like this -
Me.ReportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout)
Well, this is fine but if user right clicks on the report he get an option to disable this print layout mode as shown in the image below
and if the user disables the printLayout the reports get aligned to left side as shown in the below image
So, what I want to do is either disable the right click or if possible align the report properly on the default mode too.According to me, it is better to disable the right click because the report is always going to be generated in A4 format. Any help is appreciated, suggestions too
The right-click menu is called a ContextMenu and the
ReportViewer.ShowContextMenu Property allows you to disable it.
Me.ReportViewer1.ShowContextMenu = False

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

PDF creation with page refresh

I have a page with a viewPanel and a dialog. When an item in the viewPanel is clicked, the dialog opens, prompting the user to make changes to that item, and offering them the option to generate a report of the item in PDF format.
At first, I tried putting the PDF creation onto a button, as described here: http://www.eknori.de/2011-10-25/xpages-to-pdf-with-itext/ However, whenever the button is pressed, I get a "NotFoundError: DOM Exception 8" which seems to stem from the dojo JS. So currently I have an alternative whereby the button simply sets some sessionScope variables and opens a pdf.xsp XPage, where the variables are read back and the PDF is created.
The PDF gets created correctly, but it also means that the page that the user is on won't be refreshed to display their new change in the viewPanel. I've tried adding page redirects at the bottom of the XPage which creates the PDF, but with no luck.
So, how can I create a PDF and prompt a user to download it, but also refresh the page that they are currently on?
Are you isseuing an partial refresh on the button to hide your dialog and to execute the code for pdf generation? If so you I think that there is your problem. What you could do is to do a partial refresh on the onClose() method of the dialog to refresh the viewpanel. In the clientside onunload method you could open a so called xAgent which renders the pdf for you in a new window (window.open(pdf.xsp?docid=xxx). Take a look here: NotesIn9: 039 Creating PDF’s with XPages Part 2
Of cours the problem with this approach is that when you have a button / image in yoru viewpanel row that displays if the report has been created is not shown because the xagent runs after the / during the time the viewpanel row is being refreshed.

Is it possible to make a statusbar like notepad in VB?

I made a notepad using vb 2008 and I am facing a problem who I'd make the Statusbar.
any idea will be great.
Note: I am using the Textbox to read and write text
Thank you
You need to add a StatusStrip control to your form.
To find it, open the Toolbox, expand the "Menus & Toolbars" section, and double-click on the one named "StatusStrip".
Double-clicking on the control in the Toolbox will automatically add it to your form, and dock it along the bottom, just like it is in Notepad.
Once the control is there, you can customize it by changing properties in the Properties window. If you want to add information to the status bar, you do that by adding sub-controls inside of it. Click the drop-down arrow next to the "new" icon, and you'll see a list of possible choices:
"StatusLabel" — displays static text
"ProgressBar" — displays a progress bar, indicating the progress of a background operation
"DropDownButton" — displays a drop-down button, to allow a choice of multiple options
"SplitButton" — displays a drop-down button that allows a choice of multiple options, but also invokes the default option by a single click on the button.