Telerik Forums
Reporting Forum
1 answer
306 views
Good afternoon,

After my initial problem here: http://www.telerik.com/community/forums/reporting/telerik-reporting/error-adding-new-telerik-report-to-solution.aspx I have finally gotten around to trying to add a new Telerik report to an existing WPF .NET 4 application I have written.

The problem I now have is that the DataSource wizard doesn't seem to pick up any of my datasets or entity models. If I tell the report wizard to create a new one, it doesn't even pick up my connection string from the project settings and I have to manually add it. 

Once the connection string is added, the next screen does not show any of the objects in my SQL database.

Am I way off here with what I should be doing or do I perhaps have a problem that is / isn't related to my original problem?

I'm really disappointed that I can't get this working yet but I'm afraid I will not be purchasing this Telerik reporting option until I am up and running correctly despite I think that it looks like the best reporting option available for my WPF applications.

Thank you,

Paul Pitchford.
Steve
Telerik team
 answered on 01 Mar 2012
3 answers
630 views
hello

I put a red line atravies lines and also the name of the columns with a name and not a number as can be done from the source code, is a report.

attached image
Steve
Telerik team
 answered on 01 Mar 2012
0 answers
161 views
Hi,

I am using telerik repotrviewer for reports and here is my code that dynamically accessing report and assigning to reportviewer.
When I run the application I am getting the following error message.

"Exception has been thrown by the target of an invocation."

Here is my code:
            Type reportManagerType = typeof(ReportClass);
            _reportAssembly = reportManagerType.Assembly;
            string assemblyName = _reportAssembly.GetName().Name;
            _reportName = String.Concat(assemblyName,".", _currentReportInfo.Name);
            _reportType = _reportAssembly.GetType(_reportName);
            _report = (IReportDocument)Activator.CreateInstance(_reportType);
               
            IReportDocument report = (IReportDocument)Activator.CreateInstance(_reportType);
            this.DefaultReportViewer.Report = report;

Please help me...
Sri
Top achievements
Rank 1
 asked on 01 Mar 2012
16 answers
308 views
I have the wpf report viewer in a user control which is on a tab (Telerik RadTabControl). When I close the tab I get
the following exception:


System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.ReportViewer.Wpf
  StackTrace:
       at Telerik.ReportViewer.Wpf.ReportViewer.ReportViewerUnloaded(Object sender, RoutedEventArgs e)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at MS.Internal.FrameworkObject.OnUnloaded(RoutedEventArgs args)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastUnloadedEvent(Object root)
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at ...Controller.Main(String[] args) in ...\Controller.cs:line 537
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:


This exception did not occur in Reporting version 5.3.11.1116
Steve
Telerik team
 answered on 01 Mar 2012
2 answers
175 views
Hi,I installed version Q1 2012, the components do not appear in the toolbox, I installed the toolbox manually from the Telerik.Reporting.dll, but the component TableWizard & CrossTableWizard not appear, could you help me ?
OS = Windows7 ultimate & VisualStudio 2010, i have reset the toolbox and reinstalled many time the components, but the components not appears

thanks

Aurelio
Aurelio Righetti
Top achievements
Rank 1
 answered on 29 Feb 2012
6 answers
132 views
Hi, 

I am trying to set the theme of Silverlight Report Viewer control, but I keep on getting an exception.

Here is the xaml:
<navigation:Page x:Class="TestSilverlightApplication.ReportGeneration" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
           xmlns:telerik="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight" 
           xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
           d:DesignWidth="640" d:DesignHeight="480"
           Title="ReportGeneration Page">
    <Grid x:Name="LayoutRoot" >
        <Grid.RowDefinitions>
            <RowDefinition Height="29" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <TextBox Name="txtSelect" Text="Select * from Con_1_Document" Width="500" />
            <Button Content="Generate" Name="btnGenerate" Click="btnGenerate_Click" />
        </StackPanel>
        <telerik:ReportViewer  x:Name="ReportViewer1" Width="1000"
              telerikControls:StyleManager.Theme="Vista"
              ReportServiceUri="../ReportService.svc"
              Grid.Row="1"  >
        </telerik:ReportViewer>
    </Grid>
</navigation:Page>

And the exception detail:
System.Reflection.TargetInvocationException was unhandled by user code
  Message=Exception has been thrown by the target of an invocation.
  StackTrace:
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Delegate.DynamicInvoke(Object[] args)
       at ReportViewerxaml.BindingOperation(Object BindingState, Int32 , Action )
  InnerException: System.InvalidCastException
       Message=Specified cast is not valid.
       StackTrace:
            at Telerik.ReportViewer.Silverlight.ZoomConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
            at System.Windows.Data.BindingExpression.ConvertToTarget(Object value)
            at System.Windows.Data.BindingExpression.UpdateTemporaryValue()
            at System.Windows.Data.BindingExpression.GetValue(DependencyObject d, DependencyProperty dp)
            at System.Windows.DependencyObject.EvaluateExpression(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry)
            at System.Windows.DependencyObject.EvaluateBaseValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
            at System.Windows.DependencyObject.EvaluateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, ValueOperation operation)
            at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
            at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
            at System.Windows.Data.BindingExpression.SendDataToTarget()
            at System.Windows.Data.BindingExpression.SourceAcquired()
            at System.Windows.Data.Debugging.BindingBreakPoint.<>c__DisplayClass4.<BreakOnSharedType>b__3()
       InnerException: 


