Telerik Forums
Reporting Forum
7 answers
626 views
 I am using Visual Studio 2008 and Telerik Reporting Q3 2008 SP2.

The web page loads fine but when you page through the report, the webpage does a postback, which I was thinking it shouldn't do since the report is sitting in an updatepanel. Should it?

Thanks,
Christel

Here is the code, just like the article here says:
http://www.telerik.com/help/reporting/asp-net-report-viewer-ajax.html


<

 

body>

 

 

<form id="form1" runat="server">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server" />

 

 

<div>

 

 

<asp:UpdatePanel ID="updatePanel1" runat="server" >

 

 

<ContentTemplate>

 

 

<telerik:ReportViewer ID="ReportViewer1" runat="server" Height="700px" Width="700px"

 

 

Report="RMSAnalyticsReports.rptIncidentDetail, RMSAnalyticsReports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">

 

 

</telerik:ReportViewer>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

</div>

 

 

</form>

 

</

 

body>

 

Todor
Telerik team
 answered on 05 Dec 2018
22 answers
2.2K+ views
Hi,

Is there a possibility to have different headers for first page and all other pages?

I am trying to design sort of statement - the first page must look similar to this:
============================================================================
+--------------------------------------------+        +---------------------------------------------------------------------------+
|     Company Logo Image              |          | Client:  <Client name goes here>                                      |
|                                                      |          | Address: <Addess line 1>                                                  |
+--------------------------------------------+         |                <Address line 2>                                                 |
                                                                  |                <Address line 3>                                                 |
                                                                  +--------------------------------------------------------------------------+
                                                                  | Account #: 123456                     Account Type: Abcdefg  |
                                                                  +---------------------------------------------------------------------------+
============================================================================

All the rest of the pages should not include Client name and address box but include Logo and Account # box

Is it possible and if yes how

Thank you!


Silviya
Telerik team
 answered on 05 Dec 2018
5 answers
624 views

This is probably just a noob question - and had I done a more thorough job reading through documentation, I'm sure I'd figure it out. However, we're running low on time so I need to check here.

I have a class structure as shown below (very simplified):

public class TestSuite
{
    public String SomeProp { get; set; }
    public List<TestCase> TestCases { get; set; }
}
  
public class TestCase
{
    public String SomeProp { get; set; }
    public Boolean SomeOtherProp { get; set; }
    public List<Message> TestCaseMessages { get; set; }
}
  
public class Message
{
    public String SomeProp { get; set; }
    public Boolean SomeOtherProp { get; set; }
}

In my report I have the following (again simplified) structure

TestSuite header 

-  List (bound to TestSuite.TestCases)

  -  List (bound to TestCase.TestCaseMessages)

The outer list (TestCases) works great and I can access properties without issue, however the inner list (bound to TestCaseMessages) never shows any data if I use a DataSource through the DataSource wizard. On the other hand, if I set a Binding on the inner ListBox's DataSource to Fields.TestCaseMessages (relying on the DataSource of the outer list) - I can manually write Fields.SomeProp in bindings on TextBoxes inside the inner list.

I know this sounds a bit confusing - but what I would really like is for the DataSource setup to work through the wizard/property grid and not having to hack it manually. Am I doing something wrong here - or is this a bug?

Regards,

Andreas

Silviya
Telerik team
 answered on 05 Dec 2018
1 answer
396 views

I have a web app that was developed in earlier Telerik report viewer.

I am using Stored Procedure to Populate the report data source as well as Session Variable to filter the Report Data. Seems can't able to work in HTML5 Format. Below are my Web Form and code file. Any Help will be appreciated for a sample application or link . Thanks

gc_0620

