Telerik Forums
Reporting Forum
1 answer
220 views
I am working on a dynamic feature where a report is loaded in a reportviewer.  I have a dropdownlist where the user can select one of the reports.  The selected report is then loaded in the viewer.

Each value in the dropdownlist called ddl1 is the name of the reporting class that I want to view.  For example, a user selects "InvoiceReport"...I would like the following to happen.

ReportViewer1.Report = new InvoiceReport();

I am unable to accomplish this because this is the code I have.

string strddl = ddl1.SelectedItem.Value + "()";
ReportViewer1.Report = new strddl;

Or I have been trying to do this as well...

Telerik.Reporting.Report report = (Telerik.Reporting.Report)ddl1.SelectedItem.Value;

How do I pass in the string value of the report name into the reportviewer1.report loading declaration?

Have any ideas?
Thanks

Svetoslav
Telerik team
 answered on 11 Sep 2007
1 answer
143 views
Hi

I wrote this code to create my chart dynamically:

<radc:ChartSeriesItem YValue="<%=y0%>" XValue="<%=x0%>"></radc:ChartSeriesItem>
                                        <radc:ChartSeriesItem YValue="<%=y1%> " XValue="<%=x1%>" ></radc:ChartSeriesItem>

but i got this error message :

Overflow error.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.OverflowException: Overflow error.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[OverflowException: Overflow error.]
System.Drawing.Graphics.CheckErrorStatus(Int32 status) +104
System.Drawing.Graphics.DrawLines(Pen pen, Point[] points) +317
Telerik.WebControls.Chart.DrawHLineSeries(ChartSeries series, Rectangle plotRect, Int32 lineType) +1034
Telerik.WebControls.Chart.DrawHorizontalSeries(Rectangle chartRectangle, Rectangle plotRectangle, StringBuilder sbImageMap) +496
Telerik.WebControls.Chart.DrawSeriesManager(Rectangle chartRectangle, Rectangle plotRectangle, StringBuilder sbImageMap) +415
Telerik.WebControls.Chart.Draw(Int32 chartWidth, Int32 chartHeight, StringBuilder sbImageMap) +3139
Telerik.WebControls.RadChart.RenderContents(HtmlTextWriter writer) +532
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +43
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +98
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +43
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +335
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +56
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +234
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
System.Web.UI.Control.Render(HtmlTextWriter writer) +31
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5534

Please let me know how can I get rid off this error .Or plz. suggest any other method to make the coordinates of my chart dynamic.

Thanks and regards,

Amlan
Chavdar
Telerik team
 answered on 10 Sep 2007
5 answers
535 views
Hi.
I am trying to create reports with webforms.
I have several questions:
Is it possible to add my own custom buttons in the toolbar?
Is it possible to add my own custom export format?
Is it possible to change text for the different items in the toolbar?
Is it possible to create dynamic rdlc on the fly?

I have been testing reportviewer with VS2005.
http://www.gotreportviewer.com/

Many thanks in advance.
Michael
neils
Top achievements
Rank 1
 answered on 09 Sep 2007
3 answers
2.2K+ views
Hi
    We need to create a 3 page FAX report. What is the best way to add multiple pages in a report.
 
   Once the report is generated we need to save it as a PDF.

Thanks

Jason
Rossen Hristov
Telerik team
 answered on 08 Sep 2007
0 answers
1.5K+ views

The goal of the Telerik Forum is to provide all registered users with a way to find answers to their questions before officially contacting Telerik. In case you need a faster and precise response, please start a new support ticket as it gets higher priority than Forum posts.

A post in the Forums doesn't guarantee you a response from the Telerik support team although 95% of all posts are eventually addressed. Additionally, a post is not assigned a response time as with the support ticketing system.

The Forums can be used to:

  • Discuss coding techniques with fellow Telerik users
  • Share your experience on the Telerik suite of controls
  • Contact Telerik with a question
  • Contact Telerik MVPs
  • Help other users

Telerik strives to constantly improve its support services but it is essential to have full information to supply precise replies. If we do not have enough details we will not be able to properly address your inquiry and we will ask for further info. The extra loop is sure to slow down the time it takes to resolve your problem, and subsequently the further development of your project.

It is vital that you follow these guidelines in order to receive an accurate response:

