Telerik Forums
Reporting Forum
5 answers
230 views
Hi,

1. How do I set ChartSeriesItem.Label.Appearance.Visible = false
after binding a stackedbar-chart's datasource to a DataTable in the NeedDataSource method?

2. If this cannot be accomplished, I assume I would have to build the ChartSeries programmatically.  Can you direct me to code specifically geared towards programmatically building stackedbar charts? (The goal is an X-Axis with a date-label and stacked values representing different count-values. The legend should be the DataTable column-names.) 

The DataTable looks like this (the column-names are actually error-numbers from an external system):

MDate     10230     13456     23432
2011-01       4         1         1
2011-02       0         2         2
2011-03       2         0         0

The chart should look like this:
6|-G--|
5|----|  |----|           ¤ 10230(red)
4| B  |  | G  |           ¤ 13456(blue)
3|----|  |----|           ¤ 23432(green)
2| R  |  | B  |  |----|
1|____|__|____|__|__R_|_____
  2011    2011    2011
   -01     -02     -03

Hope you understand my question. The chart works fine with databinding but I would really like to take away the text on the bars and just leave the color with a legend instead.

Thanks for any assistance you can offer.
Elian
Telerik team
 answered on 02 Mar 2012
1 answer
216 views
I have a report in which I want to use a different sub-report for each detail item depending on a value in the item data. For example:

If type=1, Use sub-report Sub1
If type=2, Use sub-report Sub2
etc.

Is this possible? If so, how? I've tried putting a SubReport in the detail, and in the detail_ItemDataBound set the SubReport.ReportSource, but it doesn't seem to work. Any ideas gratefully received.

Thanks

Ross Crawford
Lucania
Top achievements
Rank 1
 answered on 02 Mar 2012
7 answers
346 views
My report was working fine using a SqlDataSource that used a SELECT without any WHERE clause.  Then I changed it to use an ObjectDataSource method that uses parameters to generate a WHERE clause, and my report now fails.  The ObjectDataSource method works fine when invoked by my WebForms, and I tried putting a breakpoint in my business object's Select method, and I never got there, so I'm pretty sure it's not a problem within my object.

When I try to "preview" the report, the designer shows me this error message:
    An error has occurred while processing Report 'MyReport':
    Exception has been thrown by the target of an invocation.
    --------------------- InnerException ----------------------
    Object reference not set to an instance of an object.

I based my implementation upon this tutorial: http://tv.telerik.com/watch/reporting/objectdatasource/using-parameters-with-objectdatasource-component

I'm a Reporting newbie, and I need to learn how to debug reports.  (Apparently you can't simply step through them using the debugger.)  So any tips on how to investigate report bugs would be gratefully accepted.
Steve
Telerik team
 answered on 01 Mar 2012
1 answer
355 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
718 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
197 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
356 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
205 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
190 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
221 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
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?