protected void Page_Load(object sender, EventArgs e)
    {
 
        if (!IsPostBack)
        {
            // this.ReportViewer1.RefreshReport();
           // Response.AppendHeader("X-UA-Compatible", "IE=edge");
            string[] retrievedLocations = (string[])Session["FacilityData"];
            Array.Sort(retrievedLocations);
 
            for (int i = 0; i < retrievedLocations.Length; i++)
            {
                if (i == 0)
                {
                    location = "" + retrievedLocations[i] + ","; // Add a comma if data already exists
                }
                else
                {
                    location += "" + retrievedLocations[i] + ",";
                }
            }
 
            location = location.Substring(0, location.Length - 1);
 
 
            Reports.Intake_Coordinator_CM_Assignments myReport = new Reports.Intake_Coordinator_CM_Assignments();
            string sql = "[dbo].[Intake_Coordinator_Report_Source]";
            SqlCommand command = new SqlCommand(sql, new SqlConnection(connectionString));
            command.CommandType = CommandType.StoredProcedure;
 
            var sqlparam = new SqlParameter("@location", SqlDbType.NVarChar);
            sqlparam.Value = location; //outer value
            command.Parameters.Add(sqlparam);
 
             
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet);
            myReport.DataSource = dataSet.Tables[0];//outer data source
            string Tempstr = command.CommandText.ToString();
            string Tempstr1 = Tempstr;
            var reportSourceInstance1 = new InstanceReportSource() { ReportDocument = myReport };
            ReportViewer1.ReportSource = reportSourceInstance1;
    }
 
  }
 
________________________
 
Web Form.
 
<%@ Page Title="Intake CM Assignments Report" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Intake_Coordinator_CM_Assignments_Report.aspx.cs"
Inherits="Intake_Coordinator_CM_Assignments_Report" %>
 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=12.1.18.620, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    
    <link href="styles.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    
    <asp:Panel runat="server" ID="Panel2" Visible="True" CssClass="form_header_label">
        <asp:Label ID="Label1" runat="server" Text="Intake YTD Status" Font-Size="14px" Font-Bold="true"
            Font-Underline="True"></asp:Label>
    </asp:Panel>
     <br />
    <br />
    <br />
    <div>
        <telerik:ReportViewer ID="ReportViewer1" runat="server" Style="border: 1px solid #ccc;"
            Height="650px" Width="95%" Skin="Office2007">
         <typereportsource
             
            typename="Reports.Intake_Coordinator_CM_Assignments, Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"></typereportsource>
         </telerik:ReportViewer>
    </div>
</asp:Content>

 

Silviya
Telerik team
 answered on 03 Dec 2018
1 answer
107 views

Hello,

We use this software to generate reports for our users. We also offer the option for our users, to create an image that will be used as a watermark in the reports. One of our users created a watermark that is causing us some issues. I was hoping to find an answer here.

I attached a file similar to our users watermark file in this thread.

What our user made, is a watermark image, the size of an A4 page. This is used as a watermark in a report. It looks good when looking at the print preview, or when it is downloaded as a PDF file, meaning, it is all on 1 page. But, when it is downloaded as a RTF file, a blank extra page appears. This extra page looks to be there because an ENTER is added at the end of the file. This enter is displayed on the second page, after the watermark image. 

My question is, how can I avoid the extra page in RTF format (PDF and print preview are OK, only 1 page)

 

With kind regards

Todor
Telerik team
 answered on 03 Dec 2018
1 answer
231 views
Hi,
My Telerik Reporting is R2 2018.
In the group footer section of my report, I need to have a grouping by VAT rates, with the corresponding totals for both the taxable amount and the corresponding tax (see attached image)

In myFile.xaml I have:  ItemsSource="{Binding MyDataSource.SummaryVat}

Text="{Binding MyDataSource.TotTaxable, StringFormat=N2}}"
Text="{Binding MyDataSource.TotImposta, StringFormat=N2}}"


and also: ItemsSource="{Binding MyDataSource.SummaryVatFree}
Text="{Binding MyDataSource.TotTaxableFree, StringFormat=N2}}"
Text="{Binding MyDataSource.TotVatFree, StringFormat=N2}}"


