Telerik Forums
Reporting Forum
1 answer
116 views

Hello

We have a problem with the page footer. In the page footer are two textboxes:

Textbox 1: ="Page " + PageNumber + " of " + PageCount
Textbox 2: © text123

When we export the report to pdf there is no problem. But when we export the report to Excel (xls or xlsx) we get the following text in our textboxes:

Textbox 1: .504 Page 1 of 34
Textbox 2: .504 © text123

We don't know what this ".504" is and how we can fix it. We have approximately 50 reports on our systems and this is the first time we have this problem.

We tried following:

- Delete the textboxes and create new one
- Use HTML text box instead of the "normal" text box
- Use single quotes (') instead of double quotes (")

Does anybody have an idea how we can fix it?

Best regards
Diego

Silviya
Telerik team
 answered on 25 Jul 2018
2 answers
444 views

I've developed some .trdp reports with the Report Designer R1 2018 standalone app and I'm trying to display them using an MVC view and Telerik Reporting v 12.0.18.125.  I had it working for about an hour last week, but since then I keep running into a 400 Bad Request error with the message "Report name missing".

I added the View and required REST API and everything else by using the Add->New Item->Telerik MVC Report Viewer View R1 2018 template.  The ReportsController is unchanged from the default that was added:

public class ReportsController : ReportsControllerBase
{
    static ReportServiceConfiguration configurationInstance;
 
    static ReportsController()
    {
        var appPath = HttpContext.Current.Server.MapPath("~/");
        var reportsPath = Path.Combine(appPath, "Reports");
 
 
        var resolver = new ReportFileResolver(reportsPath)
            .AddFallbackResolver(new ReportTypeResolver());
 
        configurationInstance = new ReportServiceConfiguration
        {
            HostAppId = "Html5App",
            Storage = new FileStorage(),
            ReportResolver = resolver,
        };
    }
 
    public ReportsController()
    {
        this.ReportServiceConfiguration = configurationInstance;
    }
}

 

Likewise, the View is the default that was added (renamed to TestReport.cshtml):

@using Telerik.Reporting
@using Telerik.ReportViewer.Mvc
@{
    Layout = null;
}
<!DOCTYPE html>
<head>
    <title>Telerik MVC HTML5 Report Viewer</title>
 
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
 
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 
 
    <!--kendo.all.min.js can be used as well instead of the following custom Kendo UI subset-->
    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer.kendo-12.0.18.125.min.js")"></script>
 
    <style>
        #reportViewer1 {
            position: relative;
            width: 1300px;
            height: 900px;
            font-family: Verdana, Arial;
        }
    </style>
 
    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-12.0.18.125.min.js")"></script>
 
</head>
<body>
 
@(Html.TelerikReporting().ReportViewer()
        .Id("reportViewer1")
        .ServiceUrl(Url.Content("~/api/reports"))
        .ReportSource(new UriReportSource() { Uri = "TestReport.trdp" })
        .ViewMode(ViewMode.Interactive)
        .ScaleMode(ScaleMode.Specific)
        .Scale(1.0)
        .PersistSession(false)
        .PrintMode(PrintMode.AutoSelect)
        .EnableAccessibility(false)
)
 
</body>
</html>

 

The following line was added to Global.asax.cs by the wizard:

Telerik.Reporting.Services.WebApi.ReportsControllerConfiguration.RegisterRoutes(System.Web.Http.GlobalConfiguration.Configuration);

 

There is a Reports folder containing the file TestReport.trdp, as well as a ReportViewer/js folder containing two telerikReportViewer*.js files.  There is a TestReport action in my Test controller that simply returns View().  I am not aware of any changes I've made to the defaults made by the wizard (e.g. no custom report resolver).

When I hit that view and look at the Network traffic in developer tools, I can see that it successfully makes a request to http://localhost:12345/api/reports/clients and receives a response, so I believe the REST service is running.  However, when it tries to call http://localhost:12345/api/reports/clients/115238-abc3/parameters with request body {parameterValues:{}, report:"TestReport.trdp"}, it always responds with {"message":"Missing report name"}, regardless of whether the filename in the Uri is one I know to be in the Reports folder.

