Telerik Forums
Reporting Forum
2 answers
42 views
When I expand a group into details, is it supposed to rerun the entire data request to the datasource? Also it takes an extremely long time when expanding sections.
Nasko
Telerik team
 answered on 01 May 2014
1 answer
293 views
I am creating a report that is basically a business letter.  I load the body of the letter from a database.  It is text with embedded variables, like the client’s name and address.  I currently have this working where I replace the variables in the body with the corresponding data in a class, but I thought it would be nice to let the report generator do that for me.

So I would like to have the body use the same expressions as the reports do.  So a body might look like this: “This is the body of the letter Mr. {Fields.Lastname}.”  Of course, I don’t know what the body actually is until the user runs the report.

So I would need to access the textbox that the body would appear in, set it’s value to the body text, programmatically setup a datasource with the data to be used to evaluate the expressions, the somehow data bind it so the expressions in the body are evaluated against the new data source.

Is this possible and if so are there some examples or documentation that would help?
Nasko
Telerik team
 answered on 01 May 2014
2 answers
675 views
Hi I am using 2 tables in a single report. Under this one of the Table(Table 2 as per example I attached) is extended more than the width of the report. So while exporting as PDF this table shows its remaining data in a new page. But I have another table (Table1 as per example I attached) the width does not exceeds the single page but it creates a new page and show nothing(Blank page) due to the extended Table2 Width. 

My question is How to remove this blank pages while exporting?
Ivan Hristov
Telerik team
 answered on 01 May 2014
1 answer
65 views
I have a method that sends a report out to the browser in excel format. It works fine if I pass it a report but when I pass it a report book I get the error "Excel found unreadable Content in 'MyReportName.xls'. Do you want to recover the contents of this workbook? If you trust the source of the workbook click Yes. When I click Yes it generates the workbook with all of the tabs in place the only issue is the first tab has the correct name and the remaining tabs are named Recovered_Sheet1, Recovered_Sheet2 ..... Recovered_Sheet10.
private void WriteToExcel(IReportDocument report)
{
    ReportProcessor reportProcessor = new ReportProcessor();
    RenderingResult result = reportProcessor.RenderReport("xls", report, null);
 
    Response.Clear();
    Response.ContentType = result.MimeType;
    Response.Cache.SetCacheability(HttpCacheability.Private);
    Response.Expires = -1;
    Response.Buffer = true;
 
    Response.AddHeader("Content-Disposition",
                       string.Format("attachment;FileName=\"{0}.xls\"", result.DocumentName));
 
    Response.BinaryWrite(result.DocumentBytes);
    Response.End();
}

Thanks in advance for any and all help!
Stef
Telerik team
 answered on 01 May 2014
1 answer
248 views
Hello.  In Telerik Reporting, when I edit in the design file and save, I've recently started getting this error often:  Code generation for property 'Value' (and sometimes 'StyleName') failed.  Object reference not set to an instance of an object.

I'd made considerable changes to a designer file yesterday, and when I did a Get Latest in VS, it forced me to merge manually to resolve some conflicts.  As I was comparing the server version to my version of the designer.cs file, I found some 20+ controls were missing this line:  this.SomeControl.Value = "";   And, one this.SomeControl.StyleName = "";  I have no idea why all those would be missing???  Any idea what I could be doing to cause that?
Nasko
Telerik team
 answered on 30 Apr 2014
2 answers
134 views
Hello. I've only found a few threads that deal with my question but none provided an answer. I need the ability to change the grouping on a report. Is this possible? Is it efficient? Are there any examples that I can download? I've tried the example projects from this thread but they are incomplete ( no report(s) ).

Thanks for any advice!
Peter
Telerik team
 answered on 30 Apr 2014
2 answers
194 views
I have an Image placed in PictureBox control at report footer and assigned it's value, when using export i could fine (visible) in PDF an MS Word but not in Excel Export, tried using relative URL but no luck, any help would be appreciated.

Thanks,
R
Ramesh
Top achievements
Rank 1
 answered on 30 Apr 2014
4 answers
48 views
Silverlight, VS 2010, VB.NET

I would like to add a button or clickable image that will raise an event in my code behind.

In my report I display, for example, a list of clients.  when the user clicks the 'open' button or image I want to launch a user control that displays the client entry screen.

Is this possible?
Stef
Telerik team
 answered on 29 Apr 2014
1 answer
345 views
I feel like I went backward on this one... Anyone using SQL Server Table Valued Parameters (TVP) in a stored procedure and then using the results in a Telerik report? (Nice Code Project TVP and C# discussion in case you're not familiar http://www.codeproject.com/Articles/39161/C-and-Table-Value-Parameters)

For a 'normal' report, you create a report and a datasource and some parameters (single values or multiple values) using the excellent interface and hey presto! everything works out of the box.

Telerik reporting does not support TVP though, so you go back, strip out report's datasource and nice built-in parameter UI you had in there and

1) create a routine to make DataTable(s) from a RadComboBox(es) for the TVP
2) create a routine using SqlConnection, SqlCommand, SqlDataAdapters and the TVP DataTable(s) above to return another DataTable from your stored procedure
3) instantiate your report from your class library and hand it the DataTable above as the record source
4) if you're in ASP.NET, hand the loaded up Report to the ReportViewer.

It's what's going on behind the scenes, I guess, but it feels kludgy.

We have a fairly large library of stored procedures that use TVP and rewriting them all as VIEWs with IN clauses is not really an option. I'm worried about performance and size limitations as the above downloads ALL of the data into the DataTable and ... and does what with it?

Again, the above is working. Anyone else have a technique for working with Reports and TVP?
Nasko
Telerik team
 answered on 29 Apr 2014
2 answers
283 views

When I try to run the report on a specific machine, I am getting the following error message. This program runs locally, and on other servers just fine.

System.ArgumentException: Unable to find the requested .Net Framework Data Provider.

Full Error message and call stack:

Telerik.Reporting.Processing.Data.SqlDataSourceException: Unable to establish a connection to the database. Please, 
verify that your connection string is valid. In case you use a named connection string from the application configuration file, 
make sure the name is correct and the connection string settings are present in the configuration file of your application. ---> 
System.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.CreateConnection()
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateConnection(String connectionString)
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateConnection()
   --- End of inner exception stack trace ---
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateConnection()
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext()
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data)
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query)
   at Telerik.Reporting.Processing.Report.ResolveData()
   at Telerik.Reporting.Processing.Report.ProcessItemCore()
   at Telerik.Reporting.Processing.Report.ProcessItem()
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)
Donald
Top achievements
Rank 1
 answered on 28 Apr 2014
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
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?