Telerik Forums
Reporting Forum
1 answer
523 views

Hello,

I have an object that collects data that then needs to be passed to the Report. A small example is below:

Imports Telerik.Reporting
 
Public Class Form1
    Public dataList As List(Of String)
 
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'Fill data collection
        dataList.Add("Item 1")
        dataList.Add("Item 2")
        dataList.Add("Item 3")
 
        'Setup Telerik report
        Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor
        Dim deviceInfo As New System.Collections.Hashtable()
 
        Dim typeReportSource As New Telerik.Reporting.TypeReportSource
        typeReportSource.TypeName = GetType(Report1).AssemblyQualifiedName
 
        Dim result As Telerik.Reporting.Processing.RenderingResult = reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo)
        Dim fileName As String = "testFile" & "." & result.Extension
        Dim path As String = "C:\Projects\Telerik"
        Dim filePath As String = System.IO.Path.Combine(path, fileName)
 
        'Save Telerik report
        Using fs As New System.IO.FileStream(filePath, System.IO.FileMode.Create)
            fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)
        End Using
 
    End Sub
End Class
 
Public Class telerikAdapter
    Public Property New dataList As List(Of String)
 
    Public Sub New()
 
    End Sub
End Class

 

In this example, I need dataList to be available in the report. I can set the DataSource to the telerikAdapter class, or any of the other classes that exist in my application. However, these classes are instantiated when Telerik runs the report, and thus have no access to data that exists elsewhere in already instantiated objects.

 

I also tried passing parameters to the report, but I can't pass a collection. I need access to several rather deep collections of data in the report.

 

There must be a way to access dataList or to pass it in when the report is run, but I can't see it.

I'm working with Windows 7 32 bit, VB.NET, and WinForms, if it makes any difference.

 

 

 

Katia
Telerik team
 answered on 25 Oct 2017
7 answers
460 views
I would like to set the Maximum and Minimum values for the DateTime axis for my graph from my datasource. 

For example i want to display from 01/01/2014  to 02/01/2014.  I currently have those two values in parameters, but how do i set the Maximum and Minimum of the scale to these paramaters?  I have tried =Parameters.Start.Value ect... (Start is my datetime parameter)

Any suggestions?
Carl
Top achievements
Rank 2
 answered on 25 Oct 2017
4 answers
275 views
 I have a report with a Map control on it. Most of the points are within a small distance of each other in one city, but there are also a few random points around the rest of the US. The map by default zooms to show all the points. Is it possible to set it to zoom to a certain level and centre on the highest value points as they are the most interesting to the user?
Ivan Hristov
Telerik team
 answered on 25 Oct 2017
1 answer
109 views

When I browsed your asp.net MVC reports demos in mobile view,I could not scroll all op reports parts, only the left pane of the report appears.

 

Is there a solution to this problem?

I need to scroll all of report details.

 

I attached two images to show the deference between desktop view and mobile view.

 

Katia
Telerik team
 answered on 25 Oct 2017
4 answers
304 views
I want to sort a column group which has values in it.When I click on sorting button ,according to the highest or lowest value it has to sort and should give the result according to these values.Can you please help me out in giving a solution for it. 
Katia
Telerik team
 answered on 25 Oct 2017
0 answers
249 views

I have been struggling to create good looking Telerik reporting charts from Telerik standalone designer. One of the things required is to display the data point values on top of each column on the chart. I have tried both OutsideEnd and OutsideColumn. None of them work pretty for the highest column. One screenshot of the chart created is shown in the attachment.

I also tried to see if I could change the scale of the Y-axis so that I could get more space on top of the chart to show the value. Unfortunately it seems that I could not find anywhere to set that.

I have also had issue of Datapoint labels overlapped in stacked bar column graph, which makes a chart ugly. I saw that this issue has been reported by other people in this forum about the new graph control. Not sure if this has been fixed in the newer version.

 

Mike
Top achievements
Rank 1
 asked on 24 Oct 2017
6 answers
357 views

Hi, 

Working on Demo Project and need to understand the work flow for telerik reports. 

1. I create Report Library were i have "RouteCustomerReport.vb"  ("Design Only" not connected with any datasource)

2. I have another project where i import ZulalReportLibrary.dll

3. Below Code display the report without data. 

 

 Private Sub frmRouteCustomerReport_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        Dim rpt As New ZulalReportLibrary.RouteCustomerReport
        rpt.DataSource = MyDataSource()

        Dim TRS As New Telerik.Reporting.TypeReportSource
        TRS.TypeName = "ZulalReportLibrary.RouteCustomerReport, ZulalReportLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

        ReportViewer1.ReportSource = TRS
        ReportViewer1.RefreshReport()

    End Sub

 

Waseem
Top achievements
Rank 1
 answered on 24 Oct 2017
4 answers
384 views

Hi,

I'm trying to implement the Reset Page Number by Group functionality for a standalone report. I found an example class within the forums. I can see the assembly I've created from the sample code, as well as the function, in the Report Designer(R1 2017) application Edit Expression dialog.

 

The problem I'm having is that I can't seem to pass the Report object from the report into the user function. I've tried both of the following function signatures but with no luck:

 

Public Shared Function MyPageNumber(ByVal lastGroupOnPage As String, ByVal reportPageNumber As Integer, ByRef report As Object) As Integer     

 

James
Top achievements
Rank 1
 answered on 23 Oct 2017
2 answers
246 views

Our solution supports both MySQL and SQL Server, the database engine is selected during installation. We are trying Telerik reports but have been stumped trying to figure out how to create a report that can support MySQL and SQL Server. 

The report should execute a stored routine in the selected database engine. We have found how to fill the report data source at design time using either a sqldataadapter or mysqldataadapter but how would we select the appropriate data adapter at run time?

 

Any help you could provide would be appreciated!

Matt
Top achievements
Rank 1
 answered on 23 Oct 2017
4 answers
270 views

Hi,

I am using a common report created in Telerik Reporting Designer.

The report has several multivalue parameters. All of them has "AllowNull" = TRUE (and AllowBlank=True also, just to be sure).

When the report loads for the first time, it works ok - all parameters pass empty to SQL and complete report is created.

But - event there is not change in parameters area, I cannot use Preview button - all multivalue parameters announces incorrect value.

I have to use Sellect All option and Deselect all option ... in all multivalue parameters. And after that Preview button is available

in HTML5 version I miss "Null" checkbox in case of parameters with AllowNull = True

Img attached

Can you please recommend me, hot to proceed with this situation?

Thank you,

Jan H.

Jan
Top achievements
Rank 1
 answered on 23 Oct 2017
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?