Telerik Forums
Reporting Forum
1 answer
277 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
272 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
166 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
238 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
269 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
500 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
193 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
574 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
3 answers
268 views
Hi,

I have a question regarding the scalability of the PDF rendering engine. We currently use SSRS (or tried) to generate some invoices. These invoices are never rendered to HTML, they only need to be rendered directly to PDF. SSRS does fine until you get about 100 pages or so. Anything over about 100 pages it simply won't do. No errors, it just never finishes. And it's slow as hell.

We need something that can generate reports (invoices) in excess of 5,000 pages directly to PDF as quickly as possible. Has anyone used the telerik reporting to generate reports of this size? If so, is it fast? What are the memory requirements?

TIA.

Scott
Vassil Petev
Telerik team
 answered on 28 Aug 2007
6 answers
1.0K+ views
Hi,

I have a report with some textboxes where some functions as labels and other as datafields. I wan't the labels and datafields only to be shown if the datafield contains data.

Lets say I have a labelDescription and a textBoxDescription. If the Text of the textBoxDescription is an empty string I wan't to hide both the textBoxDescription and the labelDescription. I have managed to hide the textBoxDescription by implementing it's ItemDataBound event and setting it's Visible property to false if it doesn't contain any data but I can't figure out how to hide the labelDescription.

I tried setting the Visible property of the labelDescription to false but that doesn't seem to work. Here is my code:

private void textBoxDescription_ItemDataBound(object sender, System.EventArgs e)  
{  
    Telerik.Reporting.Processing.TextBox textBoxDescription = (Telerik.Reporting.Processing.TextBox)sender;  
 
    if (textBoxDescription.Text == "")  
    {  
        textBoxDescription.Visible = false;  
        labelDescription.Visible = false;//This doesn't work  
    }  

How do I hide the labelDescription?

Thanks
Phil
Top achievements
Rank 2
 answered on 28 Aug 2007
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?