Telerik Forums
Reporting Forum
1 answer
598 views

I am trying to pass a model to the report using typeReportResource to set it as its dataSource, am I doing this wrong?

This is my Controller 

    public class ReportViewerController : Controller
    {
        private IOrganisationLogic _organisationLogic;
        public ReportViewerController(IOrganisationLogic organisationLogic)
        {
            _organisationLogic = organisationLogic;
        }
        public ActionResult Index()
        {
            var organisation = _organisationLogic.GetOrganisation();            

            var typeReportSource = new TypeReportSource();
            typeReportSource.TypeName = typeof(OrganisationSample).AssemblyQualifiedName;

            typeReportSource.Parameters.Add(new Parameter("flag", true));
            typeReportSource.Parameters.Add(new Parameter("organisation", organisation));

            return View(typeReportSource);
        }
    }

 

And here is the report design that i've created...


    public partial class OrganisationSample : Telerik.Reporting.Report
    {
        private IOrganisationLogic _organisationLogic;
        public OrganisationSample(bool flag, OrganisationLogic organisation)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            if (flag)
            {
                this.DataSource = organisation;
            }
        }
    }


what is the best approach I could do? Iwant to set the objectDataSource dynamically, each report has its own objectDataSource and I just want a single viewer that can use render multiple reports.

Nasko
Telerik team
 answered on 04 Nov 2019
3 answers
630 views

Hi,

I have a hard time trying to configure a Graph with line series in the stand alone Report Designer.
I need a simple chart with one or more line series. The line series are Numerical on both axes (it's a temperature (X) vs value (Y) plot).

The data for the Graph will be provided at runtime.

My data source format is thus:

```
class Data

{
   List<double> Temperature {g;s;}
   List<double> Value {g;s}
}

```

I was able to 'import' the dll to the designer and the data source was set up correctly (I know this because I'm able to use other data sources to successfully populate other elements of the report).

----------------------------------

What I did so far?

* I inserted a new line graph into the report
* I tried setting the Category to Temperature and Value to Value in the Wizard
* I named the graph to be able to find it at runtime and set it's DataSource
* In various attempts to configure the graph I tried setting the X and Y axes of the Graph to Numerical type or X to Category and Y to Numerical (I get the legend and axes preview in the designer)
* At runtime I set the DataSource of the Graph the same way as DataSource of a Table (which works ok for the table): `((Graph)(report.Items.Find("nameOfGraph", true)[0])).DataSource = dataSourceObject;`

 

The problem I have is that there are no series in the generated report in the Graph while other parts of the report are populated correctly.

 

Could you please provide me with a walktrough of how to configure a line Graph in Report Designer with the assumption that the data will be provided at runtime?

 

Thanks!

Todor
Telerik team
 answered on 04 Nov 2019
3 answers
710 views
Hi Team,

We would like to do a POC on the integreation of Telerik Reporting with seprate Angular6 application via web-services .

Please could you guide us or give us some urls where we will have an example.
Thanks,
Lokendra
Todor
Telerik team
 answered on 01 Nov 2019
1 answer
284 views

I have an MVC ASP.Net 4.61 application. I have a report defined with a parameter and a filter. When I view the preview in the designer, the default parameter works fine and the report is filtered, but when I run the application and it is using RenderReport it appears that the filter is passing a null value to the query so no data is returned. If I put the parameter in a text box I see the Id. My id's are GUIDs stored in a varchar field. If I take off filtering it shows multiple records properly.

 

var PDFSource = new TypeReportSource();
 PDFSource.TypeName = typeof(rptEmail).AssemblyQualifiedName;
 PDFSource.Parameters.Add(new Telerik.Reporting.Parameter("Id", id));
 
 var ReportProcessor = new ReportProcessor();
 var result = ReportProcessor.RenderReport("PDF", PDFSource, null);
 string PDFPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "Test.pdf");

 

File.WriteAllBytes(PDFPath, result.DocumentBytes);

 

Todor
Telerik team
 answered on 30 Oct 2019
1 answer
72 views
A customer requested that the parameters be closer together, instead of being distributed evenly across the entire width of the Report Viewer. Is there a simple way to do this?
Neli
Telerik team
 answered on 30 Oct 2019
23 answers
931 views
This morning, after upgraded my Chrome to version 77, I found out that I could not print any Telerik reporting report.

How to solve it?
Neli
Telerik team
 answered on 29 Oct 2019
1 answer
168 views
Could you please tell me what property is different between the upper left graph and the lower graph.  I want the labels to display the same as the lower one but I a can not seem to locate what field is different.
Neli
Telerik team
 answered on 29 Oct 2019
4 answers
975 views

Is it possible to set ObjectDataSource value at runtime?

 

We're trying to generate PDF's based on reports with data supplied at runtime. The structure of the object will always be the same but the values need to vary as this is supplied to the API.

 

For example:

public IActionResult GetReport(ReportData data)
        {
            var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            var reportSource = new Telerik.Reporting.UriReportSource();
            var deviceInfo = new System.Collections.Hashtable();
 
            reportSource.Uri = Path.Combine("Reports", "Report.trdp");
             
            // Need to set the value for the objectdatasource here somehow?
 
            Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
 
            return new FileContentResult(result.DocumentBytes, "application/pdf")
            {
                FileDownloadName = "QuestionnaireReport.pdf"
            };
        }
Nasko
Telerik team
 answered on 29 Oct 2019
1 answer
316 views

I have a report, that shows lots of information on table. The table has many rows, that it takes extra paper. In this case I don't want to show additional rows after row #5(or row #10). 

Question is how to hide those extra rows in Telerik Report Designer?

Nasko
Telerik team
 answered on 28 Oct 2019
1 answer
193 views

Hi,

I'm currently trying out Telerik reporting with Angular and see if it fits best with our .Net Core project. When I tried to add TelerikReportingModule in the app.module file, the existing jquery functions all became undefined. Then I noticed our supposed to be jquery version was overwritten by kendo's version of jquery. Is there a way we cpuld disable this and still be able to use the Telerik Reporting?

Found this link but I couldn't find anything similar for angular / .net core.

 

Thank you!

 

 

 

Todor
Telerik team
 answered on 28 Oct 2019
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?