In my class MyDataSource I have:
SummaryVat = new List<MyComplexObject>(from x in listaInfoSales
                                                                    where !x.IsSaleFree
                                                                    group x by x.VatPercentage into g
                                                                    select new MyComplexObject
                                                                    {
                                                                        VatPercentage = g.Key,
                                                                        Tot = g.Sum(x => x.TotValore) / (1 + g.Key / 100)
                                                                    });

                    TotTaxable = SummaryVat.Sum(x => x.Tot);
                    TotImposta = SummaryVat.Sum(x => x.TotVat);

                    SummaryVatFree = new List<MyComplexObject>(from x in listaInfoSales
                                                                           where x.IsSaleFree
                                                                           group x by x.VatPercentage into g
                                                                           select new MyComplexObject
                                                                           {
                                                                               VatPercentage = g.Key,
                                                                               Tot = g.Sum(x => x.TotDiscountSales) / (1 + g.Key / 100)
                                                                           });


                    TotTaxableFree = SummaryVatFree.Sum(x => x.Tot);
                    TotVatFree = SummaryVatFree.Sum(x => x.TotVat); 
Todor
Telerik team
 answered on 03 Dec 2018
4 answers
197 views
Hi,

Does anyone know if its possible to show data gaps for a LineSeries plotted on a DateTime XAxis using the Graph components? (Not the obsolete Chart components).

Please refer to the attached sample.

Thanks,
Stefan
Tiaan
Top achievements
Rank 1
 answered on 03 Dec 2018
4 answers
976 views

I am trying to upgrade a visual studio 2015 mvc application from R3 2016 to R3 2018.  The upgrade wizard reported that it successfully upgraded the solution, but it didn't.  I manually added the new libraries and fixed the reportviewer code and api code.  Unfortunately I cannot get the parameter area to show for any reports.  My project contains the following references:

Telerik.Reporting.dll (12.2.18.1017)

Telerik.Reporting.Services.WebApi (12.2.18.1017)

Telerik.ReportViewer.Mvc (12.2.18.1017)

The code for the view is as follows - note that I tried explicitly setting the parameter area visible in the code and I also have clicked the parameter toggle on the toolbar once the report loads - neither had any effect.

@model MTE.MVC.Models.ReportModel
@{
    ViewBag.Title = "Reports";
    MTE.MVC.MTEIdentity currentUser = null;
    if (Request.IsAuthenticated)
    {
        currentUser = (User as TACSecurity.TSPrincipal).Identity as MTE.MVC.MTEIdentity;
    }
}
 
@section styles
{
    @Styles.Render("~/Reports/styles/telerikReportViewer.css")
    <style>
        #reportViewer1 {
            position: relative;
            width: 100%;
            height: 750px;
            font-family: 'segoe ui', 'ms sans serif';
            overflow: hidden;
        }
    </style>
}
 
 
<div class="container-fluid">
    <div class="row">
        <div class="col-xs-12">
            <div class="form-inline">
                <div class="form-group" id="grpCategory">
                    <label class="control-label">Category</label>
                    @(Html.Kendo().DropDownList().Name("cboCategory").HtmlAttributes(new { style = "width:200px" })
                   .DataSource(d => d
                        .Read("GetReportCategories", "Reporting")
                        .Events(events => events.Error("kendoErrorHandler"))
                        )
                    )
                </div>
                <div class="form-group">
                    <label class="control-label">Report</label>
                    @(Html.Kendo().DropDownList().Name("cboReport").HtmlAttributes(new { style = "width:400px" })
                    .DataTextField("ReportName")
                    .DataValueField("ReportUri")
                    .DataSource(d => d
                        .ServerFiltering(true)
                        .Read(read => read.Action("GetReportNames", "Reporting").Data("paramCategory"))
                        .Events(events => events.Error("kendoErrorHandler"))
                        )
                        .CascadeFrom("cboCategory")
                    .AutoBind(false)
                    )
                </div>
                <div class="form-group">
                    <button type="button" class="btn btn-primary" onclick="btnReportClick()">Load</button>
                </div>
            </div>
        </div>
    </div>
    <br />
    <div class="row">
        <div class="col-xs-12">
            @(Html.TelerikReporting().ReportViewer()
                   .Id("reportViewer1")
                   .ServiceUrl("/api/reportsapi/")
                   .ReportSource("Default Report.trdx")
                   .ViewMode(ViewMode.Interactive)
                   .ScaleMode(ScaleMode.Specific)
                   .Scale(1.0)
                   .PersistSession(false)
                    .PrintMode(PrintMode.AutoSelect)
                    .EnableAccessibility(false)
                    .SearchMetadataOnDemand(false)
                    .SendEmail(new SendEmail { Enabled = true })
                   .Deferred()
            )
        </div>
    </div>
