Telerik Forums
Reporting Forum
1 answer
533 views

I have a report book which I create through C# code. I want to have a single TOC covering all the reports in the report book. 

Following this (https://docs.telerik.com/reporting/designing-reports-reportbook-toc) I started creating a TOC but this article (https://docs.telerik.com/reporting/table-of-contents-report-book) says to add TocReportSource of ReportBook programmatically. But the problem is it doesn't have any example of how to do that. Can you add a sample code of how to achieve this..

 

//Report Book
var reportBook = new ReportBook();
 
//Cover Page
var coverPageReportSource = new InstanceReportSource();
var coverPagereport = new CoverPage(reportId)
{
    DocumentName = "Cover Page Report"
};
coverPageReportSource.ReportDocument = coverPagereport;
reportBook.ReportSources.Add(coverPageReportSource);
 
//TOC Page
var tocPageReportSource = new InstanceReportSource();
var tocPagereport = new FirstPage()
{
    DocumentName = "toc Page Report"
};
tocPageReportSource.ReportDocument = tocPagereport;
reportBook.ReportSources.Add(tocPageReportSource);
 
//Image Report
var imagesReportSource = new InstanceReportSource();
var imagesDatareport = new ImageReport()
{
    DocumentName = "Image Report"
};
imagesReportSource.ReportDocument = imagesDatareport;
reportBook.ReportSources.Add(imagesReportSource);
 
var instanceReportBookSource = new InstanceReportSource
{
    ReportDocument = reportBook
};
 
var reportProcessor = new ReportProcessor();
var renderingResult = reportProcessor.RenderReport("PDF", instanceReportBookSource, new Hashtable());
Neli
Telerik team
 answered on 14 May 2019
5 answers
858 views

It seems that the report viewer only supports this connection string format in the appsettings.json file for Asp.Net Core applications

"ConnectionStrings": [
  {
    "name": "Reports",
    "connectionString": "Data Source=.;Initial Catalog=DatabaseName;Integrated Security=True",
    "providerName": "System.Data.SqlClient"
  }  
]

 

But now a days this format for connection strings is used:

"ConnectionStrings":  {
"Reports": "Data Source=.;Initial Catalog=DatabaseName;Integrated Security=True"
}

 

It should be nice if the newer format also is supported.

 

 

 

Borja
Top achievements
Rank 1
 answered on 14 May 2019
2 answers
113 views

Does anyone know of any way of vertically centering a report (header, body and footer)?

I have a report whose body is between 1 and 25 lines.  When the report is 25 lines it takes almost the entire page up, and when 1 line almost nothing on the page.  

The client has requested the report be centered vertically.

 

First I checked the report designers page settings and properties.  And I don't see anything that looks like it does what I want.

I then checked the PrinterSettings and StandardPrintController for a setting that would do this.  And I don't see an option for what I want.

 

Is the only way to do this to figure out the number of lines, calculate the top margin and change that during runtime?  

Todor
Telerik team
 answered on 13 May 2019
5 answers
660 views

Hello ,

I am using telerik report designer R3 2016, and when I m drawing line chart using line chart, consider i have a data for the days 1,2,4 and 7 in the x-axis and 0 -100 in y axis . The line chart draws perfectly on the nodes 1 to 2, 2 to 4 and 4 to 7. But the the problem is here in x- axis 3, 5 and 6 is missing (obviously the node not drawn there) . is that any way to show the line chart 1 to 2, 2 to 3 ( go default to zero even no value is mention to draw), 3 to 4, 4 to 5, 5 to 6, 6 to 7.  Exactly to say the missing values which is not given from the user it should go down to zero and draw the nodes which the actual data. please see the screen shot for further reference.

When no value it should not directly pass to next node, My idea to show the amount of sales in particular day/month, the missing days/month not having any data means no sales. should go down to zero. If I process from back-end its huge amount of data generate for zeros.

Using C# code, we can set the missing value property as zero, but in designer i am not able to find this property, please can anyone help me to come out of this.

 

 

Neli
Telerik team
 answered on 13 May 2019
1 answer
158 views
I'm trying to replicate a SSRS report that uses a DbContext for a data source. Each page of the report has a header and footer that contains data that is retrieved and display based on report parameters. I don't see any way to implement columns in the header because I can't place a table in the PageHeaderSection. I would love to hear some suggestions on how best to accomplish what I'm trying to do.
Silviya
Telerik team
 answered on 13 May 2019
2 answers
216 views
Hello, I have a question, I am using version 2019 and when I generate a report with a line series it doesn't connect the points, the line is not drawn using Arrangemode = Clustered, when I change to Stacked it draws them twice, help I need only one line, I'm forgetting some configuration?.
Foton
Top achievements
Rank 1
 answered on 09 May 2019
1 answer
597 views

Hello,

I just installed Telerik Reporting r1 2019.

It tells me that the installation was successful, but Visual extudio does not detect the extension.

How could I add it?

Thank you.

 

 

Nikola
Telerik team
 answered on 09 May 2019
5 answers
1.4K+ views

Hello,

i have problems to resolve ExpensesData[] (Indexer,Array or what ever) in my table column.

Please see the attached file.

In the column "Fahrtzeit" I become the message --> ReportLibraryTest.DriverReportService.ExpensesData[]

What can I do to get to the data.

Is there an easy way to resolve contents of lists or arrays into table columns?

 

Thats the implementation of ExpensesData[] in the Webservice:

  [System.Runtime.Serialization.DataMemberAttribute()]
        public ReportLibraryTest.DriverReportService.ExpensesData[] Expenses {
            get {
                return this.ExpensesField;
            }
            set {
                if ((object.ReferenceEquals(this.ExpensesField, value) != true)) {
                    this.ExpensesField = value;
                    this.RaisePropertyChanged("Expenses");
                }
            }
        }

 

thanks in advance.

 

Todor
Telerik team
 answered on 09 May 2019
4 answers
449 views

Hi,

I have crated class library report (.cs) and wanted to know how to set some value to textbox using ReportsController (i.e. web api)

 

Thank you!

Prashant

Marcel
Top achievements
Rank 1
 answered on 09 May 2019
2 answers
1.3K+ views

I am trying to set up the report viewer to display a report using the InstanceReportSource. I want to use the InstanceReportSource because our application programmatically renders, compresses and downloads mass reports. I have followed this guide and have set up the rest service and custom resolver. I am using the same code to create the reports for rendering/downloading and for passing to the report viewer. The rendering and downloading works just fine but the report viewer is blank. During debugging, I can see the Reports API controller being hit and the resolver creating the InstanceReportSource.

I have created a a sample application that shows how I am using the reporting service. I'm sure that I'm missing something minor. I just can't figure out what. Any help would be much appreciated.

Sample Application Download

Darren
Top achievements
Rank 1
 answered on 07 May 2019
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?