Telerik Forums
Reporting Forum
7 answers
728 views
I want to hide the group footer when the sum of a particular expression is zero -- not just a single field; it's the product of one field with the sum of three others, and I want to sum this product for all group records and check if it is zero. Can I do this with conditional formatting? I have tried various expressions but whenever it is anything except a single field, the footer section shows as a red box in preview.

This is what I really want:
=Sum(Fields.field1 * (Fields.field2 + Fields.field3 + Fields.field4))
=
0

Tim
Top achievements
Rank 1
 answered on 02 Jul 2013
1 answer
142 views
I have created a telerik report useing textboxes and a subreport.  When I export it to a docx all the controls are exported to the docx.  I would like the text only to come over when exported.  Following is the code i use to export:

Telerik.Reporting.Processing.ReportProcessor TelContractrp = new Telerik.Reporting.Processing.ReportProcessor();
            System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
            Telerik.Reporting.InstanceReportSource TelContractirs = new Telerik.Reporting.InstanceReportSource();
            TelContractirs.ReportDocument = currRpt;
            Telerik.Reporting.Processing.RenderingResult result = TelContractrp.RenderReport("DOCX", TelContractirs, deviceInfo);
            string dContract = DateTime.Now.ToString().Replace("/", "");
            dContract = dContract.Substring(0, 12);
            dContract = dContract.Replace(":", "");
            string fileName2 = result.DocumentName + "_" + dContract + "." + result.Extension;
            string filePath2 = System.IO.Path.Combine(saveLocation, fileName2);
            FileStream fs = new FileStream(filePath2, FileMode.Create);
            fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            fs.Close();
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.UseShellExecute = true;
            p.StartInfo.FileName = filePath2;
            p.Start();
Squall
Top achievements
Rank 1
 answered on 02 Jul 2013
1 answer
85 views
I am working a on Silverlight solution using the ReportViewer and a subclass of Telerik.Reporting.Service.ReportService for the reporting service.

The report to be produce is about the same, every time, but I needed a way to provide some "parameters" from the client to the service in order to customize the report before generation.

I used the "ReportViewer.Report" property on the client side and a custom IReportResolver on the server side to transfert my information on the service side. This way, my custom IReportResolver could parse the information, instantiate and customize the report before generation.

Example:
Silverlight:
<tkr:ReportViewer  ReportServerUri="../ReportingService.svc" Report="param1=X;param2=Y;etc" />


Service:
public class MyReportingService : ReportService, IReportResolver
{
 
    public MyReportingService ()
    {
      this.ReportResolver = this;
    }
 
    ReportSource IReportResolver.Resolve( string report )
    {
      var myReport = new MyReport();
      // Here I customize the "myReport" instance based on the
      // value of the "report" parameter
      return new InstanceReportSource() { ReportDocument = myReport };
    }
}

Everything work as expected when displayed in the ReportViewer, but when the user click the "save as" button, the "ReportViewer.Report" property value is NOT the one provided to the IReportResolver. The fully qualified name of the Report class is used instead.

Do you have any suggestions to workaround this issue ?
Peter
Telerik team
 answered on 01 Jul 2013
2 answers
95 views
How to create the report in the controller without the aspx?
I made the following code below but I am not getting html print screen

public ActionResult test() {          
           var instanceReportSource            = new Telerik.Reporting.InstanceReportSource();
           instanceReportSource.ReportDocument = new myReport();
             
           ReportViewer report = new ReportViewer();
           report.ID           = "Teste";
           report.Width        = 100;
           report.ReportSource = instanceReportSource;
 
return ??
}
Diego
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
268 views
Hi. 

I bind against a ObjectDataSource that expose boolean properties that shall decide which of three versions of a particular table I display.

The detail section of the report is pretty large and this "polymorphic" table is a small part of it.

I bind the table Datasource against the "ReportItem.DataObject" property and its Visible attribute against the associated boolean.

However, these tables differ in size, and I would like to avoid the whitespace.

I could stack them on top of eachother (z order) in a panel that has "CanShrink" set to true, but this makes it hard to edit the report in the designer.

Is there any solution where:
  • I work with them in the designer, 
  • only the ones that evaluates to Visible=true will be displayed
  • no white space left after the ones that evaluates to Visible=false.
Peter
Telerik team
 answered on 01 Jul 2013
3 answers
400 views
For each row in a detail section, I need the field value from the same field in the previous row to calculate the difference. Is this possible and if yes, how?

:o)
Jon Ivar
Gaurav
Top achievements
Rank 1
 answered on 01 Jul 2013
1 answer
764 views
I'm wondering if anyone can give me any pointers on how to add a custom font to my reports. The reports will be rendered as PDF. I have the font installed locally but want to be able to use it in my reports. Thanks!
Peter
Telerik team
 answered on 28 Jun 2013
1 answer
310 views
I'm really having a tough time getting the speed of my PDF exports down to something reasonable. The reports I'm generating are not really summary or aggregation reports, they're "everything" reports with a great deal of text. Report page counts can be tens, hundreds, or even thousands-- alas, the requirements are fixed. The export is so slow that I've had to run the ReportProcessor in a Windows Service to do it all asynchronously. Within the report designer's preview tab in Visual Studio the generation seems to take seconds instead of minutes or hours.

To anyone reading this, I'd appreciate some tips on formatting my reports to improve speed of export to PDF.
Squall
Top achievements
Rank 1
 answered on 28 Jun 2013
1 answer
107 views
this.Fields["DeliveryTermsID"].Value.Tostring()

does not work "Reports.TelSubRptContract does not contain a definition for 'Fields'

so what would work?  I am trying to pass values to a txtbox on the subreport from the datasource that it has been given.
Squall
Top achievements
Rank 1
 answered on 28 Jun 2013
2 answers
235 views
This is a weird one.  I have an ASP.Net page with the report viewer control.  The report is in a separate dll as per best practice recommendations.  When the page comes up, the report area is blank.  But, if I export the report to PDF, the report contents are there as expected.  What is going on with this? 

Clicking the Preview or refresh buttons does not help.

This is the code in the viewer page (the session variable does have a value and it comes in correctly:
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    'If Not IsPostBack Then
    Dim report1 As New PMP2Reports.DocumentsReviewed
    Dim objSession As Object
 
    objSession = Session("subIdx")
    If Not objSession Is Nothing Then
        report1.ReportParameters("subIdx").Value = objSession
    End If
 
 
    ReportViewer1.Report = report1
    ReportViewer1.RefreshReport()
    ' End If
 
End Sub


VS 2010, Reporting 2012 Q1

Thanks.
Jon_BCV
Top achievements
Rank 1
 answered on 27 Jun 2013
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?