</div>
 
@section scripts
{
<script src="@Url.Content("~/Reports/js/telerikReportViewer.kendo-12.2.18.1017.min.js")"></script>
<script src="@Url.Content("~/Reports/js/telerikReportViewer-12.2.18.1017.js")"></script>
    @(Html.TelerikReporting().DeferredScripts())
}
 
<script type="text/javascript">
 
    $(document).ready(function () {
        @if(currentUser.Role == MTE.MVC.Roles.Customer || currentUser.Role == MTE.MVC.Roles.Hauler)
        {
            @:$("#grpCategory").hide();
        }
       // $("#cboReport").data("kendoDropDownList").dataSource.read();
    });
 
 
    function paramCategory() {
        @if(currentUser.Role == MTE.MVC.Roles.Customer)
        {
            @:return { category: "Customers" };
        }
        else if(currentUser.Role == MTE.MVC.Roles.Hauler)
        {
            @:return { category: "Haulers" };
        }
        else
        {
            @:return { category: $("#cboCategory").val() };
        }
    }
 
    function btnReportClick() {
        var category;
        var cboReport = $("#cboReport").data("kendoDropDownList");
        @if(currentUser.Role == MTE.MVC.Roles.Customer)
        {
            @:category = "Customers";
        }
        else if(currentUser.Role == MTE.MVC.Roles.Hauler)
        {
            @:category = "Haulers";
        }
        else
        {
            @:category = $("#cboCategory").val();
        }
        var viewer = $("#reportViewer1").data("telerik_ReportViewer");
        var report = $("#cboReport").val();
        if (report != null && report != "") {
            var reportName = cboReport.dataItem(cboReport.select()).ReportName;
            $.ajax({
                type: "POST",
                url: '@Url.Action("ReportAuditHandler", "Reporting")',
                data: {
                    reportName: reportName
                    }
            });
            viewer.reportSource({
                report: report,
            });
            viewer.refreshReport();
        }
        else {
            alert("No report chosen - please choose a report");
        }
 
    }
 
 
</script>
Bob
Top achievements
Rank 1
Iron
 answered on 29 Nov 2018
2 answers
105 views

My company is implementing reporting via Angular and a REST service. I've done some research and tinkered with the rendering extensions but I've been unable to determine if it's possible to render an interactive report, save it to some location, and load the report viewer at a later time.

For example:

1) A user schedules an interactive report in our system for a later date.

2) A batch job calls the Report REST Service at the scheduled date and time to render the interactive report and save it some location.

3) The user returns to the system at a later date and the interactive report is then loaded into the Report Viewer, rather than having Report Viewer call the REST service directly.

Is this even possible? Or will we have to settle for saving scheduled reports as PDFs?

Any and all information is appreciated!

Julian
Top achievements
Rank 1
 answered on 29 Nov 2018
3 answers
1.4K+ views
What about font embedding? Is it going to be supported?
Todor
Telerik team
 answered on 29 Nov 2018
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?