I'm able to render and export the report as a PDF by putting the following in an Action, so I believe that a) the report can be found and read and b) it is not corrupt or otherwise has errors:

ReportProcessor rp = new ReportProcessor();
Hashtable deviceInfo = new Hashtable();
UriReportSource reportSource = new UriReportSource();
reportSource.Uri = "Reports/TestReport.trdp";
RenderingResult result = rp.RenderReport("PDF", reportSource, deviceInfo);
 
using (FileStream fs = new FileStream(outputPath, FileMode.Create)) {
    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}

 

I also set up a very small MVC project to try to debug and successfully got reports to render in that.  When I try to resolve a report that doesn't exist (e.g. zzzTestReport.trdp) using this project, it returns the message "Report 'zzzTestReport.trdp' cannot be resolved.", so I believe the "Missing report name" error has nothing to do with not being able to find the report.

I've tried importing the .trdp file to create a report class and rendering using a TypeReportSource, and I've even tried removing any trace of the report viewer from the project and re-adding it.  No matter what I do, I keep getting the same "Missing report name" error.  I'm guessing there's a configuration error or something hidden deep in my project, but I can't for the life of me find where (even when comparing to a working project), and the error message itself isn't providing any guidance.  If anybody can offer any insights on how to get reports to render (or really just to have the api return something useful for the parameters call), I would greatly appreciate it.

Thanks!

 

Hank
Top achievements
Rank 1
 answered on 24 Jul 2018
1 answer
41 views
Hi,
We want to use report tool in our own project we cannot find how open the report design application from within our own software program.
We want that end user can be able to edit the report design as may be required. 
Ivan Hristov
Telerik team
 answered on 24 Jul 2018
1 answer
231 views

Hello.

I have a report viewer widget that I place on a page using the follow bit of razor code:

@(Html.TelerikReporting().ReportViewer()
           .Id("reportViewer1")
           .ServiceUrl(Url.Content("~/api/reports"))
           .ReportSource((string)ViewBag.ReportString, new Dictionary<string, object> { { "Id", ViewBag.Id.ToString() } })
           .ViewMode(ViewMode.PrintPreview)
           .ScaleMode(ScaleMode.Specific)
           .Scale(1.0)
           .PersistSession(false)
           .PrintMode(PrintMode.AutoSelect)
           .TemplateUrl(Url.Content("~/ReportViewer/ReportViewerTemplate.html")))

 

In a desktop view, there's plenty of room and control to scroll around.