I am also getting that exception even when I just put a background. 
Am I missing something?


Kriztine
Top achievements
Rank 1
 answered on 29 Feb 2012
10 answers
172 views
Dear Telerik,

could you please consider supporting either <sub> <sup> tags or the css veritical-align attribute for the htmlTextBox.   We write a lot of reports that require footnotes and hence it is useful to subscript parts of the text in a report to achieve this.

Thanks,
Jason


Steve
Telerik team
 answered on 29 Feb 2012
1 answer
121 views
Dear Telerik Team member,

 I am using Telerik report viewer with entity fraework.
This is the code I am using to bind the report to the control.
When I run the app. I am unable to see the result on the reportviewer, but I am able to get the result set from database.
Where am I doing wrong?
Help me please...

   Telerik.Reporting.EntityDataSource entityDataSource = new 
Telerik.Reporting.EntityDataSource();         <BR>            
entityDataSource.ObjectContext = 
typeof(MyEntities);<BR>            
entityDataSource.ObjectContextMember = 
"ReportSales";<BR>            
entityDataSource.Parameters.AddRange(new 
Telerik.Reporting.ObjectDataSourceParameter[] 
{<BR>            new 
Telerik.Reporting.ObjectDataSourceParameter("SalesID", 
typeof(System.Nullable<int>),18),<BR>            
new Telerik.Reporting.ObjectDataSourceParameter("category", 
typeof(System.Nullable<byte>), 
1)});<BR>            
<BR>            
Telerik.Reporting.Report report = new 
Telerik.Reporting.Report();<BR>            
report.DataSource = 
entityDataSource;<BR>           
<BR>            
this.DefaultReportViewer.Report = report;
Steve
Telerik team
 answered on 29 Feb 2012
1 answer
374 views
Hi all,

My scenario is to place a picture, uploaded by a user.
The picture can be any size, so, I want it to show as much of it as possible.

I have tried different sizetypes, and autosize seems to work the best for me.

The problem - which is a big issue - is, when the picture is wider than the page size. It makes the document contain blank pages on every other page, except the page with the right part of the picture.
This behavior is natural...

What I wanted the most, is some kind of maxsize along with the autosize setting.
Or is there an other recommandation.

Kind regards,
Morten
Elian
Telerik team
 answered on 29 Feb 2012
3 answers
795 views
Hi,

I've been searching online for solutions that can solve my problem but most had to do with Master Details relationships.

My problem in a nutshell.

I have one Master report, the header and footer are populated with one datatable named CompanyInformation. In the details section, I have a telerik.reporting.processing.table, I set the headers and inside the table cells I drag a textbox. I set the value of the textbox to be the corresponding field from the database starting with "[=Field.something]." I bind the header and footer alright but the table will not show up at all and yes the visibility is set to true. By the way, both the master and table datasources are being set at runtime determined by a parameter passed from within an asp.net application.

heres my code.

    private void TelerikReportInvoice_NeedDataSource(object sender, EventArgs e)
        {

            int param = (int)this.ReportParameters["param "].Value;

            InvoiceDataSetTableAdapters.GetOrdersTableAdapter adapter = new TelerikReport.InvoiceDataSetTableAdapters.GetOrdersTableAdapter();
           
InvoiceDataSet.GetOrdersDataTable dt= new InvoiceDataSet.GetOrdersDataTable();
            dt= adapter.GetData(param);

            ((Telerik.Reporting.Processing.Report)sender).DataSource = dt.AsDataView();

        }

        private void table2_NeedDataSource(object sender, EventArgs e)
        {
            InvoiceDataSetTableAdapters.GetOrderFeesTableAdapter adpt = new TelerikReport.InvoiceDataSetTableAdapters.GetOrderFeesTableAdapter();

            InvoiceDataSet.GetOrderFeesDataTable dt= new InvoiceDataSet.GetOrderFeesDataTable();

            int param = (int)this.ReportParameters["param"].Value;  //same as master parameter

            dt= adpt.GetData(param);
            table2.DataSource = dt.AsDataView();

        }

I set both the table and report's datasource to be null in the constructor after initializecomponent() is called. The DataSet Visualizer also shows that there are 2 rows in the datatable returned and i'm also using stored procedures.

Thanks.


Hadib Ahmabi
Top achievements
Rank 1
 answered on 29 Feb 2012
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?