Telerik Forums
Reporting Forum
1 answer
150 views

Hi,

I have created a report in telerik which has 6 sub reports. Report looks good when I rendered it to PDF but when I am printing it report top section text cuts.

I thought it was because of margin, So I set top margin to 0.3 inch this solves the problem when printing but now it left top margin when rendered to PDF.

Looking forward for help on the same.

 

Thanks,

Mangesh

Nasko
Telerik team
 answered on 10 Jul 2015
11 answers
745 views

dear all,

 

i need to print barcode with telerik reporting Q3 2014 SP1, but i must use 128subsetA for three characters and 128SubsetC for 10 characters.

 i tried to do this :

 Telerik Reporting.Barcode.Encoder = Code128;

    Telerik Reporting.Barcode.value = My3CharSubsetA + "þ" + My10CharSubsetC;

or

    Telerik Reporting.Barcode.value = My3CharSubsetA + "ö" + My10CharSubsetC;

but it doesn't work, either the barcode is unreadable or Control character appears in reading.

same question if i need to start with SubsetB and then subsetC.

thanks by advance
best regards

Phil

Stef
Telerik team
 answered on 10 Jul 2015
10 answers
1.3K+ views
Hi,

First of all, thanks for adding WPF support to Telerik.Reporting. Love it so far and am actually using it already in a clients project.

This project is a WPF MVVM project. So, using the samples I added this to my View.xaml:
<telerik:ReportViewer Name="reportViewer1" Margin="0" Report="{Binding Path=Report"/> 

Now, the ViewModel object contains the property report:
        private Report _report; 
 
        public Telerik.Reporting.Report Report 
        { 
            get 
            { 
                return _report; 
            } 
            set 
            { 
                // Check if it's really a change 
                if (value == _report) 
                    return
 
                // Change Report 
                _report = value; 
 
                // Notify attached View(s) 
                RaisePropertyChanged("Report"); 
            } 
        } 

Since the report get's its data from a business method (using a Webservice), I've put the code to create the report in the constructor for the ViewModel:
        #region Constructor 
        public SampleReportViewModel() 
        { 
            // get data and create report here 
            var report = new SampleReport(); 
            var dataObject = myClass.GetData(); 
            report.DataSource = dataObject; 
            Report = report; 
        } 
        #endregion 
 
Now, while this code works just fine when I put it in the codebehind for the View (xaml) file itself, it doesn't work when I'm using databinding my ViewModel to my View.

Any ideas on how to fix this?
Thanks!

Stefan Kamphuis


Stef
Telerik team
 answered on 09 Jul 2015
1 answer
95 views
hello I'm creating a project using telerik reporting and am struggling in the documentation , how do I display subtitles according to the result of the SQL query and values ​​as a percentage ?I am using a graphic style pie and I can not organize the legend, what should I use DataLabelsColumn ? Graphical in the bar DataGroupColumn worked properly
Nasko
Telerik team
 answered on 09 Jul 2015
6 answers
178 views

I am following the example in the C# silverlight sample as well as the documentation on this page: http://www.telerik.com/help/reporting/silverlight-report-viewer-embedding_the_silverlight_viewer.html

 

I have an application I am modifying that has existing reports that are essentially paged data grids. What I want to do is create a telerik report to display the data in each datagrid. I am trying to use the technique in the ListBound report that uses the cars list. I have the data on hand in a dto list already, and am trying to pass the information to a report that will display in the silverlight reportviewer.

Here is my code - rptEventSummaryDataSource is an object that is inherited from List:

 

                   //Create the data source
                    rptEventSummaryDataSource theData = new rptEventSummaryDataSource(dataSource as List<IdentityEvents_DTO>);
                   //Set the report name
                    rptViewer.Report = "NLx.TelerikReports.rptEventSummary , NLx.TelerikReports";
                   //Set the data source for the report
                    rptViewer.DataContext = theData;
                   //Refresh to make the data display
                    rptViewer.RefreshReport();

I have the data sources defined in the same project as my viewer since I need to reference them, but my reports are defined in another project - NLx.TelerikReports - and the references have been set in my projects as well as the web project that launches the silverlight app. I also had to define the data sources in the reports project so that here was a definition with which to create the report.