When I view as mobile (using Chrome's developer tools), I am not able to "scroll" left or right, so I am stuck with whatever is in the left-most column.

However, if I start using the desktop view, then switch to responsive mode, I can scroll left/right.

It seems to be that this is getting set when the page is loaded as a mobile browser:

<div class="trv-page-wrapper active" data-role="touch" style="touch-action: none;">

 

and the style tag is not getting set, or changed, when loading on the desktop.

If I manually remove the touch-action: none; style, the page functions as expected.

I'm not sure how to proceed to address this.  I can't apply a style sheet, since the style is inline.  Is there a event that gets fired when the report is finished being rendered, and I can change it there?

Thanks!

Silviya
Telerik team
 answered on 24 Jul 2018
4 answers
110 views

Hi,

I have prepared a report template. I have not bound any data yet, but generation of such "empty" report takes very long time (more than 30sek).
What goes wrong in it?

Can I add somewhere here my trdx template?

Thanks in advance for any help.
Jola

Silviya
Telerik team
 answered on 23 Jul 2018
2 answers
706 views

Could someone please help with the following.  I have a Telerik Reporting table in the groupHeader  section of an exhibit.  That being said I have a requirement where I need to hide one of the columns (depending on a Boolean test) and then resize the column next to it to the width of both columns to take up the space.  ie:  if Columns 1 & 2 width = .6 and If I hide column 2, increase the size of column 1 to 1.0R.   I have added the following code to the New() method of the report but again I can only hide the column.  For some reason the width (even after my line to resize it) stays at .06. 

tblTest.ColumnGroups(2).Visible = False

tblTest.Body.Columns(1).Width = Telerik.Reporting.Drawing.Unit.Inch(1.0R)

 

If anyone could help with this issue I would be very appreciative.

Thank You in advance.

 

Ivan Hristov
Telerik team
 answered on 23 Jul 2018
1 answer
134 views

I created a sub report which contains a detail section

The detail section contains one Black Panel

This black panel contains 3 panels.

The first image shows the structure.

The black panel contains red panel, green panel and purple panel.

I find that if there is a problem if there is page break (cut off) between two small panels

The second image shows the problem I encountered.

The green panel's height is not what I expected.

Some textbox (which is inside the green panel) cannot be shown fully because the green panel's height is reduced.

I think the problem is the green panel's height is calculated wrong due to page break.

 

I am using telerik reporting 2014 version. Do you encounter this problem before?

Thank you for your help.

MAN
Top achievements
Rank 1
 answered on 22 Jul 2018
1 answer
472 views

Hi!

Can anyone tell me how to use this i am facing problem while i am printing my report so i just want all columns to be fit in one page.

Please let me know about this.

Thanks.

Nasko
Telerik team
 answered on 20 Jul 2018
2 answers
843 views

Hi,

I have a report which has a large table in it with more than 40 columns. This table is bound to an ObjectDataSource element. Is it possible for me to iterate through each row and column after the elements are bound to the database (I guess I need to use the ItemDataBound event handler)? I have to make changes to the format and style of each cell of the table, which actually are textboxes.

I think I am able to do it also from design, using the conditional formatting and expressions to set the values of the textboxes in details section, but since I am migrating existing reports I don't want to do the whole work from scratch.

Thanks

Epep
Top achievements
Rank 1
 answered on 19 Jul 2018
1 answer
484 views

Hi everyone!

We are using the reporting designer to create report templates (trdp) which are then parsed and rendered as pdf from an application.
What we were looking for is something like create parameters (works perfectly!) for datasource(s). Parameters can be added as many as needed with some options and default values - great! But for a datasource it is only possible to use something "real" or no data source at all (=no preview feature). A "mock" datasource or better something like a "Schema definition" used by tables for example would very awesome.

Consider the following requirement:
A report for an invoice should be designed. Now the basic fields like number, date, issuer, ... no problem, just create parameters, fill in some values and preview works perfectly. Later in code just replace the values of the parameters with real values.
Now there is also a "Table" for the invoice line items. When adding a data source (for example SQL) another person must have the same database or the database must allow remote access to get a report preview. Also the database/table for the data must exist or be designed before the report can be created.

Is it possible to get some data/data source for preview (like define a schema same as parameters (field names + type)) and fill in some dummy values.
When rendering using the application just set the DataSource property of the report with some Bussiness Object (like a list of objects with those fields and types) and those are rendered then instead.

Why?
Its very hard to create a report without having access to data or a database or event when the data design is not final yet. May the report designer needs an additional field, which is not available yet, the database must be updated first to continue or the business object (Assembly) must be changed, compiled and shared before the report can be finished. I don't think is is very "standalone" this is more like "report designer + assembly or sql sharing"

Is there something i am missing or planned for the future to use table components without the requirement of an "Assembly" with the business objects or an working SQL Connection? Just like whats an template in my opinion is: Define what is needed, and later "fill" or "provide" whats required/defined by the template - no matter how and where it is received or comming from?

Currently i am using a CSV data source with inline CSV (to define schema and demo values for preview and autocompletion of fields).
In code we are setting the data source to an business object, and the data source is replaced. This is very near of what we are looking for but isn't there a "nicer" way?

Thanks in advance!

Todor
Telerik team
 answered on 18 Jul 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?