Telerik Forums
Reporting Forum
5 answers
194 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
578 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
274 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
1 answer
220 views

I am new to Telerik Reporting however I have been using RadControls for over 2 years now. I am currently working on an RMS (Records Management System) project for several clients. Needless to say I don’t feel like dealing with all the baggage within Crystal Reports (I can’t stand the viewer) and since I have been “Telerikized” I figured I’d give reporting a shot. I need to display an image in the Page Header that is unique to each client. It has to be able to be loaded dynamically depending on the designated client. Is there any way to do this without having to use a dataset? Parameters?

Bernard J Bobinski

En4cer Web Systems

Bernie
Top achievements
Rank 1
 answered on 26 Aug 2007
1 answer
148 views
Is there a way to render HTML reports without using the ReportView ?

Thank you.
Chavdar
Telerik team
 answered on 24 Aug 2007
1 answer
139 views
I would like to generate HTML reports without using the Report Viewer and then Exporting as Report Archive.  Can this be done programmatically?

Thanks.
Chavdar
Telerik team
 answered on 24 Aug 2007
1 answer
122 views
 

myReport.mypic.Value = "C:\\temp\\picture.jpeg";

myReport is the report and mypic is the picturebox.

i have created a picture box on the report and
on the calling aspx file i give like this.
but the report is not opening that picture.
is there any thing else i have to do.

Rossen Hristov
Telerik team
 answered on 23 Aug 2007
5 answers
428 views
Hello -
I have a report in which has two textbox controls that are placed on the same spot on the report layout.  Only one can have a value at a time (rules handled by the app user interface and database). 

What I want to do is place them on top of each other in the desinger, but then only have one's Visible property set to True if it has data.

How can I do this with the Telerik reporting?  Unlike SSRS, there doesn't appear to be any expression builders.

Thanks,
 - will
Will
Top achievements
Rank 1
 answered on 22 Aug 2007
12 answers
431 views
Hi. I have a radMultiPage and I want to pass a value of a label to a ReportViwer inside the radMultiPage to use in a sql select.
I Have this:
Me.sqlSelectCommand1.Parameters.AddRange(New System.Data.SqlClient.SqlParameter() {New System.Data.SqlClient.SqlParameter("@user_id", System.Data.SqlDbType.VarChar, 20, System.Data.ParameterDirection.Input, FalseCType(0, Byte), CType(0, Byte), "user_id", System.Data.DataRowVersion.Current, "aaa")}) 

But I want to put the value of the label where the "aaa" is. Inside my report.vb I don't have access to the label...

Any help please?

Thanks!
Chavdar
Telerik team
 answered on 16 Aug 2007
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?