Telerik Forums
Reporting Forum
1 answer
234 views
Dear all,

I am using custom button to print report. Already i am having report i want when user click print receipt button it call my report.I am not using telerik reportviewer.It should display print dialogue box for selecting printer.

Azeheruddin khan
Peter
Telerik team
 answered on 15 Jun 2010
3 answers
99 views
Hallo everyone,

i'm developing some reports for a customer and now have to create a "order report".

This report should be "ready for mail" after printend. For this i need the following structure:

Report Intro (only on the first page at the first position, contains company logo, adress data of the recipient etc.)
Page Header (repeats on every page, contains some more detailed data)
Detail Area (contains order positions)
Page Footer (some legal informations)

Now i dont't get it how to do this with Telerik Report.

In Telerik Report i can choose a Report Header, Page Header, the Groups and a Page / Report Footer.
But the Problem is, that on the first Page the Page Header is shown at first, not the Report Header. But i need something that is in front of the Page Header. How can i do this? Is there something like a "Report Intro" that i can use? Or is there a trick i didn't discover?

Please help me :)

Regards,
Michael
Michael Hilgers
Top achievements
Rank 1
 answered on 15 Jun 2010
2 answers
347 views
Hi,

I want export report to pdf in programmatically in button click event . That pdf file window open on browser .So  how to solve this problem .I want  solution of this .Am writing this code .But it's not wroking .
 var report = new TelerikComponentsWS.Reports.RepFeeReceipt(); 
                report.DataSource = printdata; 
                Telerik.Reporting.Drawing.ExternalStyleSheet exx = new Telerik.Reporting.Drawing.ExternalStyleSheet("~\\css\\ReprotStyleSheet.xml"); 
                report.ExternalStyleSheets.Add(exx); 
                report.ReportParameters[0].Value = strTitle; 
                Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor(); 
                Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", report, null); 
                
             string fileName= result.DocumentName + ".pdf";  
            System.Web.HttpContext.Current.Response.Clear() ; 
                System.Web.HttpContext.Current.Response.ContentType = result.MimeType;   
            System.Web.HttpContext.Current.Response.Cache.SetCacheability( System.Web.HttpCacheability.Private) ;  
            System.Web.HttpContext.Current.Response.Expires = -1  ; 
            System.Web.HttpContext.Current.Response.Buffer =true
shanker bangari
Top achievements
Rank 1
 answered on 15 Jun 2010
