Telerik Forums
Reporting Forum
1 answer
73 views

Hi,

I have 3 reports .I have added it in the Report book one by one and added report book into reportviewer.
so it generates 3 pages in the report.
My aim is to dispaly these 3 reports into first page only.
how is it possible?

Thanks,
sindu.
Steve
Telerik team
 answered on 02 Feb 2012
1 answer
74 views

Hi,

I have two reports  and code will be given below ..

Report7 objreport1 = new MyReportLib.Report7();
            objreport1.DataSource = dt1;

Report8 objreport1 = new MyReportLib.Report8();
            objreport2.DataSource = dt1;

I want to display these 2 report in ReportBookControl ...

I am using the code ...

ReportBook reportBook = new ReportBook();

 

 

reportBook.Reports.Add(new MyReportLib.Report7());

 

 

 

reportBook.Reports.Add(new MyReportLib.Report8());

 

 

 

ReportBookControl1.Reports.Add(new MyReportLib.Report7());
ReportBookControl1.Reports.Add(new MyReportLib.Report8());

 

 

 

ReportViewer1.Report = ReportBookControl1;

 


but no report is displaying in the report viewer.
How can I display these reports into reportbook control and then to reportviewer.


Thanks In advance .
Sindu.



Steve
Telerik team
 answered on 02 Feb 2012
1 answer
483 views
I upgraded the Telerik Reporting library for my WinForms project due to a bug in Q1 2009 Reporting.  I upgraded to Q3 2011 and recompiled.  If I revert to the older DLL, the report displays as expected.

I get the following error:

