Telerik Forums
Reporting Forum
1 answer
245 views

Has anyone tried to dynamically pass in DataTableMapping and DataColumnMapping to a report that has been created?  I am attemtping to do this.  I have various reports and based on the report I select, I pass in the dataadapter and connection string.

string strSP = name of stored procedure
sqlSelectCommand1.CommandText = "dbo." + strSP;
sqlSelectCommand1.CommandType = CommandType.StoredProcedure;
sqlConnection1.ConnectionString = SqlClient.GetConnectionStr();
sqlSelectCommand1.Connection = sqlConnection1;
sqlDataAdapter1.SelectCommand = sqlSelectCommand1;

Can I do the mapping in this code or do I have to do the mappings within the report itself?

Report report = new Report();
report.DataSource = sqlDataAdapter1;
ReportViewer1.Report = report;

 

Hrisi
Telerik team
 answered on 18 Sep 2007
1 answer
388 views
when i run the report i develope i got this error.

CommandText property has not been initialized.
Hrisi
Telerik team
 answered on 18 Sep 2007
1 answer
206 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
111 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
480 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.0K+ 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
436 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
295 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
289 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
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?