Telerik Forums
Reporting Forum
1 answer
92 views
Hi there,

currently I am working on a project to create custom reports.
I do that in this way:
I created a WCF-Service with a method which returns a Stream. This stream is the custom report, rendered to a pdf that is shown in a RadPDFViewer.
I do that because we need to send a list of all Reports that should be merged to one reportbook where every report is one single site with different data.
To create one report, I use this function:
public Report GetReport(ReportEntry entry)
{
dynamic newReport = new Object();
string parameterNameWithError = string.Empty;
string parameterValue = string.Empty;
string parameterType = string.Empty;
try
{
Type reportType = Type.GetType("ReportingService.Reports." + entry.Name);
newReport = Activator.CreateInstance(reportType);
foreach (var para in entry.ParameterList)
{
parameterNameWithError = para.Name;
parameterValue = para.Value;
parameterType = para.Type;
newReport.ReportParameters[para.Name].Value = para.Value;
}
}
catch (Exception ex)
{
newReport = new Reports.ErrorReport();
newReport.ReportParameters["ReportName"].Value = entry.Name;
newReport.ReportParameters["ParameterName"].Value = parameterNameWithError;
newReport.ReportParameters["ParameterValue"].Value = parameterValue;
newReport.ReportParameters["ParameterType"].Value = parameterType;
newReport.ReportParameters["ErrorMessage"].Value = ex.Message;
}
return newReport;
}

Now I want to create a function that gives me a list of all available reports with its ReportParameters.
I already get a list of reports, but I am now looking for a way to get the parameters.
This is what I have at the moment:

Type[] classes = Assembly.GetExecutingAssembly().GetExportedTypes();
foreach (Type t in classes)
{
  if (t.FullName.Contains("Reports.Report"))
  {
    PropertyInfo[] props = t.GetProperties();
    foreach(var prop in props)
    {
      if(prop.Name.Equals("ReportParameters"))
      {
        // What should I do here ???
      }
    }
}

Any kind of idea or hint?

Best Regards
Manfred







Steven
Top achievements
Rank 1
 answered on 25 Jan 2013
1 answer
167 views
Hi,

Please could you give me some advice on the following. We are developing an application that will allow users to define their own custom reports that will be generated from our application data. The proposal is to simply allow the user to specify the grouping and column details that they wish to include in the report and then save their selection. A report would then be produced using telerik reporting based on the details they have selected.

One approach that we have considered to implement the above would be to create an xml file to generate the report from. This xml would be based on the xml generated by the telerik report serialization method, which would allow us then to create the report by deserializing the report using the telerik methods.

The thinking behind the above is that it would create a clean method of storing (they need to be saved for re-use and further amendments of the grouping/fields) and generating the report based on the same xml source. Do you think that this would be acceptable way of generating our reports?

Also is there any documentation defining the telerik xml file format, and is this format likely to change and potentially break any files we create?

Thanks
Steve
Telerik team
 answered on 25 Jan 2013
1 answer
195 views
In the stand alone designer, is it possible to set a report section or panel to be collapsibile so that it may be collapsed and expanded at run time in the viewer?
Stef
Telerik team
 answered on 25 Jan 2013
4 answers
238 views
Hi,

I need to display "No Record Found" Message in Section of Parent report when subreport has no record to display.

Please suggest what to do ??

Thanks...
Ajay
Top achievements
Rank 1
 answered on 25 Jan 2013
4 answers
138 views
Having a problem with charts when deployed to a server on Azure.  It seems any chart put on a report will cause an error:

An error has occurred while processing Chart 'chart1': Parameter is not valid.

The chart is a completely unconfigured chart.  No data. Nothing, but it causes an error just being there.  If the chart is removed the report works properly.

The same report works locally, deployed to IIS, and testing in Azure Compute Fabric locally, but will not work when deployed to production.

The instance is configured to run framework 4.5, using the free cloud websites program. (Which should make it easy for testing)
Steve
Telerik team
 answered on 25 Jan 2013
5 answers
389 views
I have a Silverlight Report Viewer.  I have a few parameters I am using to filter my results, and they have AllowNull set to true. But can I change the text of the checkbox from "Null" to "All"?
Steve
Telerik team
 answered on 25 Jan 2013
1 answer
254 views
Hi
I have to generate a pdf report which is already designed and working with silverlight reporting viewer.
Now same report needs to be generated with another 3rd party application so please suggest me if i can generate the same report from a command line utility.
 I need a fixed pdf format and if that command line application can generate the report to predefined location that should work.
Please suggest the best method
Thanks in advance
Chris Gillies
Top achievements
Rank 1
 answered on 25 Jan 2013
1 answer
106 views
Hello Everyone,

I just upgraded to the new version of Telerilk Reporting yesterday (6.2.13.110) and now when I pass my parameters in my code behind the parameters aren't being excepted. This worked in the version prior to this one and I'm not sure what has changed.

Here is my code that I was using previously to dynamically changed the parameters on the fly:

Private Sub _GenerateReport()
 
        Dim SeasonReport As New CISReports.NBA_PlayerShotChart()
 
        ' perform additional operations on the report object if needed        
        Dim SeasonInstanceReportSource As New Telerik.Reporting.InstanceReportSource()
        SeasonInstanceReportSource.ReportDocument = SeasonReport
        Me.ReportViewer1.ReportSource = SeasonInstanceReportSource
        Dim SeasonReportSource = Me.ReportViewer1.ReportSource
        SeasonReportSource.Parameters.Add("Season", CInt(cmbSeason.SelectedValue))
        SeasonReportSource.Parameters.Add("SeasonTypeID", CInt(cmbSeasonType.SelectedValue))
        SeasonReportSource.Parameters.Add("TeamAbbr", cmbTeams.SelectedValue)
        SeasonReportSource.Parameters.Add("PlayerID", CInt(cmbPlayer.SelectedValue))
    End Sub


Any help would be greatly appreciated since my reports are quite useless without the ability to dynamically change the parameters.

Thanks,

Brad
Stef
Telerik team
 answered on 24 Jan 2013
18 answers
308 views
Upgraded to latest Reports, now get error trying to print.  Using wpf reportviewer, when I click on the print button I get the following error.

Attempt by method 'Telerik.ReportViewer.Wpf.ReportViewerModel.Print()' to access method 'Telerik.ReportViewer.Wpf.ReportViewerModel.PaperKindToPageMediaSizeName(System.Drawing.Printing.PaperKind)' failed.

StackTrace:
   at Telerik.ReportViewer.Wpf.ReportViewerModel.Print()
   at Telerik.ReportViewer.Wpf.ReportViewerModel.PrintReportCommandImpl.Execute(Object parameter)
   at Telerik.ReportViewer.Wpf.ReportViewerModel.Command.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at MS.Internal.Commands.CommandHelpers.ExecuteCommandSource(ICommandSource commandSource)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Buttons\RadButton.cs:line 389
   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.RouteItem.InvokeHandler(RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.EventRoute.ReInvokeHandlers(Object source, RoutedEventArgs args)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
   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.RouteItem.InvokeHandler(RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.EventRoute.InvokeHandlers(Object source, RoutedEventArgs args)
   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)

Davin
Top achievements
Rank 1
 answered on 24 Jan 2013
3 answers
222 views
Hi, While trying download source code, from below url it is giving error as

"Oops...

It seems there was a problem with our server.

Try reloading the page."

Please check for above and correc this asap.
URL is :
http://www.telerik.com/automated-testing-tools/blog/10-05-05/dynamically-loading-telerik-reports-with-mef.aspx

Boyan Boev
Telerik team
 answered on 24 Jan 2013
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?