1 answer
411 views
I am using Telerik Reporting 2009 Q2 version. In my report, I need to reset the page number by report group.
I had been looking for the solution few days.
In the forum, referring to (http://www.telerik.com/community/forums/reporting/telerik-reporting/having-a-pagecount-on-grouping.aspx)
Mr Steve said, Telerik don't have such feature.

But, is there any work around to have it?

I actually did write a function for it. But still not able to get the result as I want.  Below is the function:

 private void ghDO_ItemDataBound(object sender, EventArgs e) 
        { 
                    
            //Get the group section object from sender 
            Telerik.Reporting.Processing.GroupSection groupSection = (Telerik.Reporting.Processing.GroupSection)sender; 
 
            //From the group section object get the current DataRow 
            System.Data.DataRow row = (System.Data.DataRow)groupSection.DataObject.RawData; 
 
            //If Previous DO is not equal to current DO. Page Number reset to 1. 
            if (OldDO != null && OldDO != groupSection.DataObject["do_no"].ToString()) 
            { 
               
                pageNumber = 1; 
            } 
            else  
            {   
                pageNumber = pageNumber + 1;  
            } 
             
            OldDO = groupSection.DataObject["do_no"].ToString(); 
            pageNo.Value = pageNumber.ToString();           
             
        } 
In my report, I define the page number as 1 in the text box by default.
When I preview the report, I keep getting page number = 1 even thought a DO is print in 2 pages.
Where is my mistake? Or, the function above totally won't be working?

 

Chavdar
Telerik team
 answered on 14 Jun 2010
1 answer
163 views
I can't seem to get this to work... I followed the documentation for alternating style row....
Does this work with a cross tab?

=RowNumber()%2 =1

help
thanks!
Jon
Top achievements
Rank 1
 answered on 14 Jun 2010
1 answer
106 views
Hi,

I am building a project with deals with large quantity of data, some reports also have data ranging from 10-15 million values.
Hence it takes about a minute for the report to display.

Is there any way to stop the report in progress i.e before the values are displayed , I tried stopping using the browser stop button, but it still doesn't stop.
Is there any other way to do it.

Thanks
Steve
Telerik team
 answered on 10 Jun 2010
1 answer
241 views
Hi all,

   I have a deisre to automatically print a report after it is displayed in the HTML viewer (web browser).  I have reviewed the posts from the forums, particularly http://www.telerik.com/community/forums/reporting/telerik-reporting/print-my-report-straight-to-printer.aspx, but I am very confused about what I need to do.  I tried a couple attempts in the code-behind but they didn't work out.

Does anyone have a simple example project that shows how this feature is used?  Or if not, can someone explain step by step what modifications to make to which code files (the .aspx, the .cs) to obtain this functionality?  Any help will be greatly appreciated, thanks!

-Chris
Chris Butler
Top achievements
Rank 1
 answered on 10 Jun 2010
0 answers
115 views
Hi ,Every one

I am  doing one project  .My requirement is when i click custom button  than report is printing  with out open report .i worte this code .It's working develop system.But it's not working on server and other system.How to print report in custom button click event .

this is my code  How to find this please give me  any example 


 if (e.CommandName == "Print"
            { 
                int? fee_receipt_id = int.Parse(e.CommandArgument.ToString()); 
                int? status_code = null
                int? call_user_id = LogonDetails.Instance.sys_lclvar_user_id; 
                int? call_screen_id = GetScreenId(); 
                int? session_id = LogonDetails.Instance.sys_lclvar_session_id; 
                string call_ip_address = CommonMethods.CurrentIP; 
                bool? audit_report_execution = LogonDetails.Instance.sys_lclvar_audit_user_action; 
                bool? audit_user_action = LogonDetails.Instance.sys_lclvar_audit_user_action; 
                string status_text = String.Empty; 
                var printdata = ReportsManager.get_report_fee_receipt( 
                     fee_receipt_id, call_screen_id, call_user_id, session_id, call_ip_address, audit_user_action, audit_report_execution, ref status_code, ref status_text); 
                if ((!status_code.HasValue) || (status_code.Value != 0)) 
                { 
                    DisplayMessage(false, status_text); 
                    return
                } 
                string strTitle = LogonDetails.Instance.sys_lclvar_facility_name; 
                 
                var report = new TelerikComponentsWS.Reports.RepFeeReceipt(); 
                report.DataSource = printdata; 
                Telerik.Reporting.Drawing.ExternalStyleSheet exx = new Telerik.Reporting.Drawing.ExternalStyleSheet("~\\css\\ReprotStyleSheet.xml"); 
                report.ExternalStyleSheets.Add(exx); 
                report.ReportParameters[0].Value = strTitle; 
                using (System.Windows.Forms.PrintDialog printDlg = new System.Windows.Forms.PrintDialog()) 
                { 
                    printDlg.AllowSomePages = true
                    printDlg.AllowCurrentPage = false
                    printDlg.UseEXDialog = true
 
                    if (System.Windows.Forms.DialogResult.OK == printDlg.ShowDialog()) 
                    { 
                        Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor(); 
                        reportProcessor.PrintReport(report, printDlg.PrinterSettings); 
                    } 
                } 
                ////Telerik.Reporting.Processing 
                //System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings(); 
                //// Adjust the printer settings if necessary... 
                //System.Drawing.Printing.PrintController standardPrintController = new System.Drawing.Printing.StandardPrintController(); 
                //printerSettings.PrinterName = "MyHomePrinter"; 
                //// Print the report using the printer settings. 
                //Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor(); 
                //reportProcessor.PrintController = standardPrintController; 
                //reportProcessor.PrintReport(report, printerSettings); 
 
               
            } 




thanks and regards
shanker.B
shanker bangari
Top achievements
Rank 1
 asked on 10 Jun 2010
1 answer
252 views
  I am new to Telerik reporting, and I have just tried using it via the Trial version (Q1 2010).  I have successfully created a report and viewed it using a WinForms application, but when I try to use the WPF viewer I hit a problem.

  The problem occurs when I create a WPF Application, and then I try to drag the "ReportViewer" WPF component to a Xaml window.  I am then presented with the error:
 
"Cannot find type 'Telerik.Windows.Controls.ThemeResourceKey'. The assembly used when compiling might be different than that used when loading and the type is missing.  Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.ReportViewer.Wpf;component/Themes/OfficeBlack/ReportViewer.xaml'."

  I have found that if I add a reference to Telerik.Windows.Controls.dll, Telerik.Windows.Controls.Input.dll, Telerik.Windows.Controls.Navigation.dll, and Telerik.Windows.Data.dll from the samples at \Program Files\Telerik\Reporting Q1 2010\Examples\CSharp\WpfDemo\bin, that everything seems to work fine.  But it is not until those references are added, which were not included as part of the Q1 2010 trial binaries, except specifically from that sample.

  Is this expected, and is it fine to include those references?  Will updates be included to those as part of the next update of reporting, or how else would one get those on an ongoing basis?

Chris Achille
Steve
Telerik team
 answered on 10 Jun 2010
3 answers
322 views
Hi,

I am trying to implement Telerik Reporting in our Silverlight application, and I am having a problem connecting Telerik Report Services to a Silverlight Report Viewer.  In one solution I have a Windows Azure project running a Web Role that contains a WCF service (ReportService.svc) and a project with the Repors (ReportLibrary) as instructed on this video (http://tv.telerik.com/reporting/video/telerik-reporting-getting-started-with-silverlight-report-viewer), and on the other solution I have a Silverlight app with a Silverlight Report Viewer.  When I try to setup the Silverlight client I get an error. (see image attachment).

The XAML code looks like this on the client side.

<UserControl x:Class="ROPComposite.Report.Telerik_Report.TelerikReportView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:reportViewer="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
       
    xmlns:telerikNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:telerikPrimitives ="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input">

    <Grid x:Name="LayoutRoot" Background="White">
        <reportViewer:ReportViewer x:Name="xReportViewer"
                                   ReportServiceUri="http://127.0.0.1:81/Service/ReportService.svc"
                                   Report="ReportLibrary.AllPatients, ReportLibrary,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
        </reportViewer:ReportViewer>
    </Grid>
</UserControl>

The configuration for the service looks like this on the server side.

        <behavior name="ReportServiceBehavior">
          <dataContractSerializer maxItemsInObjectGraph="10000000"/>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
          <useRequestHeadersForMetadataAddress>
            <defaultPorts>
              <add scheme="http" port="81"/>
              <add scheme="https" port="444"/>
            </defaultPorts>
          </useRequestHeadersForMetadataAddress>
        </behavior>
...
      <endpointBehaviors>
        <behavior name="WebBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
...
      <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="ReportServiceBehavior">
        <endpoint address="" binding="basicHttpBinding" contract="Telerik.Reporting.Service.IReportService">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="resources" binding="webHttpBinding" behaviorConfiguration="WebBehavior" contract="Telerik.Reporting.Service.IResourceService"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>

I know the Report works because I created an aspx page and I was able to see it using the Web Report Viewer, but not through WCF.

On the Reporting documentation ( http://www.telerik.com/help/reporting/silverlight-hosting-in-iis.html ) on how to Host a WCF Service for reports, I don't understand how Service class (ReportService.svc) knows what library the reports are.  Just by adding a reference to the library containing the reports, is that all I need to do?

I would appreciate all the help I can get.
Steve Johnson
Top achievements
Rank 1
 answered on 10 Jun 2010
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?