I have a Telerik Reporting Q3 2009 installed on my system.
But right now I am developing a WPF application and need the Telerik Report Viewer.
I installed the Telerik Report Q1 2010 and I did not uninstall the Telerik Q3 2009.
Do I have to uninstall it? What effect would it have on my application if I uninstalled?
I also have Telerik Rad Controls installed on my system.
I installed the Telerik Q1 2010 and I referenced the Telerik.ReportViewer.wpf assembly in my VS2008 namespace and then I am trying to add my Report Viewer to my WPF Window designer and it gives me the following error
“Cannot find DependencyProperty or PropertyInfo for property named 'SelectionBoxTemplate'. Property names are case sensitive. Error at object 'Telerik.Windows.Controls.RadComboBox' in markup file 'Telerik.ReportViewer.Wpf;component/Themes/Default/ReportViewer.xaml'.
at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType) at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException) at System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine(String message, Exception innerException) at System.Windows.Markup.BamlRecordReader.ThrowException(String id, String parameter) at System.Windows.Markup.BamlRecordReader.ReadPropertyComplexStartRecord(BamlPropertyComplexStartRecord bamlPropertyRecord) at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord) at System.Windows.StyleHelper.LoadOptimizedTemplateContent(DependencyObject container, ParserContext parserContext, OptimizedTemplateContent optimizedTemplateContent, FrameworkTemplate frameworkTemplate, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container) at System.Windows.FrameworkElement.ApplyTemplate() at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.PageControl.DesignTimePage.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Designer.SimpleViewManager.DesignerBackground.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Decorator.MeasureOverride(Size constraint) at Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Interop.HwndSource.SetLayoutSize() at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value) at System.Windows.Interop.HwndSource.set_RootVisual(Visual value) at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder.Initialize() at MS.Internal.Designer.VSIsolatedDesigner.ViewHolder..ctor(UIElement content) at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.get_ViewHandle() at MS.Internal.Host.Isolation.IsolatedView.get_ViewHandle() at MS.Internal.Designer.DesignerPane.LoadDesignerView()”
Here is my XAML Code in my WPF Window:
<Window
xmlns:my="clr- namespace:Telerik.ReportViewer.Wpf;assembly=Telerik.ReportViewer.Wpf"
xmlns:local="clr-namespace:Telerik.ReportViewer.Common;assembly=Telerik.ReportViewer.Wpf"
Title="Report" Height="600" Width="600">
<my:ReportViewer />
</Window>
Dim x As New DataTable
Dim dr As DataRow
x.Columns.Add(
"Col1")
x.Columns.Add(
"Col2")
dr = x.NewRow
dr(
"Col1") = "test1"
dr(
"Col2") = "test2"
x.Rows.Add(dr)
Dim g As New Report6
g.ObjectDataSource1.DataSource = x
ReportViewer11.Report = g
I have never really used data sets and tables before, generally everything is done using sql querys odbcdatareaders connected to grids and so forth.
Is this the best way forward, or am I missing something more basic or straight forward?
Shane
private void assessmentsTable
_ItemDataBound(object sender, EventArgs e){ if (m_HasRecords) { Telerik.Reporting.Processing.Table tab = (Telerik.Reporting.Processing.Table)sender; Telerik.Reporting.Processing.ProcessingElement[] elems = tab.ChildElements.Find("textBox16", true); for (int i = 0; i < elems.Length; i++) { DataTable dt_assessments = GetAssessments(); Telerik.Reporting.Processing.TextBox assessmentID = (Telerik.Reporting.Processing.TextBox)tab.ChildElements.Find("textBox16", true).GetValue(i); Telerik.Reporting.Processing.SubReport rep1 = (Telerik.Reporting.Processing.SubReport)tab.ChildElements.Find("subReport1", true).GetValue(i); //Telerik.Reporting.SubReport rep2 = (Telerik.Reporting.SubReport)tab.ChildElements.Find("subReport2", true).GetValue(i); DataTable dt_photos = GetPhotos(); LoadPhotos(dt_photos, assessmentID.Value.ToString(), m_Counter++, table2.Height.Value + 10, rep1);private void LoadPhotos(DataTable dt_photos, string assessmentID, int i, float height, Telerik.Reporting.Processing.SubReport subReport1){ DataView dv = new DataView(dt_photos, "photoSourceID='" + assessmentID.ToString() + "'", "PhotoDateTime", DataViewRowState.CurrentRows); subReport1.Report.DataSource = new RMReports.AssessmentPhotos(dv, m_PhotoDirectory, m_EventID.ToString()); subReport1.Location = new PointU(new Unit(0.5, UnitType.Inch), new Unit(m_CurrentYLocation + height + 1, UnitType.Inch)); subReport1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.9999217987060547, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.900000274181366, Telerik.Reporting.Drawing.UnitType.Inch));}public AssessmentPhotos(DataView dt_photos, string photo_directory, string eventid){ /// <summary> /// Required for telerik Reporting designer support /// </summary> InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // m_PhotoDirectory = photo_directory; m_EventID = eventid; LoadPhotos(dt_photos);}private void LoadPhotos(DataView dt_photos){ table2.DataSource = dt_photos;}