This is a migrated thread and some comments may be shown as answers.

Urgent: Exception in a report(designer file) when placed into a reportBook

3 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 08 Dec 2011, 12:53 PM
Hi,

I've an urgent problem, I've to finish the report printer I've started with telerik reporting. I've each time tested one report and print it, and everything is working fine.

But now, I've to print in one time a lot of report(the report is the same, only things given in the constructor change).

So I created the reportBook(at runtime, I've to):
ReportBook reportBook = new ReportBook();
foreach (Participant participant in participants)
{
    reportBook.Reports.Add(new ConfirmationLetter() { DataSource = participant });
}
uxReportViewer.Report = reportBook;

(if I create the "ConfirmationLetter", and set it to uxReportViewer.Report, everything works).

But now when I generate the report:

I got this 
System.ArgumentException was unhandled
  Message=Parameter is not valid.
  Source=System.Drawing
  StackTrace:
       at System.Drawing.Image.get_RawFormat()
       at Telerik.Reporting.PictureBox.set_Value(Object value)
       at J4N.GroopleReports.Reports.Documents.ConfirmationLetter.InitializeComponent() in C:\Users\J4N\Dropbox\WorkSpaces\DotNET\GroopleReports\Reports\Documents\ConfirmationLetter.Designer.cs:line 90
       at J4N.GroopleReports.Reports.Documents.ConfirmationLetter..ctor() in C:\Users\J4N\Dropbox\WorkSpaces\DotNET\GroopleReports\Reports\Documents\ConfirmationLetter.cs:line 23
       at J4N.GroopleReports.UI.NemesisReports.ReportView..ctor(IEnumerable`1 participants) in C:\Users\J4N\Dropbox\WorkSpaces\DotNET\GroopleReports\NemesisReports\ReportView.xaml.cs:line 42
       at NemesisReports.MainWindow.Button_Click(Object sender, RoutedEventArgs e) in C:\Users\J4N\Dropbox\WorkSpaces\DotNET\GroopleReports\NemesisReports\MainWindow.xaml.cs:line 158
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(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.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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at NemesisReports.App.Main() in C:\Users\J4N\Dropbox\WorkSpaces\DotNET\GroopleReports\NemesisReports\obj\x86\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       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:

On the last line of this:

//
// pictureBox1
//
this.pictureBox1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm));
this.pictureBox1.MimeType = "image/jpeg";
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(19D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(4D, Telerik.Reporting.Drawing.UnitType.Cm));
this.pictureBox1.Value = ((object)(resources.GetObject("pictureBox1.Value")));

Which is generated by the telerik viewer. What's going wrong???

Thank you!

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 08 Dec 2011, 04:07 PM
Hi Julien,

We've not seen this issue but we've fixed several problems related to the PictureBox item that slipped into the Q3 release, so please upgrade to the latest internal build available for download in your account. If the problem persists, please open a support ticket and provide us with a sample project that exhibits the problem so we can advise you accordingly.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Julien
Top achievements
Rank 1
answered on 12 Dec 2011, 10:05 AM
I had this issue with the Q3. It seems that ma picture was really big(1MB) and I was generating something like 300 reports with this 1MB picture
0
Steve
Telerik team
answered on 12 Dec 2011, 01:10 PM
Hello Julien,

Should we consider that you no longer need our help? If this is not the case, please open a support ticket with project that exhibits the problem.

Regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Julien
Top achievements
Rank 1
Answers by
Steve
Telerik team
Julien
Top achievements
Rank 1
Share this question
or