GUIDELINES TO USING THE SUPPORT FORUM
  1. You should have a valid Telerik account to post in the Forum. You can create one from the Registration page here. Anonymous names will not be allowed and such posts will not be answered or will be deleted. 
  2. Use the relevant product forum to post your questions and comments.
  3. Post your questions in English.
  4. Describe your question in detail. Make sure to include the following information: 
    • Type of project: Web Site, Class library, Windows forms application, WPF or Silverlight application?
    • Does the problem relate to the Win Viewer, Web Viewer, WPF or Silverlight viewer?
    • Step by step instructions on how to reproduce the problem.
    • File attachments (except images) are not supported, however you can paste a code snippet. If you think that Telerik needs to review your project and/or files, or that a screenshot is necessary, start a new support ticket.
    • Stack trace, if applicable.
    • Used programming language (C# or VB.NET).
       
  5. State the software you are using, including: 
    • OS version and applied service packs.
    • Regional and language settings, if different from En-US.
    • Exact version of Telerik Reporting.
    • Exact browser version, if you are using the Web Viewer.
    • PDF viewer version, if applicable.
    • MS Office version, if applicable.
       
  6. Telerik reserves the right to use, reproduce and share the material you post within the forums. 
  7. Telerik reserves the right to not participate in all posts. 
  8. Telerik reserves the right to remove any messages that do not comply with these terms.

ENJOY!!!

Best Wishes,
The Telerik team

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 08 Sep 2007
4 answers
514 views
Hello (again) -

On my report's page header, I have a text box and when the report is generated, the text value needs to change depending on the item from a drop-down list on the web page.

I have tried a few ways to get this to work but I have not been succesful.  Does anyone know of a way to do this with the report control on a web page?  I can save the drop-down list selected value as a Session variable if necessary.

Thanks
 - will
Will
Top achievements
Rank 1
 answered on 07 Sep 2007
1 answer
332 views
Support,

My report look like this:

           amt1         amt2         percentage (amt2-amt1)/amt1*100%
-----------------------------------------------
           100           150                 50
           200           400               100
----------------------------------------------
total    300            550               83.33

I know how to calculate the total of amt1 (=sum(amt1)), total of amt2 (=sum(amt2)).
Question:
 1. How to calculate total line "percentage"?

Benson.
Svetoslav
Telerik team
 answered on 06 Sep 2007
1 answer
308 views
Hello
    I am having a number of problems with the preview and html preview.

    Initially I was getting "reporting the source of the report definition has not been specified"

    I removed all my data fields and my odbcdataadapter and it started to display a preview.  I then add a number of additional textboxes and an picture box (with image set) and the preview no longer updates.

    I have tried rebuild solution but the preview no longer changes.

    Any ideas would be appreciated.

jason
Rossen Hristov
Telerik team
 answered on 06 Sep 2007
4 answers
191 views

I'm trying out the Telerik Reporting software.  Everytime I try to display a report that I've created I get the same error...

System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Reporting.ImageRendering.CanvasBase.MeasureString(...)

...and the error message goes on much longer than that.

I even get this error when following the Quick Start tutorial.

Can someone help me out so I can evaluate whether or not Telerik Reporting is suitable for my project.

Thanks, Bryan

Rossen Hristov
Telerik team
 answered on 05 Sep 2007
4 answers
268 views
I need help figuring out why the following code does not work:

I eventually get an out of memory exception on this:
    private void ShowReport(DataTable mydt1)  
    {  
 
        try 
        {  
 
            Report report = new Report();  
            DetailSection detail = new DetailSection();  
            Telerik.Reporting.ReportItemBase[] mylist = new ReportItemBase[mydt1.Columns.Count];  
            int icol = 0;  
            foreach (DataColumn col in mydt1.Columns)  
            {  
                mylist[icol] = createtextbox(col.ColumnName.ToString());  
                icol++;  
                //detail.ColumnCount++;  
            }  
              
            detail.Items.AddRange(mylist);  
 
            report.DataMember = "HIPAAlog";  
            report.DataSource = mydt1;  
            report.Items.Add((ReportItemBase)detail);  
            detail.KeepTogether = false;              
            ReportViewer1.Report = report;  
            ReportViewer1.Visible = true;  
 
        }  
        catch (Exception ex)  
        {  
            throw (ex);  
        }  
    } 

But if I use:

    private void ShowReport(DataTable mydt1)  
    {  
 
        try 
        {  
 
            Report report = new Report();  
            //DetailSection detail = new DetailSection();  
            //Telerik.Reporting.ReportItemBase[] mylist = new ReportItemBase[mydt1.Columns.Count];  
            //int icol = 0;  
            //foreach (DataColumn col in mydt1.Columns)  
            //{  
            //    mylist[icol] = createtextbox(col.ColumnName.ToString());  
            //    icol++;  
            //    //detail.ColumnCount++;  
            //}  
              
            //detail.Items.AddRange(mylist);  
 
            report.DataMember = "HIPAAlog";  
            report.DataSource = mydt1;  
            //report.Items.Add((ReportItemBase)detail);  
            detail.KeepTogether = false;              
            ReportViewer1.Report = report;  
            ReportViewer1.Visible = true;  
 
        }  
        catch (Exception ex)  
        {  
            throw (ex);  
        }  
    } 

It works, except nothing is displayed!  I get no data in the report (should be over 3,00 hits...)  So what the heck am I missing?  It should be a fairly straight forward deal.  I take a bunch of data, put it in a datatable, and then try to greate a dynamic multi-column report out of it...


OH!
Here is a function I missed posting..

    private Telerik.Reporting.TextBox createtextbox(string FieldName)  
    {  
        Telerik.Reporting.TextBox textBox2 = new Telerik.Reporting.TextBox();  
        textBox2.Value = "=[" + FieldName + "]";  
        textBox2.TextWrap = false;  
        textBox2.CanGrow = true;  
        textBox2.CanShrink = true;  
        return textBox2;  
    } 
Chavdar
Telerik team
 answered on 04 Sep 2007
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?