Search Results

Search found 6 results on 1 pages for 'lukepet'.

Page 1/1 | 1 

  • Visual Studio 2010 and CrystalReports

    - by LukePet
    I have a dll build with target framework 3.5 that manage reports; this dll use the version 10.5.3700.0 of CrystalDecisions.CrystalReports.Engine Now, I have created a new wpf application based on .NET framework 4.0 and I added the report dll reference to project. I had to install the Crystal Reports for Visual Studio 2010 library (http://www.businessobjects.com/jump/xi/crvs2010/default.asp) to build the application without errors...now it builds success, but the report print don't work. It's generate an error when set datasource...the message is: Unknown Query Engine Error Error in File C:\DOCUME~1\oli15\IMPOST~1\Temp\MyReport {4E514D0E-FC2C-4440-9B3C-11D2CA74895A}.rpt: ... Source=Analysis Server ErrorCode=-2147482942 StackTrace: at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault) at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type) I think that it use a different version reference for CrystalDecisions.CrystalReports.Engine, it's possible? How can tell it to use the 10.5.3700.0 version?

    Read the article

  • WPF parent-child window: binding reference problem

    - by LukePet
    I have a WPF Window that open a modal child window to load some data. Both window have a own viewmodel, now I have this problem: after I close the child window it seems still running in background! To close the child window I set DialogResult from viewmodel command; now, if I create a new data and then I edit it from parent window (with the child window closed before), the child window still capture the property changed event for the properties previously bind. How can avoid this? I would clear every reference with data when I close modal window. Which is the best practise to do it?

    Read the article

  • Access to DataTemplate Control of WPF Toolkit DataGridCell at Runtime, How?

    - by LukePet
    I have a DataGrid defined with WPF Toolkit. The CellEditingTemplate of this DataGrid is associated at runtime with a custom function that build a FrameworkElementFactory element. Now I have to access to control that is inserted inside DataTemplate of CellEditingTempleta, but I do not know how to do. On web I found a useful ListView Helper... public static class ListViewHelper { public static FrameworkElement GetElementFromCellTemplate(ListView listView, Int32 column, Int32 row, String name) { if (row >= listView.Items.Count || row < 0) { throw new ArgumentOutOfRangeException("row"); } GridView gridView = listView.View as GridView; if (gridView == null) { return null; } if (column >= gridView.Columns.Count || column < 0) { throw new ArgumentOutOfRangeException("column"); } ListViewItem item = listView.ItemContainerGenerator.ContainerFromItem(listView.Items[row]) as ListViewItem; if (item != null) { GridViewRowPresenter rowPresenter = GetFrameworkElementByName<GridViewRowPresenter>(item); if (rowPresenter != null) { ContentPresenter templatedParent = VisualTreeHelper.GetChild(rowPresenter, column) as ContentPresenter; DataTemplate dataTemplate = gridView.Columns[column].CellTemplate; if (dataTemplate != null && templatedParent != null) { return dataTemplate.FindName(name, templatedParent) as FrameworkElement; } } } return null; } private static T GetFrameworkElementByName<T>(FrameworkElement referenceElement) where T : FrameworkElement { FrameworkElement child = null; for (Int32 i = 0; i < VisualTreeHelper.GetChildrenCount(referenceElement); i++) { child = VisualTreeHelper.GetChild(referenceElement, i) as FrameworkElement; System.Diagnostics.Debug.WriteLine(child); if (child != null && child.GetType() == typeof(T)) { break; } else if (child != null) { child = GetFrameworkElementByName<T>(child); if (child != null && child.GetType() == typeof(T)) { break; } } } return child as T; } } this code work with the ListView object but not with the DataGrid object. How can use something like this in DataGrid?

    Read the article

  • Dependency Property Set Priority: CodeBehind vs. XAML

    - by LukePet
    When I initialize a control property from code, the binding to the same property defined on XAML don't work. Why? For Example, I set control properties on startup with this statements: myControl.SetValue(UIElement.VisibilityProperty, DefaultProp.Visibility); myControl.SetValue(UIElement.IsEnabledProperty, DefaultProp.IsEnabled); and on xaml I bind the property of myControl in this way: IsEnabled="{Binding Path=IsKeyControlEnabled}" now, when the property "IsKeyControlEnabled" changes to false, myControl remains enabled (because it's initialize with true value). How can I do?

    Read the article

  • Bind command to X-button of window title bar

    - by LukePet
    My WPF maintenance window have a toolbar with a button "Exit"; a CommandExit is bind with this button. The CommandExit perform some checks before exit. Now, if I click to close button of the window (x-button of title bar), this checks are ignored. How can I do to bind CommandExit to window x-button?

    Read the article

  • Ignore collection properties in PropertyInfo

    - by LukePet
    I have a function with this code: foreach (PropertyInfo propertyInfo in typeof(T).GetProperties()){ //SOME CODE if (propertyInfo.CanWrite) propertyInfo.SetValue(myCopy, propertyInfo.GetValue(obj, null), null); } I would avoid to check "collection" properties; to do this now I have insert this control: if (propertyInfo.PropertyType.Name.Contains("List") || propertyInfo.PropertyType.Name.Contains("Enumerable") || propertyInfo.PropertyType.Name.Contains("Collection")) continue; but, It don't like me! Which is a better way to do it?

    Read the article

1