Crystalreportviewer Toolbar controls disapperas on postback

Hi,
i am using CR XI R2. i have customized my crystalreportviewer toolbar to add buttons on it using followinf code
System.Web.UI.Control oControl = CrystalReportViewer1.Controls[2];
Button oButton = new Button();
oButton.ID = "newButton";
oButton.Text = "My New Button";
oControl.Controls.Add(oButton);
when i click the button in crystalrpeortviewer toolbar, the button control disappears. i tried to re-create the control in postback i receive an error saying
Multiple controls with the same ID newButton were found. FindControl requires that controls have unique IDs.
please help me
padmanaban v

I'll get the 404 error checked out. Meanwhile, here is a copy of the note;
Symptom
How to add a customized print button to the Crystal Reports viewer control in Visual Studio .NET 2008 Windows application instead of using existing print button?
Resolution
Customized print button can be added to the Crystal Reports Viewer by using ToolStrip.
Please refer to the following code to add a customized print button to the Crystal Reports Viewer control:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Drawing.Printing;
namespace WindowsFormsApplication1
    public partial class Form1 : Form
        CrystalReport1 cr;
        public Form1()
            InitializeComponent();
        private void Form1_Load(object sender, EventArgs e)
ToolStrip ts;
            ts = (ToolStrip)crystalReportViewer1 .Controls[3];
            ToolStripButton printbutton = new ToolStripButton();
            printbutton.Image = ts.Items[1].Image;
            ts.Items.Remove(ts.Items[1]);
            ts.Items.Insert(1, printbutton);
            ts.Items[1].Click += new EventHandler(this.CaptureEvent);
            cr = new CrystalReport1();
            this.crystalReportViewer1.ReportSource = cr;
        private void CaptureEvent(Object Sender, EventArgs e)
            try
            {        // Create a Print Dialog
                PrintDialog printDialog1 = new PrintDialog();
                // Create a Print Document
                PrintDocument pd = new PrintDocument();
                printDialog1.Document = pd;
                printDialog1.ShowNetwork = true;
printDialog1.AllowSomePages = true;
                DialogResult result = printDialog1.ShowDialog();
                if (result == DialogResult.OK)
                    MessageBox.Show("Print button has been selected !!!");
PrintReport(printDialog1.PrinterSettings.PrinterName);
                else if (result == DialogResult.Cancel)
                    MessageBox.Show("Cancel button has been selected !!!");
catch (Exception ex)
                MessageBox.Show(ex.Message);

Similar Messages

  • Open folders in same window (in toolbar control button mode)

    Hi, when I set a finder window to hide the toolbar from view, using the toolbar control button in the top right, the folders open a new window when clicked.
    Is it possible to set them to open in the same window?
    Thanks

    Hi, when I set a finder window to hide the toolbar from view, using the toolbar control button in the top right, the folders open a new window when clicked.
    Is it possible to set them to open in the same window?
    Thanks

  • Toolbar control button in Safari

    Hi !
    Is it possible to "insert" the *Toolbar control button* in the upper-right corner of a Safari window ?
    Do you know the reason why there is no this button in Safari ?
    Regards

    Welcome to the forums!
    Not sure what you mean by a 'Toolbar control button'.
    Most commands, like customizing or hiding the Toolbar, are in the View menu of Safari.

  • Problem with ActiveX control, Microsoft Toolbar Control, version 6.0

    Hi everyone,
    I built a virtual machine on my desktop and installed Windows and Labview.  Everything looks fine. Then when I tried to insert ActiveX control, Microsoft Toolbar Control, version 6.0, in Labview, it says "Class is not licensed for use". 
    By the way, it works perfectly at my desktop enviroment.
    Any idea? Thanks a lot for any help.
    Anne

    There are two different licenses for those controls: a development license and a run-time license. Did you at some point have Visual C/C++/Basic 6.0 installed? If so, that would have installed the development license. That's the license you're missing on the virtual machine. This KB article discusses this issue: http://support.microsoft.com/kb/318597. It relates to using the controls in Visual Studio 2005, but it applies to LabVIEW as well.

  • CrystalReportViewer Toolbar

    Crystal report viewer Page navigation buttons issue
    <CR:CrystalReportViewer ID="uxViewer" runat="server" HasExportButton="False"  HasPrintButton="True"
                  EnableDatabaseLogonPrompt="false" EnableParameterPrompt="false" HasCrystalLogo="False" HasRefreshButton="False"
                  HasSearchButton="False" HasDrillUpButton="False" HasToggleGroupTreeButton="False"
                   Height="100" Width="100%" BackColor="White" HasPageNavigationButtons="True" HasZoomFactorList="False"
             />
    we were earlier using crystal reports 2005  with the above declaration and the crystal report viewer control looked like the first image in the below link.
    After migrating it to CR v13 with the below declaration, it looked like the second image in the below link
    <CR:CrystalReportViewer ID="uxViewer" runat="server" HasExportButton="False"  HasPrintButton="True"
                  EnableDatabaseLogonPrompt="false" EnableParameterPrompt="false" HasCrystalLogo="False" HasRefreshButton="False"
                  HasSearchButton="False" HasDrillUpButton="False" HasToggleGroupTreeButton="False"
                   Height="100" Width="100%" BackColor="White" HasPageNavigationButtons="True" HasZoomFactorList="False" EnableDrillDown="False"  ToolPanelView="None"
               HasDrilldownTabs="False"
             />
    [Above-2005 / Below V13 CRV toolbar|http://tinypic.com/r/rlcjtt/5]
    Is there a change in look and feel, or am I missing something here.

    You can control the toolbar via the viewer properties. E.g.; ShowPageNavigateButton, etc., etc.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • ALV-Toolbar : Control the &LOCAL& Buttons

    Hi, all
    I have the following problem with ALV-Toolbar.
    If I use editable ALV-Grid Control, I get in the toolbar new buttons such as DELETE_ROW or UNDO. This buttons don’t trigger any events of the class CL_GUI_ALV_GRID.
    If I look at Function Code of such buttons in the Table mt_toolbar they are quiet similar. All of them have &LOCAL&……. 
    How could I control  this buttons  with my program .
    Many thanks for your help
    Vladimir Golovtchiner

    Hello Anand,
    Thank you for your answers.
    I thought that these buttons are belonged  to Front-End.
    I hope that ALV-Grid is an OCX. Or not? If it is an OCX-Object, is it possible to communicate with it?
    I have no any idea now, how to solve that, but I could explain to you – why I need to handle these buttons.
    I use an editable Grid of CL_GUI_ALV_GRID. For the last two columns I use Drag and Drop to move data from the pre-last column to the last column. It work properly until the following situation:
    For example I  have two rows in a Grid. I place the cursor to the last row and press the button “COPY_ROW” two times ( I have 4 rows in a Grid now). Immediately after that I try to do Drag&Drop at the last row (4th) from the Grid. As I drop the cursor on the last cell of the last row I get always the result in the last cell of the 2nd row ( the last row before I insert two rows).
    It doesn’t matter how many rows I had or how many rows I inserted to the Grid. It happens also in the middle of the Grid not only at the end.
    After the first Drag&Drop it begins to work properly. 
    I debugged the handler of Drag&Drop and I saw that the Drag&Drop object has in the structure E_ROW each time the number of the last row before insertion. I forced the update of backend in the handle of “on Drag” event with CHECK_CHANGED_DATA before I create the Drag&Drop object and passed the Drag&Drop handle to the internal table. It didn’t work.
    That is why I thought that I should do this update after each insertion or deletion with these buttons.
    In other words – I don’t want to change the functionality of these buttons I want to add something before.
    Best regards
    Vladimir Golovtchiner

  • An error has occurred because a control with id '%spPlaceHolderMain%' could not be located or a different control is assigned to the same ID after postback.

    Hello All, When i try to do a filter on an entity and click filter button, i see the below error message being popped up. Can someone provide a solution to this ?
    "An error has occurred because a control with id '%spPlaceHolderMain%' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events
    to avoid this error."
    Please let me know the process to set the ID explicitly.

    Can you try resetting the IIS?

  • Web CrystalReportViewer error when trying to go to the next page or search

    Recently I've updated my solution to CrystalReports for VS2010 (now I have 13.0.2000.0 version along with .NET 4.0 and C#). When I used CrystalReports 10.5.3700.0 CrystalReportViewer was situated inside an UpdatePanel and controlled with my own toolbar and everything worked fine. After an update this stuff refused to work at all (CrystalReportViewer was simply blank) and I according to advices on this board removed all UpdatePanels and ScriptManager from my page and began to use native CrystalReportViewer toolbar. Now first page of the report is rendering properly and Print and Export buttons of the native toolbar are working fine but when i'm trying to go to the next page of a report, I see only word "Error" in the report's area.
    Fiddler log for this request:
    POST http://127.0.0.1:56507/reportview.aspx?report=forms_graph&from_d=01.12.2007+00%3a00%3a00&to_d=22.03.2010+23%3a59%3a59&s%5b%5d=74%2c95%2c112%2c97%2c139%2c96%2c125%2c113%2c98%2c128%2c144%2c90%2c141%2c80%2c75%2c118%2c109%2c71%2c72%2c94%2c73%2c3%2c2%2c81%2c133%2c82%2c117%2c140%2c127%2c137%2c131%2c143%2c116%2c129%2c111%2c87%2c88%2c120%2c110%2c124%2c145%2c146%2c134%2c135%2c138%2c108%2c101%2c136%2c142%2c76%2c6%2c47%2c10%2c4%2c53%2c102%2c91%2c11%2c99%2c50%2c114%2c132%2c115 HTTP/1.1
    Host: 127.0.0.1:56507
    Connection: keep-alive
    Referer: http://ipv4.fiddler:56507/reportview.aspx?report=forms_graph&from_d=01.12.2007+00%3A00%3A00&to_d=22.03.2010+23%3A59%3A59&s%5B%5D=74%2C95%2C112%2C97%2C139%2C96%2C125%2C113%2C98%2C128%2C144%2C90%2C141%2C80%2C75%2C118%2C109%2C71%2C72%2C94%2C73%2C3%2C2%2C81%2C133%2C82%2C117%2C140%2C127%2C137%2C131%2C143%2C116%2C129%2C111%2C87%2C88%2C120%2C110%2C124%2C145%2C146%2C134%2C135%2C138%2C108%2C101%2C136%2C142%2C76%2C6%2C47%2C10%2C4%2C53%2C102%2C91%2C11%2C99%2C50%2C114%2C132%2C115
    __EVENTTARGET=StatReportViewer
    __EVENTARGUMENT={"0":{"rptViewLabel":"u0413u043Bu0430u0432u043Du044Bu0439 u043Eu0442u0447u0435u0442", "gpTreeCurrentExpandedPaths":{}, "vCtxt":"/wEXAwUVSXNMYXN0UGFnZU51bWJlcktub3duaAUOTGFzdFBhZ2VOdW1iZXICAQUKUGFnZU51bWJlcgIB", "pageNum":1}, "common":{"width":"350px", "Height":"", "enableDrillDown":false, "drillDownTarget":"_self", "printMode":"Pdf", "displayToolbar":true, "pageToTreeRatio":6, "pdfOCP":true, "promptingType":"html", "viewerState":"...(HUGE VIEWSTATE STUFF)...", "rptAlbumOrder":["0"], "toolPanelType":"None", "toolPanelWidth":200, "toolPanelWidthUnit":"px", "iactParams":[], "paramOpts":{"numberFormat":{"groupSeperator":" ", "decimalSeperator":","}, "dateFormat":"dd.MM.yyyy", "timeFormat":"H:mm:ss", "dateTimeFormat":"dd.MM.yyyy H:mm:ss", "booleanFormat":{"true":"u0438u0441u0442u0438u043Du0430", "false":"u043Bu043Eu0436u044C"}, "maxNumParameterDefaultValues":"200", "canOpenAdvancedDialog":true}, "zoom":100, "zoomFromUI":false, "lastRefresh":"01.09.2011 15:14:03"}, "curViewId":"0"}
    __VIEWSTATE=/wEPDwUKMTY3NzU4MzI2OQ9kFgICAw9kFgICEw8XAGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFEUxvZ2luU3RhdHVzJGN0bDAxBRFMb2dpblN0YXR1cyRjdGwwMw==
    StatReportViewer_toptoolbar_search_textField=Find...
    text_StatReportViewer_toptoolbar_selectPg=1 of 1+
    text_StatReportViewer_toptoolbar_zoom=100%
    On a reloaded page I see just a text "Error" in CrystalReportViewer area and the following stack trace in html markup:
    Inner Stack Trace:
       at CrystalDecisions.Shared.Json.JsonArray..ctor(JsonTokener x)
       at CrystalDecisions.Shared.Json.JsonTokener.NextValue()
       at CrystalDecisions.Shared.Json.JsonObject..ctor(JsonTokener x)
    Stack Trace:
       at CrystalDecisions.Shared.Json.JsonObject..ctor(JsonTokener x)
       at CrystalDecisions.Shared.Json.JsonTokener.NextValue()
       at CrystalDecisions.Shared.Json.JsonArray..ctor(JsonTokener x)
       at CrystalDecisions.Shared.Json.JsonArray..ctor(String string_Renamed)
       at CrystalDecisions.Web.ReportAgentBase.LoadViewState(Object viewState, Boolean bRptSourceChangedByNavigation)
       at CrystalDecisions.Web.ReportAgent.LoadViewState(Object viewState, Boolean bRptSourceChangedByNavigation)
       at CrystalDecisions.Web.CrystalReportViewerBase.LoadViewState(Object viewState)
       at CrystalDecisions.Web.CrystalReportViewer.LoadViewState(Object viewState)
    I don't know what additional information about this issue will be helpful. Any kind of help will be highly appreciated.

    Tried with attached allinone.js with out any luck.
    It seems that the GetLayer function returns null for the Crystal reports viewer Id
    below are fields values in function Widget_init()
    A.id= "RptViewer_BeamRptViewer__UI"
    this
        id: "RptViewer_BeamRptViewer__UI"
        layer: null
        css: null
        getHTML: function(){var B=bobj.html;var C={overflow:"hidden",position:"relative",left:this.visualStyle.left,top:this.visualStyle.top};var A=B.DIV({dir:"ltr",id:this.id,style:C,"class":"dialogzone"},this._topToolbar?this._topToolbar.getHTML():"",this._separator?this
        beginHTML: function Widget_getHTML(){return""}
        endHTML: function Widget_getHTML(){return""}
        write: function Widget_write(A){_curDoc.write(this.getHTML(A))}
        begin: function Widget_begin(){_curDoc.write(this.beginHTML())}
        end: function Widget_end(){_curDoc.write(this.endHTML())}
        init: function(){this.initOld();this._initSignals();if(this._reportAlbum){this._reportAlbum.init()}if(this._topToolbar){this._topToolbar.init()}if(this._leftPanel){this._leftPanel.init()}if(this._statusbar){this._statusbar.init()}if(this._leftPanelResizeGrabber)
        move: function Widget_move(A,C){var B=this.css;if(A!=null){if(_moz){B.left=""+A+"px"}else{B.pixelLeft=A}}if(C!=null){if(_moz){B.top=""+C+"px"}else{B.pixelTop=C}}}
        resize: function(A,B){if(bobj.isNumber(A)){A=A+"px"}if(bobj.isNumber(B)){B=B+"px"}this.visualStyle.width=A;this.visualStyle.height=B;this._doLayout()}
        setBgColor: function Widget_setBgColor(A){this.css.backgroundColor=A}
        show: function Widget_show(A){this.css.visibility=A?_show:_hide}
        getWidth: function Widget_getWidth(){return this.layer.offsetWidth}
        getHeight: function Widget_getHeight(){return this.layer.offsetHeight}
        setHTML: function Widget_setHTML(A){var B=this;if(B.layer){B.layer.innerHTML=A}else{B.initialHTML=A}}
        setDisabled: function Widget_setDisabled(A){if(this.layer){this.layer.disabled=A}}
        focus: function Widget_focus(){safeSetFocus(this.layer)}
        setDisplay: function Widget_setDisplay(A){if(this.css){this.css.display=A?"":"none"}}
        isDisplayed: function Widget_isDisplayed(){if(this.css.display=="none"){return false}else{return true}}
        appendHTML: function Widget_appendHTML(){append(_curDoc.body,this.getHTML())}
        setTooltip: function Widget_setTooltip(A){this.layer.title=A}
        initialized: function Widget_initialized(){return this.layer!=null}
        widx: 64
        isDisplayModalBG: false
        isLoadContentOnInit: false
        layoutType: "fitReport"
        visualStyle: {...}
        widgetType: "Viewer"
        _topToolbar: {...}
        _reportAlbum: {...}
        _leftPanel: {...}
        _separator: {...}
        _print: {...}
        _export: {...}
        _promptDlg: null
        _reportProcessing: {...}
        _eventListeners: []
        _statusbar: {...}
        _leftPanelResizeGrabber: {...}
        initOld: function Widget_init(){var A=this;A.layer=getLayer(A.id);A.css=A.layer.style;A.layer._widget=A.widx;if(A.initialHTML){A.setHTML(A.initialHTML)}}
        _boundaryControl: {...}
        _modalBackground: {...}
        LayoutTypes: {...}
        PromptingTypes: {...}
        onGrabberMove: function(A){if(this._leftPanel){this._leftPanel.resize(A,null);this._doLayout()}}
        keepFocus: function(){var A=bobj.crv.params.FlexParameterBridge.getSWF(this.id);if(A){A.focus()}}
        addChild: function(A){if(A.widgetType=="ReportAlbum"){this._reportAlbum=A}else{if(A.widgetType=="Toolbar"){this._topToolbar=A;this._separator=bobj.crv.newSeparator()}else{if(A.widgetType=="Statusbar"){this._statusbar=A}else{if(A.widgetType=="PrintUI"){this._print=A}
        _onWindowResize: function(){if(this._currWinSize.w!=winWidth()||this._currWinSize.h!=winHeight()){this._doLayout();this._currWinSize.w=winWidth();this._currWinSize.h=winHeight()}}
        _initSignals: function(){var B=MochiKit.Base.partial;var D=MochiKit.Signal.signal;var A=MochiKit.Signal.connect;var C=MochiKit.Iter.forEach;if(this._topToolbar){C(["zoom","drillUp","firstPage","prevPage","nextPage","lastPage","selectPage","refresh","search","export","pr
        getLeftPanel: function(){return this._leftPanel}
        _initLeftPanelSignals: function(){var B=MochiKit.Base.partial;var D=MochiKit.Signal.signal;var A=MochiKit.Signal.connect;var C=MochiKit.Iter.forEach;if(this._leftPanel){C(["grpDrilldown","grpNodeRetrieveChildren","grpNodeCollapse","grpNodeExpand","resetParamPanel","resizeToolPan
        _isMainReportViewSelected: function(){var A=this._reportAlbum.getSelectedView();return A&&A.isMainReport()}
        _doLayoutOnLoad: function(){this.css.visibility=this._oldCssVisibility;this._doLayout()}
        _doLayout: function(){var H=this._topToolbar?this._topToolbar.getHeight():0;var D=this._topToolbar?this._topToolbar.getWidth():0;var K=this._separator?this._separator.getHeight():0;var M=this._statusbar?this._statusbar.getHeight():0;var R=this._leftPanel?this._leftPa
        _onSwitchPanel: function(A){var B=bobj.crv.ToolPanelType;if(B.GroupTree==A){MochiKit.Signal.signal(this,"showGroupTree")}else{if(B.ParameterPanel==A){MochiKit.Signal.signal(this,"showParamPanel")}else{if(B.None==A){MochiKit.Signal.signal(this,"hideToolPanel")}}}this._left
        setPageNumber: function(B,A){if(this._topToolbar){this._topToolbar.setPageNumber(B,A)}}
        showPromptDialog: function(B,A){if(!this._promptDlg){var C=MochiKit.Base.bind(this._onShowPromptDialog,this);var D=MochiKit.Base.bind(this._onHidePromptDialog,this);this._promptDlg=bobj.crv.params.newParameterDialog({id:this.id+"_promptDlg",showCB:C,hideCB:D})}this._promptD
        updatePromptDialog: function(A){A=A||"";var B=function(C,D){return function(){C.updateHtmlAndDisplay(D)}};bobj.loadJSResourceAndExecCallBack(bobj.crv.config.resources.HTMLPromptingSDK,B(this._promptDlg,A));if(bobj.isParentWindowTestRunner()){setTimeout(MochiKit.Base.partial(M
        showFlexPromptDialog: function(G,M){var B=bobj.crv.params.FlexParameterBridge;var C=bobj.crv.params.ViewerFlexParameterAdapter;if(!B.checkFlashPlayer()){var E=L_bobj_crv_FlashRequired;this.showError(E.substr(0,E.indexOf("{0}")),B.getInstallHTML());return }C.setViewerLayoutType(
        sendPromptingAsyncRequest: function(A){MochiKit.Signal.signal(this,"crprompt_asyncrequest",A)}
        setDisplayModalBackground: function(A){A=this.isDisplayModalBG||A;if(this._modalBackground){this._modalBackground.show(A)}}
        _onShowPromptDialog: function(){this._adjustWindowScrollBars();this.setDisplayModalBackground(true)}
        _onHidePromptDialog: function(){this._adjustWindowScrollBars();document.onkeypress=this._originalDocumentOnKeyPress;this.setDisplayModalBackground(false)}
        isPromptDialogVisible: function(){return this._promptDlg&&this._promptDlg.isVisible&&this._promptDlg.isVisible()}
        hidePromptDialog: function(){if(this.isPromptDialogVisible()){this._promptDlg.show(false)}}
        hideFlexPromptDialog: function(){if(this._promptDlg){if(_ie){this._promptDlg.focus()}this._promptDlg.style.visibility="hidden";this._promptDlg.style.display="none";this.setDisplayModalBackground(false);if(this._promptDlg.closeCB){this._promptDlg.closeCB()}}}
        _adjustWindowScrollBars: function(){if(_ie&&this.layoutType==bobj.crv.Viewer.LayoutTypes.CLIENT&&this._promptDlg&&this._promptDlg.layer&&MochiKit.DOM.currentDocument().body){var E,B;var A=MochiKit.DOM.currentDocument().body;var D=this._promptDlg.layer;if(this.getReportPage()&&this
        showError: function(C,A){var B=bobj.crv.ErrorDialog.getInstance();B.setText(C,A);B.setTitle(L_bobj_crv_Error);B.show(true)}
        update: function(C){if(!C||C.cons!="bobj.crv.newViewer"){return }if(C.args){this.isDisplayModalBG=C.args.isDisplayModalBG}this.hidePromptDialog();for(var A in C.children){var B=C.children[A];if(B){switch(B.cons){case"bobj.crv.newReportAlbum":if(this._reportAlbum){
        getToolPanel: function(){if(this._leftPanel){return this._leftPanel.getToolPanel()}return null}
        getParameterPanel: function(){var A=this.getToolPanel();if(A){return A.getParameterPanel()}return null}
        getReportPage: function(){if(this._reportAlbum){var A=this._reportAlbum.getSelectedView();if(A){return A.reportPage}}return null}
        scrollToHighlighted: function(){if(!this._reportAlbum){return }var A=this._reportAlbum.getSelectedView();if(A){A.scrollToHighlighted(this.layoutType.toLowerCase()==bobj.crv.Viewer.LayoutTypes.FITREPORT)}}
        addViewerEventListener: function(C,B){var A=this._eventListeners[C];if(!A){this._eventListeners[C]=[B];return }A[A.length]=B}
        removeViewerEventListener: function(E,B){var A=this._eventListeners[E];if(A){for(var D=0,C=A.length;D<C;D++){if(A[D]==B){A.splice(D,1);return }}}}
        getEventListeners: function(A){return this._eventListeners[A]}

  • Menu options in the Tools toolbar in EBS (R12).

    Hi,
    I would like to create a custom menu option under the Tools toolbar on a specific form. Could someone point me in the direction of any good documentation on how to do this?
    Regards
    Carl

    Developers Guide http://download.oracle.com/docs/cd/B40089_10/current/acrobat/120devg.pdf has info on this, specifically the SPECIAL1 to SPECIAL45 triggers and section APP_SPECIAL: Menu and Toolbar Control.
    Regards,
    Gareth

  • Documentviewer new toolbar button HorizontalAlignment="Right" has no effect?

    Hi all,
    I added a button to the documentviewer toolbar after extracting a copy of the template in Blend. I added a button (closeButton) with an "X" as its content. It works but I want the button to be at the right side of the toolbar. I tried the
    horizontalAlignment property but is has no effect. If I add margin="500,0,0,0" it works. But I don't want to fix it that way. What Am I missing?
    Thanks
    <Style x:Key="myDocumentViewerStyle" BasedOn="{x:Null}" TargetType="{x:Type DocumentViewer}">
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="ContextMenu" Value="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerContextMenu, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}"/>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DocumentViewer}">
    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Focusable="False">
    <Grid Background="{TemplateBinding Background}" KeyboardNavigation.TabNavigation="Local">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="*"/>
    <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <ContentControl Grid.Column="0" Focusable="{TemplateBinding Focusable}" Grid.Row="0" Style="{DynamicResource myContentControlStyle}" TabIndex="0"/>
    <ScrollViewer x:Name="PART_ContentHost" CanContentScroll="true" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalScrollBarVisibility="Auto" IsTabStop="true" Grid.Row="1" TabIndex="1"/>
    <DockPanel Grid.Row="1">
    <FrameworkElement DockPanel.Dock="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
    <Rectangle Height="10" Visibility="Visible" VerticalAlignment="top">
    <Rectangle.Fill>
    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
    <LinearGradientBrush.GradientStops>
    <GradientStopCollection>
    <GradientStop Color="#66000000" Offset="0"/>
    <GradientStop Color="Transparent" Offset="1"/>
    </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    </Rectangle.Fill>
    </Rectangle>
    </DockPanel>
    <ContentControl x:Name="PART_FindToolBarHost" Grid.Column="0" Focusable="{TemplateBinding Focusable}" Grid.Row="2" TabIndex="2"/>
    </Grid>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <Style x:Key="myContentControlStyle" TargetType="{x:Type ContentControl}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ContentControl}">
    <ToolBar Focusable="{TemplateBinding Focusable}" ToolBarTray.IsLocked="True" Language="en-us" KeyboardNavigation.TabNavigation="Continue" Uid="ToolBar_2">
    <Button x:Name="PrintButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerPrintButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Print" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="0" ToolTip="Print (Ctrl+P)" Uid="Button_14" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="CopyButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerCopyButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Copy" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="1" ToolTip="Copy (Ctrl+C)" Uid="Button_15" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_110"/>
    <Button x:Name="ZoomInButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerZoomInButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.IncreaseZoom" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="3" ToolTip="Increase the size of the content (Ctrl +)" Uid="Button_16" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="ZoomOutButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerZoomOutButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.DecreaseZoom" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="4" ToolTip="Decrease the size of the content (Ctrl -)" Uid="Button_17" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    <Button x:Name="ActualSizeButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerActualSizeButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="100.0" Command="NavigationCommands.Zoom" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="5" ToolTip="100% (Ctrl+1)" Uid="Button_18" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="PageWidthButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerPageWidthButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="DocumentViewer.FitToWidthCommand" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="6" ToolTip="Page Width (Ctrl+2)" Uid="Button_19" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="WholePageButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerWholePageButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="1" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="7" ToolTip="Whole Page (Ctrl+3)" Uid="Button_20" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="TwoPagesButton" Background="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerTwoPagesButton, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="2" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerButtonStyle, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" ToolTipService.ShowOnDisabled="True" TabIndex="8" ToolTip="Two Pages (Ctrl+4)" Uid="Button_21" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    <Button x:Name="closeButton" Width="20" Content="X" ToolTip="Close" HorizontalAlignment="Right" VerticalAlignment="Center" Click="closeButton_Click"/>
    </ToolBar>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>

    Hi DSP1024,
    >>I tried the horizontalAlignment property but is has no effect. If I add margin="500,0,0,0" it works
    Yes, the HorizontalAlignment property has no effect for the items inside the ToolBar control, as a workaround, we can move your "closeButton" out of ToolBar content, like this:
    <Style x:Key="myContentControlStyle" TargetType="{x:Type ContentControl}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type ContentControl}">
    <Grid>
    <ToolBar Focusable="{TemplateBinding Focusable}" ToolBarTray.IsLocked="True" Language="en-us" KeyboardNavigation.TabNavigation="Continue" Uid="ToolBar_2">
    <Button x:Name="PrintButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Print" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="0" ToolTip="Print (Ctrl+P)" Uid="Button_14" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="CopyButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="ApplicationCommands.Copy" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="1" ToolTip="Copy (Ctrl+C)" Uid="Button_15" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_110"/>
    <Button x:Name="ZoomInButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.IncreaseZoom" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="3" ToolTip="Increase the size of the content (Ctrl +)" Uid="Button_16" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="ZoomOutButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="NavigationCommands.DecreaseZoom" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="4" ToolTip="Decrease the size of the content (Ctrl -)" Uid="Button_17" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    <Button x:Name="ActualSizeButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="100.0" Command="NavigationCommands.Zoom" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="5" ToolTip="100% (Ctrl+1)" Uid="Button_18" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="PageWidthButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" Command="DocumentViewer.FitToWidthCommand" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="6" ToolTip="Page Width (Ctrl+2)" Uid="Button_19" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="WholePageButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="1" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="7" ToolTip="Whole Page (Ctrl+3)" Uid="Button_20" VerticalAlignment="Center" Width="24"/>
    <Button x:Name="TwoPagesButton" Background="Blue" CommandTarget="{Binding TemplatedParent, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="2" Command="DocumentViewer.FitToMaxPagesAcrossCommand" IsTabStop="True" Margin="2" Padding="2" ToolTipService.ShowOnDisabled="True" TabIndex="8" ToolTip="Two Pages (Ctrl+4)" Uid="Button_21" VerticalAlignment="Center" Width="24"/>
    <Separator Uid="Separator_111"/>
    </ToolBar>
    <Button x:Name="closeButton" Width="20" Content="X" ToolTip="Close" Margin="0,0,18,0" HorizontalAlignment="Right" VerticalAlignment="Center" />
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    Screenshot:
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I can't remove certain add-ons from the toolbars.

    I have a Kaspersky virtual keyboard and Kaspersky URL advisor add-ons that appear in the toolbars. I tried dragging the icons back into the customize toolbar but it doesn't work. After clicking Done, the icons still remains in the toolbar.

    Control-click(right click) the file, select "Get Info", what are your permissions?

  • CrystalReportViewer DisplayToolbar false on html button.

    hi..
    I need to hide CrystalReportViewer Toolbar on button click of html input button in my aspx page how to do so can it possible to do using java script
    or j query or any other method to hide CrystalReportViewer toolbar without post back..
    Thanks

    No there is not.
    - Ludek

  • I cannot get the STOP button to appear in the Navigation Toolbar, even after going through the suggestions; it will appear when the Restore Default Set window is open, but disappears as soon as DONE is clicked

    The X for STOP loading the page does not appear in the Navigation Toolbar. If I do the right click, select Customize, Restore Default Set, it appears; click Done and it disappears. I have disabled the theme; disabled all extensions; reset the toolbar & controls; unchecked the acceleration. No luck.

    Starting in Firefox 4, the Go, Stop and Reload buttons are combined in one button at the right end of the URL or Address bar. The button changes depending on the activity:
    *green Go arrow when typing in the address bar
    *red Stop ("X") button while page is loading
    *gray Reload (circular arrow) when page is finished loading.
    Separate buttons are possible:
    #Open Customize Toolbar window by clicking Firefox button > Option > Toolbar Layout '''''OR''''' clicking View > Toolbars > Customize if using the Menu Bar '''OR''' right-click in an empty space on a toolbar and choose Customize
    #Stop and Reload buttons will show separated between the address bar and the search bar
    #drag the buttons anywhere on the Navigation toolbar
    #*order Reload-Stop will combine into one button
    #*order Stop-Reload will remain separate buttons
    #*or drag a "Separator" from the Customize window between Reload-Stop and they will remain separate
    #click Done at bottom right of Customize window to finish
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    You have multiple old versions of Java Console installed that Java did not clean up when updating. Your old versions are: 6.0.16, 6.0.22<br />
    Follow these instructions to remove the old versions: http://kb.mozillazine.org/Java#Multiple_Java_Console_extensions

  • Missing AUDIO CONTROLER

    Just before my warranty ran out the system preference for sound control disappered. I took it to the local Apple store and they fix it. Less than 3 months later it disappered again, now they tell me that the problem is in the logic board and they est. $800.00 to fix it. I can buy a Intel iMac with a one year warranty for $400.00 more. Any help would be WELCOMED.
    iMac & iBook   Mac OS X (10.3.9)   Upgraded from 10.2.8

    preacher413
    Lots of questions.
    Is this a "it worked before but now" type issue or "it never worked before" type? The answer to this will direct a lot of the rest. AVCHD editing can be problematic since it is such a resource demanding format.
    You mention Premiere Elements 7 on Windows XP SP2 (presumed 32 bit). What do the computer resources look like in terms of installed/available RAM and free hard drive space? No SP3?
    Based on what I have read of your Canon Vixia HFM 31, you are working with either 1080i or 1080p (1920 x 1080 16:9 @ 29.97 interlaced frames per second/aka 60 field per second or 1920 x 1080 16:9 @ 30 progressive frames per second. Which one or other?
    Your video appears to have AVCHD video compression, Dolby Digital 2 channel audio..you add .mts file extension. What is the file size and duration of the file that you are putting on the Timeline?
    What have you set as the project preset for this Premiere Elements 7 project?
    After import of the file, can you see audio content with wave form in Audio 1?
    Let us start here and then decide the troubleshooting strategy.
    Thanks.
    ATR

  • Adding a toolbar to an existing Oracle form

    Hi,
    I am totally new to Oracle forms development. I have a couple of questions ->
    1. Is it possible to add a new toolbar to an existing Oracle E-Business suite form e.g. the Contact Center form? According to the Oracle Apps developer guide, forms can be modified either “by extension” or “ by modification”. It doesn’t clearly say whether a new tool bar can be added or whether an existing one can be modified to add new buttons.
    2. If I want to try out some of the stuff mentioned in the Oracle Apps developers guide and play around forms, what tools do I need? Is "Oracle Forms builder" the only tool availabe to edit and generate forms? If yes, does it come as a free download or can I get a trial version from somewhere?
    Thanks.

    1. Is it possible to add a new toolbar to an existing Oracle E-Business suite form e.g. the Contact Center form? According to the Oracle Apps developer guide, forms can be modified either “by extension” or “ by modification”. It doesn’t clearly say whether a new tool bar can be added or whether an existing one can be modified to add new buttons.Did you review (Chapter 10, Controlling the Toolbar and the Default Menu - APP_SPECIAL: Menu and Toolbar Control)?
    2. If I want to try out some of the stuff mentioned in the Oracle Apps developers guide and play around forms, what tools do I need? Is "Oracle Forms builder" the only tool availabe to edit and generate forms? If yes, does it come as a free download or can I get a trial version from somewhere?You will need Oracle Forms 6i and/or some other SQL editor (i.e. SQL*Plus, TOAD, SQL Developer, ..etc).
    You can download Oracle Developer 6i from:
    Oracle Forms Developer for Windows
    http://www.oracle.com/technology/software/products/forms/htdocs/winsoft.html
    There is no trial version or software key required to use the tool.

Maybe you are looking for

  • How do I get to the 'Print Mode Choice Box' in the Apple provided software for a Canon Pixma IP6210D Series printer?

    I downloaded the Apple software for my Pixma, IP6210D series printer.  There is no 'Color Matching', option or 'print options', pop up menu available.  According to the instructional book that came with the printer - the Mac how-to section those opti

  • MacBook7,1 Will not boot after upgrading to mountain lion

    I have a MacBook7,1 with 2GB of memory and the NVIDIA GeForce 320M with 256 MB.  I just upgraded to Mountain Lion.  However, when it tries to boot it comes up, shows the apple and then restarts.  It does this continuously.  Every once in a while I ca

  • ICloud Tabs not working on Mountain Lion ?

    Hello, I'm annoyed with a problem on my Mac mini, iCloud Tabs won't work on it. But the thing is that's working between my two iDevices (iPhone, iPod) and not on my computer. I've tried the following, - Disable the iCloud account in all the devices a

  • Power adapter flashing

    Hi I have a problem with my PowerBook G4. I have it for 4 years now, but this problem came out a month ago. The power adapter usually lights green when the battery is full or orange when it's charging. And mine is flashing dark orange. And i cannot t

  • KNVV - KDGRP Is Missing

    This field is missing from my customer master sales area screen. Can anyone tell me how to activate this? Thanks.