Telerik Forums
Reporting Forum
1 answer
246 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
211 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
1.0K+ 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
118 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.6K+ views
What about font embedding? Is it going to be supported?
Todor
Telerik team
 answered on 29 Nov 2018
3 answers
311 views

Hi,

We are displaying report using HTML5 report viewer in our angularjs application (calling $("#container").telerik_ReportViewer(options)). When the user navigates to another report or another page the report generation and api calls(to get instances and documents) should be cancelled. Is there any way to do it?

Regards,

Majar

Silviya
Telerik team
 answered on 29 Nov 2018
1 answer
158 views

Dear all

 I have a report that fill with a Sql Data Source , but additionally need at runtime pass the value of the one textbox to a property of ReportParameter.

Im working in VB , please your urgent support

Regards

William

Todor
Telerik team
 answered on 28 Nov 2018
2 answers
323 views

Hello there.  Happy Holidays.

I am currently using your tools for reporting. Great job and thanks a lot to all of you over there.

 

I have a client who would like to check some boxes in the PDF and save his copy on his post. Is your reporting tools can make editable PDFs such as checkboxes or fillable fields? If no, what are the possibilities of producing such a document?

Louis
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 28 Nov 2018
1 answer
85 views

     So I've got a datasource that gives me a startdate and an enddate value. I was wondering is there a way for me to make a table that essentially goes:

 

+-------------------+------+------+------+
|       Date        | Col1 | Col2 | Col3 |
+-------------------+------+------+------+
| 10th January 2018 |      |      |      |
| 11th January 2018 |      |      |      |
| 12th January 2018 |      |      |      |
+-------------------+------+------+------+

 

For example?

Todor
Telerik team
 answered on 26 Nov 2018
2 answers
220 views

Hi,

We are generating a report using a console application using SDK. As the data source, we are using CSV files. Sometimes these fields give out errors due to various reasons (not properly formatted, null value etc..) When errors occurred the output pdf file contains these errors around a red box giving more error details.

Is there a way to not showing this red error message box because most of the fields are not important, so not showing them if there is an error is ok for us. Can off these error messages in output pdf done using the SDK?

Thank you

Silviya
Telerik team
 answered on 26 Nov 2018
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?