System.ArgumentOutOfRangeException was unhandled
  Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
  Source="mscorlib"
  ParamName="index"
  StackTrace:
       at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at Telerik.ReportViewer.WinForms.InteractivePageLayout.DrawPages(Graphics graphics, Rectangle rectangle, Int32 index)
       at Telerik.ReportViewer.WinForms.WinViewer.OnPaint(PaintEventArgs eventArgs)
       at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
       at System.Windows.Forms.Control.WmPaint(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.UserControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at Telerik.WinControls.SafeNativeMethods.RedrawWindow(IntPtr hWnd, IntPtr rectUpdate, IntPtr hRgnUpdate, UInt32 uFlags)
       at Telerik.WinControls.UI.ThemedFormBehavior.RefreshNC()
       at Telerik.WinControls.UI.ThemedFormBehavior.OnWMNCActivate(Message& m)
       at Telerik.WinControls.UI.ThemedFormBehavior.HandleWndProc(Message& m)
       at Telerik.WinControls.UI.RadFormBehavior.HandleWndProc(Message& m)
       at Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.Show()
       at ColonialFence.ChainLinkOrderForm.radButtonPrint_Click(Object sender, EventArgs e) in C:\Users\Peter\Documents\Visual Studio 2008\Projects\ColonialFence\ColonialFence\ChainLinkOrderForm.cs:line 203
       at Telerik.WinControls.RadItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
       at Telerik.WinControls.RadItem.DoClick(EventArgs e)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
       at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at ColonialFence.Program.Main() in C:\Users\Peter\Documents\Visual Studio 2008\Projects\ColonialFence\ColonialFence\Program.cs:line 291
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Here's the line of code where it fails:

  private void radButtonPrint_Click(object sender, EventArgs e)
        {
            Program.PrintForms.Category = Program.Category.CHAINLINK;
            Program.fPrint = new PrintForm();
            Program.fPrint.Show();                        <-----------------------------  fails on the Show() method
        }

Please let me know what I need to do.  I was told there was a bug (by Telerik) in Reporting Q1 2009 as it relates to 64-bit Windows and that I needed to upgrade to fix it.  Now this!   Please help!

Thanks,

Peter Mello
Steve
Telerik team
 answered on 02 Feb 2012
3 answers
95 views
I am experiencing problems seeing the parameter area in my reports. I have to refresh the page before I can see my Param combobox or preview button when using IE8. Google Chrome (16.0.912.77) appears to work fine.
I am usingTelerik_Reporting_Q3_SP1_v5_3_12_119_Dev & Report Viewer for Asp.Net
The compatability view settings are not making any difference for me.

Any suggestions?
Steve
Telerik team
 answered on 02 Feb 2012
1 answer
135 views
Hello Telerik,

I'm having alignment issues with my controls on the report. please find attached picture where Created By and Prompt are not in the same indent. Is there any way to make them both in the same indent.

Report needs to look like

Item Status:                          Prepared By:               Prepared On:                    
Last Updated On:                 Rate:                           Quantity:       
                            
Thanks!
Steve
Telerik team
 answered on 02 Feb 2012
1 answer
197 views

Hi,

I'm trying to render a chart inside the Telerik report. I'm also rendering the same chart in my MVC web application using Telerik Extensions for ASP.NET MVC chart control. But both are giving different charts.

Here is the code:

Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
            Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition;
  
            defChart.Series.Clear();
            int xAxisIndicesCount = (from cdsl in chartDataSourceList select cdsl.XAxisValue).Distinct().Count();
  
            defChart.PlotArea.XAxis.Items.Clear();
            defChart.PlotArea.XAxis.AutoShrink = false;
            defChart.PlotArea.XAxis.AutoScale = false;
            defChart.PlotArea.XAxis.AddRange(0, (xAxisIndicesCount > 0) ? xAxisIndicesCount - 1 : 0, 1);
            defChart.SeriesOrientation = seriesOrientation;
            defChart.DataGroupColumn = "GroupingValue";
            defChart.PlotArea.XAxis.DataLabelsColumn = "XAxisValue";
            defChart.Legend.Appearance.GroupNameFormat = "#VALUE";
            defChart.IntelligentLabelsEnabled = true;
  
procChart.DataSource = chartDataSourceList;


Essentially if you can compare the charts I have attached, in the PDF chart, the series columns are misplaced. Please check and revert if you need further clarifications. I hope you will better be able to figure the issue by comparing the charts, than explaining it here. Please revert asap.

Thanks

Yavor
Telerik team
 answered on 02 Feb 2012
2 answers
172 views

Hello friends,

I am using crystal report in my project. in this, I am using crystal's pull method to display data in it.

So when any small change [adding Total, Alignment, or add new field in the existing data source etc.] in report is needed, i can copy modified the .rpt file in to the production server, without the asp.net published files.

Can I use Telerik report in the same way ?

Shivan
Top achievements
Rank 1
 answered on 02 Feb 2012
0 answers
248 views
Hi,

I'm trying to create a table in which besides having an unknown number of rows in the Data Source I might have too a unknown number of columns (up to a max) so I decided to add the maximum amount of columns I could have and hide them using conditional formatting on all the cells of that column if the value returned by processing the row in a user-defined function are < 0. 

I've made sure that the rule on the conditional formatting is being applied as if I change the Background this one changes, however when I set the Layout to not visible (unchecked) the cells don't hide.

Any idea on how this could be done or why it's not working?
Roberto
Top achievements
Rank 1
 asked on 02 Feb 2012
0 answers
193 views
I am currently developing reports for a web based solution using Telerik Reporting and the report viewer.  The reports created could display a different image in the detail section for every single record.  As a result I have a function that loads the appropriate image.  When I first implemented this I quickly realized that I had a memory usage problem.  The problem was that an image object was being loaded into memory for each record on the report.

To attempt to solve this problem I created a static variable that stores the images that have been loaded into memory already. When the original method is called it checks to see if the image is already in memory.  If the image is found in memory it returns the located image otherwise the image is loaded.  Additionally, logic is built in so that an image is only retained in memory for 15 minutes since the last time it was accessed.  With this approach I was able to decrease the memory usage and increase the performance.  For simple implementations this solution would be enough but unfortunately the current requirements are more complex.

The problem is that I am governed by regulations that dictate the size of the images based on the number that are displayed.  Since this could be different for each detail record my solution is to create a composite image in memory that I can size to meet my requirements.  Now instead of working with possibly 100 images the amount of images that I could be working with could be in the tens of thousands.  There are some rules I can put in place to limit the amount of unique images but I am still concerned about the amount of memory that will be used as the number of users grow and more reports are generated.

The best solution that I can think of is to only keep the image in memory for as long as it is required but I can not determine a good way to accomplish this.  The static variable is shared by the entire application (every user) and the image can not be disposed of until report generation is complete.  My current goals to solve this problem are:

  1. Keep memory usage at a minimum (only one unique image loaded for all users using the application)
  2. Only keep an image an memory for as long as it is needed by current report requests
  3. Reduce the impact on the end user experience

At this point I have accomplished the first goal but I am still not satisfied with the solution to the second goal.  I have some ideas on how to keep track of which report jobs are using an image while at the same time only having the single image loaded.  I am concerned that by building on this extra layer of tracking it will have a significant impact on performance.  Before I went down that road I wanted to check and see if I am trying to over complicate an issue that doesn't need to be complicated.  Is their a simpler solution to what I am trying to accomplish using Telerik Reporting?

Kevin
Top achievements
Rank 1
 asked on 01 Feb 2012
1 answer
377 views
Version=5.1.11.928

Adding a boolean parameter with visibility set to true, is causing a javascript error in the browser which means that the report never generates, and the "generating report" swirl keeps swirling.

If you just try to preview the report in the report creator, then it works fine.

The file throwing the error is Resources.Parameters.js:
the  method
BooleanEditor.prototype.Init = function ()
{
    var radioButtonList = document.getElementById(this.radioButtonID);
    if (radioButtonList)
    {
        var inputs = radioButtonList.getElementsByTagName("INPUT");
        if (inputs)
        {
            var editor = this;
            for (var i = 0; i < inputs.length; i++)
            {
                var input = inputs[i];
                input.onclick = function ()
                {
                    editor.ValueChanged();
                };
                var label = input.nextSibling;
                var text = "";
                var reportViewer = GetReportViewer();
                switch (i)
                {
                    case 0:
                        text = reportViewer.GetString("ReportParametersTrueValueLabel");
                        break;
                    case 1:
                        text = reportViewer.GetString("ReportParametersFalseValueLabel");
                        break;
                }
                label.firstChild.nodeValue = text;
            }
        }
    }
    return false;
}

var label = input.nextSibling;
results in label = null;
so once we get to:
label.firstChild.nodeValue = text;
an error is thrown. I've seen this both in IE8 and in Firefox 9.0.1

You can test it by creating a blank report, adding a single boolean parameter and making it visible.

You must then create a web project so you can view the report in a report viewer control in a browser.

If there's anyway I can fix this without creating "fake" string parameters and then remapping them to the real boolean parameters, please let me know.
Steve
Telerik team
 answered on 01 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?