Long and short of it is I cannot get anything to display and I have been killing myself on this for over 24 hours. Any help is greatly appreciated. What I need to do for a start is display Lists of already retrieved data and pass the list off to a report for display.

 

Nasko
Telerik team
 answered on 09 Jul 2015
3 answers
150 views

I use sub report and when  I view repot and export to excel then have merge below picture.

Please advise me.

 

Thank you.

Loki
Top achievements
Rank 1
 answered on 08 Jul 2015
1 answer
190 views

Hello,

I'm currently dynamically generating a Telerik Report in PDF format into a new window by writing the bytes to the response as seen below.

BusinessClass:

 

Telerik.Reporting.Report report = GenerateInspection(formDTO, "DCF", lastSection);
              
Telerik.Reporting.Processing.ReportProcessor processor = new Telerik.Reporting.Processing.ReportProcessor();
              
Telerik.Reporting.InstanceReportSource irs = new Telerik.Reporting.InstanceReportSource();
irs.ReportDocument = report;
  
Telerik.Reporting.Processing.RenderingResult result = processor.RenderReport("PDF", irs, null);
  
return result;

 

 

And in the controller:

 

InspectionRules ir = new InspectionRules(); //my business class
var result = ir.GetReport(id, WebSettings.GetDCFConnectionString, site);
  
this.Response.Clear();
this.Response.ContentType = result.MimeType;
this.Response.Cache.SetCacheability(HttpCacheability.Private);
this.Response.Expires = -1;
this.Response.Buffer = true;
  
this.Response.BinaryWrite(result.DocumentBytes);
this.Response.End();
  
return View();

 

 

This is producing a nice PDF report in a new window.  However requirements now dictate for me to have additional UI elements around and in some case overlayed the report.  My question is what is the best way to go about this?  Do I need the HTML 5 Report Viewer? Is there a simple solution? I must have a portion that on hover overlays a div over the report with controls in it.  Note that in my view/test below the <h1> does not display.  Thanks for any help or suggestions!

My View:

 

@{
    Layout = null;
}
 
<!DOCTYPE html>
 
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Inspection Report</title>   
</head>
<body>
    <div id="reportViewer1" class="k-widget">
        loading...
    </div>
    <div>
        <h1>THIS IS A TEST</h1>
    </div>
</body>
</html>

 

Gabriel
Top achievements
Rank 1
 answered on 07 Jul 2015
0 answers
186 views

After going through the many posts and examples I finally pieced together a functional MailReport function which I call from an UI for ASP.NET AJAX web application.  It is interesting to note the many ways of the process not working.

using System.IO;
using System.Net;
using System.Net.Mail;
using Telerik.Reporting.Processing;
 
 
        void MailReport(Telerik.Reporting.Report report, string from, string to, string subject, string body)
        {
            string extension = "pdf";
  
            System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
 
            Telerik.Reporting.TypeReportSource typeReportSource =
                         new Telerik.Reporting.TypeReportSource();
            String smptHost = SMTPSender; //set this to your SMTP sender service host
             
            typeReportSource.TypeName = typeof(IRReport.IRReport).AssemblyQualifiedName;
            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);
            string fileName = result.DocumentName + "." + result.Extension;
            MemoryStream ms = new MemoryStream();
            ms.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            ms.Position = 0;
            Attachment attachment = new Attachment(ms, report.Name + "." + extension);
            MailMessage msg = new MailMessage(from, to, subject, body);
            msg.Attachments.Add(attachment);
            SmtpClient client = new SmtpClient(smptHost);
            client.Send(msg);
        }

Phil
Top achievements
Rank 1
 asked on 07 Jul 2015
3 answers
546 views
Good morning, I was trying to split page-2 and put some content in page 1, i set keep together to false, but its not working . Does anyone have some idea ? Thx.
Stef
Telerik team
 answered on 07 Jul 2015
4 answers
128 views

how make a customize style for table and give it a class name.

how can add new style to table wizard like normal..,

Stef
Telerik team
 answered on 07 Jul 2015
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?