Telerik Forums
Reporting Forum
6 answers
670 views
So, created the dashboard (report....have to call it a dashboard...don't ask), and have it set the way I want it.  It's a very basic three text inputs and a chart for results.  The trouble is the button that says "Preview".  I wanted to change it to say "Run", however, it doesn't look like there is any line in the code to do so.

Am I missing something?


Thanks gang!
Matt
Top achievements
Rank 1
 answered on 06 Apr 2012
3 answers
724 views
Can we combine multiple rows into single row in telerik??
I have report in which i have 15 sub sections.In which one of  sub section is PatientData.
I have placed table for each section and assigned corresponding datasources to each table.
Eg: tablePatientData -- PatientDataSource
tablePatientDetails-- PatientDetailsDatasource

For eg: I have a requirement like from DB Patient information was returned in  4 rows.
PatientId  PatientData
1                Test1
2                Test2
3                Test3
4                Test4

In UI i need to display it as below

Patient Data Heading
-------------------------------------------------------------
Test1,Test2,Test3,Test4

I need the information on how can we acheive this in Telerik reporting??
Steve
Telerik team
 answered on 06 Apr 2012
5 answers
289 views
Hello, 

I have a number of reports, I do not wish to create a viewer for each report, can I reuse the same ReportViewer and the winform for multiple reports by creating properties that pass in the Report to instantiate to the Winform.  I've created a separate library for my reports and now wish to instantiate my reports in the one viewer.  Is it good practice to instantiate my Report in a calling form and then pass it to the Winform that holds the viewer, cast it to a (Telerik.Reporting.IReportDocument) object and set the ReportViewers REPORT property.

Using Reporting Q3 2011

Thanks,

Kerry
Steve
Telerik team
 answered on 06 Apr 2012
1 answer
525 views
Hi,

I'm hitting an error building the Reporting samples (or any other project using them):

Error 1 The tag 'ReportViewer' does not exist in XML namespace 'clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight'. C:\Program Files (x86)\Telerik\Reporting Q3 2011\Examples\CSharp\SilverlightDemo\MainPage.xaml 48 14 CSharp.SilverlightDemo

* Telerik Reporting Q3 2011 SP1 (5.3.12.119)
* Visual Studio 2010 Ultimate (10.0.40219.1 SP1Rel)
* Building C# Silverlight applications

What I've found so far:
1. The samples (and my own applications) work fine on multiple Windows Server 2003 environments that I've tried it on.
2. The samples (and my own applications) all fail to compile on the one Windows Server 2008 R2 environment that I've tried it on. Not certain if the OS difference is a factor, or if this is just a coincidence.
3. Uninstalling / re-installing Telerik Reporting on the Windows Server 2008 R2 environment has not resolved it.
4. Yes, I am running Visual Studio as an Administrator.
5. Commenting out the ReportViewer in the .xaml file and creating it programmatically in the .cs file works fine.
6. Autocomplete when editing the .xaml works fine and appears to correctly resolve; however, compilation fails.
7. Other Telerik components are NOT affected. RadControls for Silverlight works great on all environments.

Any thoughts on what I should look at next? Any assistance appreciated...

Thanks,

William Cook
Chris Gillies
Top achievements
Rank 1
 answered on 06 Apr 2012
3 answers
618 views
Hello,

I tried to define a project SqlDataSource using a stored procedure. I defined it with a default value as required in order to see it in the Data Explorer. However, when I go to select the table item I applied the data source to, the Data Explorer shows No Data Source.

I used SQL Profiler to see what was happening. When I click on the data source at the bottom of the designer it executes the stored procedure with all parameters as null, thus returning no result set.

I opened the SqlDataSource component I created and it does have the parameter defined with a default value.

Oh, and if you select Preview it returns data.

Any help would be appreciated.
Steve
Telerik team
 answered on 06 Apr 2012
0 answers
457 views

I ran into the following issue when trying to build a report and although I finally found the answer in Telerik's documentation it wasn't without some lost productivity.  Perhaps this thread can help out some other developers.

Scenario:
So I was working on the visual representation on a number of .aspx web pages and
I had to switch over to create a report that was a form letter.  My typical process when I develop in this fashion is to...

  1. Develop the report without a data source
  2. Call the report programmatically and give it a data source
  3. Output the report to the web viewer, pdf or some other export format

In the form letter I wanted to create a date in a certain format and an inside address for the letter.  I created two user
functions to accomplish this. [Note:  If you haven't looked into using user functions for your Telerik reports then I would
recommend doing so as Telerik has provided a powerful mechanism for extending functionality].

In my Telerik Reporting Class Library, I added a class file named UserFunctions.vb  Here is the code:

Public Class UserFunctions
  
    Public Shared Function GetAddress(ByVal Name As Object, ByVal Addr1 As Object, ByVal Addr2 As Object, ByVal City As Object, ByVal State As Object, ByVal PostalCode As Object, ByVal Country As Object) As String
        Dim address As String = ""
        If Not IsDBNull(Name) AndAlso Name IsNot Nothing Then
            address &= Name.ToString.Trim & vbCr
        End If
        If Not IsDBNull(Addr1) AndAlso Addr1 IsNot Nothing Then
            address &= Addr1.ToString.Trim & vbCr
        End If
        If Not IsDBNull(Addr2) AndAlso Addr2 IsNot Nothing AndAlso Addr2.ToString.Trim.Length > 0 Then
            address &= Addr2.ToString.Trim & vbCr
        End If
        If Not IsDBNull(City) AndAlso City IsNot Nothing Then
            address &= City.ToString.Trim
        End If
        If Not IsDBNull(State) AndAlso State IsNot Nothing Then
            address &= ", " & State.ToString.Trim
        End If
        If Not IsDBNull(PostalCode) AndAlso PostalCode IsNot Nothing Then
            address &= "  " & PostalCode.ToString.Trim & vbCr
        End If
        If Not IsDBNull(Country) AndAlso Country IsNot Nothing AndAlso Country.ToString.Trim.Length > 0 Then
            address &= Country.ToString.Trim
        End If
        Return address
    End Function
  
    Public Shared Function GetLetterDate() As String
        Dim val As String = ""
  
        val = Now().ToString("MMMM d, yyyy")
  
        Return val
    End Function
  
End Class

The first function GetAddress takes several input parameters and builds an address.  The second function GetLetterDate() returns a date in the format (April 5, 2012).

This information I wanted to go into the Report Header section.  (Here is my mistake!!!)  Since I wanted the info of these 2 User Functions to show up side by side, I dropped a Table into the Report Header section of my Report.  I re-formatted the table to 1 row with 2 columns and entered the correct syntax for calling the user functions.  When I ran the report, my GetAddress function returned an empty string.  What was going on?

After wasting a decent amount of time, troubleshooting I finally figured out that the inputs to the GetAddress function were empty.  Why would the data source data be empty?  It wasn't when I passed it in.

Several days later (after solving the problem in a completely different way), I came across the following line in Telerik's documentation:

The Table report item is a separate data region and does not make use of the report's data source. It has its own Table..::.DataSource property which you have to set in order to populate the item with data.

And that was my whole problem!  I gave the Report a Data Source programmically.

Private Function ShowManagementLetterTest() As Telerik.Reporting.Report
    Dim showId As Integer = CInt(ID)
    Dim dtHdr As DataTable = csiShowDB.GetShowManagementLetter(showId)
    Dim report1 As New EmgLOSReports.TestReport1
    report1.DataSource = dtHdr
    Return report1
End Function

But I never gave the Table a Data Source (which can easily be accomplished with the following event code in the report itself)

Private Sub Table2_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles Table2.NeedDataSource
    If Table2.DataSource Is Nothing Then
        Table2.DataSource = Report.DataSource
        Dim dt As DataTable = CType(Report.DataSource, DataTable)
        TextBox10.Value = dt.Rows.Count.ToString
    End If
End Sub

Now, my whole problem started because I had carried over a style practice from web pages (using tables to line things up) to Telerik.Reporting (which does not need tables to align columns).

So, here were the learnings on my part...

  1. Make sure that your guidelines and practices apply to your environment  (I was in Telerik Reporting not web pages)
  2. Always keep in mind that there usually is a simpler way to solve your current dilemma (I didn't need tables to align items in Reporting)
  3. Telerik Reporting Tables require their own data sources!!!

I am attaching a PDF test report that shows the differences of using a Table with and without its' own data source.

Dennis
Top achievements
Rank 2
 asked on 05 Apr 2012
8 answers
255 views
Reporting 1.5

I have a letter style report with some data in the details section and several subreports.  Prior to any subreport, the details section has a report wide, "can grow" text box containing variable length summary text information.  When exporting to PDF, if the textbox is too long to be rendered completely on the first page, the report page breaks before the textbox rendering.  This leaves a large blank space on the first page.  The details section has Keeptogether explicity set to false.  Any ideas on how to cause this to be paginated correctly?
Mark
Top achievements
Rank 1
 answered on 05 Apr 2012
4 answers
323 views
Hiya.  I'm using Telerik Q3 2011 in Visual Studios 2010 on a machine running Windows 7.  I am new to Telerik and  learning the basics.  I am having trouble with the syntax for a parameter where multiple values will be allowed.  Currently I have the following in the sql query:

where a.problem_status in (:status)

This works fine if the parameter is set to single value.  However when I change the parameter to multi value and select multiple choices I get an error saying the sql query is not ended properly.

I have tried eliminating the parantheses with no luck.  I tried an = sign instead of "in" (not logical I know, but I tried it anyway), also without success.

Can someone tell me what I am doing wrong with the syntax?

Thanks!

Kevin
Kevin
Top achievements
Rank 1
 answered on 05 Apr 2012
3 answers
177 views
I want to use telerik reporting & Dotnetnuke.
Where can I put report.vb on dotnetnuke source code and how can I read ConnectionString.
I want to use store procdedure on telerik Reporting with parameters of store.

Thanks so much.
Excuse my english.
Rohan
Top achievements
Rank 1
 answered on 05 Apr 2012
0 answers
184 views
Hello,

I'm making a report that restricts data to definable time span. I made two parameters: dateFrom and dateTo. Obviously dateFrom can't be bigger than dateTo. Hence my question: it there possibility to set max and min values to parameters of DateTime type? 

In this case max value of dateTo parameter would be today's date and max value of dateFrom parameter would be dateTo's value. Paramater dateFrom wouldn't have min value, but dateTo's min value would be value of dateFrom parameter. 

That's the scenario. I just need help with implementing it. :)
dateto-tych
Grzegorz
Top achievements
Rank 1
 asked on 05 Apr 2012
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?