Telerik Forums
Reporting Forum
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
506 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
324 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
302 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
188 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
263 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
1 answer
334 views
Hi,
I want to generate maps that fit perfect into the PictureBox. Therefore I need the pixel size of the Picture Box. The size of Picture Boxes are typically given in inch or cm. Do you have any ideas how to calculate the pixel size? Is there a way to configure the image quality (DPI) ?
Sincerely,
Alexander Brütt
Chavdar
Telerik team
 answered on 31 Aug 2007
7 answers
545 views

Hi, when I publish my site I get this error:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'Telerik.Reporting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' or one of its dependencies. O sistema não conseguiu localizar o ficheiro especificado.

Source Error:

Line 53: 				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 54: 				<add assembly="Telerik.Reporting.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
Line 55: 				<add assembly="Telerik.Reporting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
Line 56: 				<add assembly="Telerik.Reporting.Processing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"/></assemblies>
Line 57: 		</compilation>

Source File: C:\dados\Giscon\site\proform\web.config    Line: 55

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Reporting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

In Visual Studio everything works fine. Any help?
Chavdar
Telerik team
 answered on 31 Aug 2007
5 answers
237 views
Is there a way to get the height of a report so I can make the report viewer control the same height? I dont want it to scroll.
Chavdar
Telerik team
 answered on 30 Aug 2007
5 answers
658 views

Hello!  I'm attempting to build a simple set of reports against a development project that is currently using SQL Reporting 2005, which has some shortcomings I think your product may handily overcome.... if I can only figure out what I'm doing wrong here.

My web app needs to generate PDF reports and display them to the user.  Here's the code I'm trying to use against the telerik Reporting.  Note that I'm trying to pull the rendered PDF into a byte array and pass that array directly to the context.Response object.  (This is very similar to what I do with SSRS, which is working.)  Unfortunately, with the telerik report in the code below, when the Adobe Reader opens on the client's system, an error message pops up that reads "there was an error opening this document.  The file is damaged and could not be repaired."  (This was with Adobe Reader 7.0.8 by the way.)

Note that there's some lines in the code below that are commented out - these are pulling the PDF into a FileStream and writing it to a file - if I try to open the file thus created, it works like a charm!!  (same version of the reader.)

I'd like to avoid all that sloppy file writing... any ideas what in the world I'm doing wrong here????

Oh, and thanks for letting us use the beta of what looks to be a fabulous product... I was sold as soon as I realized the codebehind was C# and not some horrible VBA like what SSRS uses!

 

JobList report = new JobList();  
string mimeType = string.Empty;  
string extension = string.Empty;  
Encoding encoding = null;  
 
byte[] RenderedRptArr = Telerik.Reporting.Processing.ReportProcessor.Render("PDF", report, null, out mimeType, out extension, out encoding);  
 
//FileStream sOut = new FileStream("c:\\dev\\joblist.pdf", FileMode.CreateNew, FileAccess.Write);  
//sOut.Write(RenderedRptArr, 0, RenderedRptArr.Length);  
//sOut.Close();  
 
 
 
 
System.Web.HttpContext context = System.Web.HttpContext.Current;  
 
string strPath = context.Request.ApplicationPath;  
Response.AppendHeader("content-disposition", "attachment; filename=JobList.pdf");  
 
Response.Clear();  
Response.ContentType = "application/pdf";  
context.Response.BinaryWrite(RenderedRptArr);  
Response.Flush();  
 

 

Rossen Hristov
Telerik team
 answered on 29 Aug 2007
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?