Telerik Forums
Reporting Forum
2 answers
536 views

Hi,

I have upgraded to the Telerik Reporting R2 2018 SP1 (old version: prior to r3-2016).

Now I get an exception like:
System.Security.SecurityException: The assembly MyAssembly is not permitted to be used by an ObjectDataSource component. Please include it in an AssemblyReferences element in the Telerik.Reporting configuration section of your application configuration file.

(I am using ObjectDataSource).

I have added an entry as described in https://docs.telerik.com/reporting/objectdatasource#configuration

and in https://docs.telerik.com/reporting/standalone-report-designer-extending-configuration

to my app.config.

But the exception is still thrown.

Note: the standalone designer works fine after I have added a similar entry to its config file.

 

Thanks in advance

Wolfgang

Wolfgang
Top achievements
Rank 1
 answered on 30 Jul 2018
1 answer
154 views

Hello,

I'm trying to build a chart and prepared a classes:

        public class ReportIndicators
        {
            public Item item1 { get; set; }
            public Item item2 { get; set; }
        }

        public class Item
        {
            public int value1 { get; set; }
            public int value2 { get; set; }
            public string itemType { get; set; }
        }

In the report I return the data:

        return new ReportIndicators
        {
            item1 = new Item
            {
                value1 = 10,
                value2 = 15,
                itemType = "type1"
            },
            item2 = new Item
            {
                value1 = 20,
                value2 = 15,
                itemType = "type2"
            }
        };

The chart looks good (chart.jpg), but the groups of columns are not centered above each label, why is this? If I'll add more items, the columns will be narrower. How I can fix that? I tried to change Scale.SpacingSlotCount property, but it did not help me.

When I built the chart, I used the item 'Add Graph Series' in the context menu on the graph and set the values as on the screen 1.jpg, 2.jpg. Is it correct?

 

Simon
Top achievements
Rank 1
 answered on 27 Jul 2018
5 answers
860 views

Hello,

I would like to show negative currency values with the negative symbol instead of bracket in the telerik report. E.g. -$101.00 instead of ($203.00) or -€101.00 instead of (€101.00) - we use different currencies in the app. I set this.Culture.NumberFormat.CurrencyNegativePattern = 1; in the *.Designer.cs file. The application compiles correctly and the values show properly, but the report in the design mode has an error:
at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)
Do you have the information how to fix the issue?

Simon
Top achievements
Rank 1
 answered on 26 Jul 2018
4 answers
209 views
Having several .NET 4.5 enterprise applications on deck for complete refactoring to .NET Core 2.1, I'd like to know if the Telerik reporting engine is going to make the shift to support netcoreapp2.1 implementations, rather than just supporting the full frameworks like net461.
Nasko
Telerik team
 answered on 26 Jul 2018
1 answer
130 views

Hello,

 

I'm using version Q2 2015 of Telerik Reporting and have the following need which I'm not sure how to do.

When we create a report we display it in the Reportviewer.

When we physically print it, it is printed on paper where the corporate identity is pre printed.

On the report I've included this with empty headers and footers to have room for this.

Some external clients also receive some reports in PDF or Excel.

When we save the report using the Save button the corporate identity is not displayed on the resulting document.

 

So, I like to have a difference in saving and printing whether the corporate identity is shown.

My thoughts now are to display the corporate identity on the report, and when printed hide the content of the headers and footers.

Is this possible, are there other options?

 

Thanks in advance,

 

Jeroen

Nasko
Telerik team
 answered on 26 Jul 2018
2 answers
153 views
Hello, I have some performance issues in Telerik Report and I'm testing the Telerik Report Server.

I noticed that to render a PDF using telerik report server is faster than rendering in html ...

I want to know if it is possible to make a POST for the telerik report server API, to render a report informing the connection to the database as a parameter?

I have another question, when I request for the telerik report server API to render a report in PDF format, will this report be rendered by the windows service "telerik.reportServer.ReportAgent"? And does the API use this same windows service to render the report?

I am expecting that I can request for API to render my report in a pdf or csv format using this windows service, as it appears to be faster than rendering in html.

Thanks for your attention.
Nasko
Telerik team
 answered on 26 Jul 2018
1 answer
521 views

Hello!

Please help me. I have two tables 'crosstab1'and' cross tab 2'.  In them I do numbering on the lines: Row Number ('crosstab1') and Row Number ('cross tab 2'). how can I combine these two numbers into one?

Nasko
Telerik team
 answered on 26 Jul 2018
1 answer
168 views

Hi,

I have a report which is displayed using the the HTML5 viewer and can be exported/printed using the command buttons at the top of the viewer.  Locally, under IIS Express, the report is fine and renders on a Legal size page with small margins (0.3cm and 0.4cm left/right) without overflowing to the right.  However when deployed to a hosting provider the report overflows (when printing or exporting to PDF) such that the right hand parts of the report are rendered onto a new page.  Its as though its picking up some settings like paper size or margins from the server rather than the report definition (trdx), is that possible?  Are there any setting when rendering that are picked up from the server?

Silviya
Telerik team
 answered on 26 Jul 2018
1 answer
154 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
536 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
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?