Telerik Forums
Reporting Forum
1 answer
166 views
Can you export an existing report to PDF format in a medium trust environment?

Will the following code work on Medium Trust?

void ExportToPDF(Telerik.Reporting.Report reportToExport) 
    { 
        ReportProcessor reportProcessor = new ReportProcessor(); 
        RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null); 
 
        string fileName = result.DocumentName + ".pdf"
 
        Response.Clear(); 
        Response.ContentType = result.MimeType; 
        Response.Cache.SetCacheability(HttpCacheability.Private); 
        Response.Expires = -1; 
        Response.Buffer = true
 
        Response.AddHeader("Content-Disposition"
                           string.Format("{0};FileName=\"{1}\""
                                         "attachment"
                                         fileName)); 
 
        Response.BinaryWrite(result.DocumentBytes); 
        Response.End(); 
    }    
Peter
Telerik team
 answered on 07 Jun 2010
1 answer
248 views
I'm using the Model-View-ViewModel pattern in a WPF project and I have the new WPF ReportViewer control in a UserControl. I want to databind the Report property to a property of the underlying VIewModel:

 

 

 

<telerik:ReportViewer Report="{Binding Report}"

 

 

 

Grid.Column="1"/>

 


However, the report does not display - it just says "No Report" in the ReportViewer. I fired up Snoop and noticed that the DataContext does not appear to inherit from the UserControl. It's set to Telerik.ReportViewer.ReportViewerModel. Therefore, my binding is presumably looking for a Report property on this object, not the DataContext of the UserControl that hosts the ReportViewer. Is this possible? When the Report property gets set in my VM I'm raising a property changed event to update the UI.

Thanks,
Dave
Steve
Telerik team
 answered on 04 Jun 2010
1 answer
111 views
Hi, I have two questions with a chart that I'm designing, as you can see in the attached picture, I want to format the Y Axis Items I tried currency Format But it adds 2 decimal positions and I just want the integer part, and my second questions is about the X axis item these values are a little bit inside the chart and I want them outside just like when you are en desing time. Thank you
Steve
Telerik team
 answered on 04 Jun 2010
1 answer
1.3K+ views
How can I Add a new section in a report? I want to do this so that I can put a page break by setting the pagebreak property on the section to true, is there another way to put page break?
Steve
Telerik team
 answered on 04 Jun 2010
3 answers
177 views
Hi,
I have a solution where some data is passed in a parameter to the report and the report decides which database to retrieve it's data from based on those values. This works fine for the report's datasource as I use the NeedDataSource event to connect the report to the appropriate db at runtime. 
How do I do this for parameters which are bound to SqlDataSource's?
The queries for the parameters seem to be executed too early and I can't find a 'needdatasource' event for the sqldatasource to give the appropriate connection strings.

Thanks

Andrew
Massimiliano Bassili
Top achievements
Rank 1
 answered on 04 Jun 2010
0 answers
187 views

I'm going the Telerik Reporting learning guide. On page 55, step #9, the following query is referenced:

SELECT top 20  
Production.Product.NAME,  
Production.WorkOrder.StockedQty,  
Production.WorkOrder.ScrappedQty,  
Production.WorkOrder.OrderQty  
FROM 
Production.Product  
INNER JOIN 
Production.WorkOrder ON Production.Product.ProductID = Production.WorkOrder.ProductID  
WHERE Production.WorkOrder.ScrappedQty > 0 

However when I execute that query, I'm getting the following error:

Invalid column name 'NAME'

I think it has something to do with the fact that there's a user-defined data type by the same name in the AdventureWorks database. What's the solution?

Thanks!

Duh...
I realized that the AdventureWorks database is case sensitive, the first column in the select list should've been "Production.Product.Name"
Patrick
Top achievements
Rank 1
 asked on 03 Jun 2010
1 answer
122 views
I'm using Telerik Reporting Q1 2010 and have an issue where there are duplicate tools for paging, export and print.  I've attached a screenshot.
Steve
Telerik team
 answered on 03 Jun 2010
1 answer
127 views
Hi,

I have installed the new telerik report Q1 2010 .
In the help files im missing part of the: "embedding the report viewer" in an silverlight application. what should be in the svc file, and what to put in the config file?
I have used version q3 2009, is there a change in embedding between the versions?
can i get a more detailed help on how to  "embedding the report viewer" in an silverlight application.

Thanks
Steve
Telerik team
 answered on 03 Jun 2010
7 answers
268 views
I've built a web app that incorporates the web report viewer.  The page containing the viewer has the following doctype 

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This results in the border of the report viewer rendering incorrectly.  it's simple enough to check just create apage with the report viewer included and add and remove the doctype to see the effect.

The only doctype that I've found that works is 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

or to use no doctype. 

either of these solutions results in the vertical scrollbar space being reserved even though it is not required.

Any ideas?
 

Steve
Telerik team
 answered on 03 Jun 2010
1 answer
163 views
I can't figure out how to set the cursor for the reportviewer in winform so that the user can select text (to copy). The default cursor does not allow text selecting and only allows zooming.
Steve
Telerik team
 answered on 03 Jun 2010
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?