Telerik Forums
Reporting Forum
3 answers
408 views
Hi,
 i have installed Telerik reporting kit on my system. Now i am trying to add the chart control in toolbox and i have added the dll in my
 visual studio toolbox. Still the control will not get added in my toolbox. Could you please help me to solve the problem?

Thanks
Rahul
Steve
Telerik team
 answered on 18 Feb 2010
1 answer
217 views
I am trying to use the report viewer to display reports, i am setting the property reportviewer.report = rpt, based on the report the user wants to display, however i always get a blank report. Any suggestions, help?

This is the button that calls the report

Private

 

Sub btnQAChecklist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQAChecklist.Click

        Dim rpt As New ReconChecklistRpt(_planToPlanUpload.PlanToPlanUploadId)  

        Dim frm As New PDRSReportViewer(rpt)  

        frm.Show()

 

End Sub

This is the code for the report.

Imports

 

System.ComponentModel

 

 

 

Imports System.Drawing

 

 

 

Imports System.Windows.Forms

 

 

 

Imports Telerik.Reporting

 

 

 

Imports Telerik.Reporting.Drawing

 

 

 

Imports System.Data.SqlClient

 

 

 


Partial
Public Class ReconChecklistRpt

 

 

 

 

Inherits Telerik.Reporting.Report

 

 

 

 

 

        Private _PlanToPlanUploadId As Integer

    

 

    Public Sub New()

 

 
               InitializeComponent()

               _PlanToPlanUploadId = 5198

 

 

                Me.DataSource = Nothing

 

 

 

        End Sub

 

 

 

 

 

 

    Public Sub New(ByVal PlanToPlanUploadId As Int32)

 

        _PlanToPlanUploadId = PlanToPlanUploadId

 

        Me.DataSource = Nothing 

 

 

    End Sub

 

 

 

 

 

    Private Sub ReconChecklistRpt_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) HandlesMe.NeedDataSource

 

 

    Dim cn As New SqlConnection(My.Settings.ConnectionString) 

 

    Dim da As New SqlDataAdapter("rpt_QACheckListByPlanToPlanUploadId", cn)

 

 

    da.SelectCommand.CommandType = CommandType.StoredProcedure

    da.SelectCommand.Parameters.AddWithValue(

"@PlanToPlanUploadId", _PlanToPlanUploadId)

 

 

 

    Report.DataSource = da

 

    End Sub

 

End

 

Class

 

 

 

 

 

This is the report viewer form

 

Public

 

Class PDRSReportViewer

 

 

 

 

    Public Sub New()

' This call is required by the Windows Form Designer. 

 

 

        InitializeComponent()

' Add any initialization after the InitializeComponent() call.

 

 

 

    End Sub

 

 

 

    Public Sub New(ByVal report As Telerik.Reporting.IReportDocument)

 

        InitializeComponent()

 

 

        Me.ReportViewer.Report = report

 

 

    End Sub

 

 

 

 

 

 

    Private Sub PDRSReportViewer_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

        Me.ReportViewer.RefreshReport()

 

 

    End Sub

 

End

 

Class

 

 

 

 

 

 

 

 

 

 

 

Steve
Telerik team
 answered on 18 Feb 2010
0 answers
175 views
Hi, Telerik!

I have one simple question: "How can I format the value such as "223:49" (string or double) to "HH:mm" as Date & Time for further Excel operations with duration time values?"

PS. In Excel and scalc we have the magic format code "[HH]:mm", that give us opportunity to summarize values like "223:49" and "123:45".
ib
Top achievements
Rank 1
 asked on 17 Feb 2010
1 answer
169 views
Hello,

  Is there a possibility to print a subreport transparent, so that the background picture of the main report is visible?

I've set all background colors to transparent (subreport in main report, background of subreport and all textboxes in subreport).
The effect is, that in Web Preview my subreports are rendered transparent, but all printed versions (on Paper, as XPS or PDF) have a plain white background in the subreport area killing the background picture.

I use Telerik Reporting Q3 2009, 3.2.9.1211.

Thanks in advance
  Thomas
Steve
Telerik team
 answered on 17 Feb 2010
0 answers
49 views
Dear Sir, 
                 i have created a report with back ground color for report as well as for report viewer for good looking, but i wanna take print out without the back ground color ( transparent ). Is it possible or not, if it is possible whats the process ?

reply soon.,

With Regards
S.Suriya Narayanan
Suriya
Top achievements
Rank 1
 asked on 17 Feb 2010
3 answers
167 views
Dear Sir,
             I am using telerik report. Till now i have creates above 50 reports. So i wanna give back ground color for all reports using cascading style sheet. It is possible or not? If it is possible how it is? plz reply


With regards
S Suriya Narayanan
Steve
Telerik team
 answered on 16 Feb 2010
2 answers
623 views
Hello all, I'm writing my very first Telerik report. I am trying to hook up one of the parameters to a "Business Object" datasource.
My datasource is defined as:

Namespace DataObjects 
    Public Class DropDowns 
        Public Shared ReadOnly Property Intervals() As List(Of ListItem) 
            Get 
                Dim lic = New ListItemCollection() 
 
                lic.Add(New ListItem("Raw""0")) 
                lic.Add(New ListItem("15 Minutes""0.25")) 
                lic.Add(New ListItem("30 Minutes""0.5")) 
                lic.Add(New ListItem("1 Hour""1")) 
                lic.Add(New ListItem("6 Hours""6")) 
                lic.Add(New ListItem("12 Hours""12")) 
                lic.Add(New ListItem("1 Day""24")) 
 
                Return (From li As ListItem In lic Select li).ToList 
            End Get 
        End Property 
    End Class 
End Namespace 

My report parameter is defined as (from the report codebehind):

        reportParameter1.Name = "DeviceId" 
        reportParameter1.Type = Telerik.Reporting.ReportParameterType.[Integer
        reportParameter1.UI.AllowBlank = False 
        reportParameter1.UI.AvailableValues.DataMember = "Intervals" 
        reportParameter1.UI.AvailableValues.DataSource = GetType(DataObjects.DropDowns) 
        reportParameter1.UI.AvailableValues.DisplayMember = "Fields.Text" 
        reportParameter1.UI.AvailableValues.ValueMember = "Fields.Value" 
        reportParameter1.UI.Visible = True 
        Me.ReportParameters.Add(reportParameter1) 

When i run the report in the browser, in the area where the report would normally render, it tells me: "The expression contains object 'Fields.Value' that is not defined in the current context." I have tried using Value, Fields.Value, Item.Value, ... and just can't figure out what to put for the DisplayMember and ValueMember to get them to pull the Text and Value properties of the ListItem objects respectively. I even tried leaving them blank, but then it tells me: "Parameter 'DeviceId' has defined AvailableValues, but no ValueMember is specified. Use 'Item' if binding to Array."

Can someone tell me what to put for the DisplayMember and ValueMember properties???
Thanks in advance! 
Aaron Abdis
Top achievements
Rank 1
 answered on 16 Feb 2010
3 answers
121 views
I have a report generated through the report wizard. I have set up three parameters, Service, Mod. Number and Status.

I have the filters working properly, but I would like for the user to have the selection to see Open, Closed or All in the status field.

The user can now select Open or Closed. If I set the MuliValue to true on the third parameter (status) and allow the user to "Select All", I get the following error on all selections:

An error has occured while processing Report: Cannot perform '=' operation on System.String and System.Collections.ArrayList.

Any help on this would be greatly appreciated.
Massimiliano Bassili
Top achievements
Rank 1
 answered on 16 Feb 2010
0 answers
213 views
Hi,
    I am generating cross-tab report for whole month. so based on status, i want to show colors. e.g. for 0-Green, 1-Red, 2-LightGreen, 3-Orange, 4-LightYellow, 5-LightPink. when i have given condition formating to first column, it wrote this many lines of code in to the designer. but i want to do it for 31 columns. what is the alternative for this? Also there is limitation of code is, my field will be changed at runtime. it is not fixed that, for txtD1, always field is Fields.D01.

please let me know. following is the code sample.

formattingRule1.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
            new Telerik.Reporting.Data.Filter("=Fields.D01", Telerik.Reporting.Data.FilterOperator.Equal, "3")});
            formattingRule1.Style.BackgroundColor = System.Drawing.Color.Orange;
            formattingRule1.Style.Color = System.Drawing.Color.Transparent;
            formattingRule2.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
            new Telerik.Reporting.Data.Filter("=Fields.D01", Telerik.Reporting.Data.FilterOperator.Equal, "1")});
            formattingRule2.Style.BackgroundColor = System.Drawing.Color.Red;
            formattingRule2.Style.Color = System.Drawing.Color.Transparent;
            formattingRule3.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
            new Telerik.Reporting.Data.Filter("=Fields.D01", Telerik.Reporting.Data.FilterOperator.Equal, "0")});
            formattingRule3.Style.BackgroundColor = System.Drawing.Color.Green;
            formattingRule3.Style.Color = System.Drawing.Color.Transparent;
            formattingRule4.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
            new Telerik.Reporting.Data.Filter("=Fields.D01", Telerik.Reporting.Data.FilterOperator.Equal, "2")});
            formattingRule4.Style.BackgroundColor = System.Drawing.Color.LightGreen;
            formattingRule4.Style.Color = System.Drawing.Color.Transparent;
            formattingRule5.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
            new Telerik.Reporting.Data.Filter("=Fields.D01", Telerik.Reporting.Data.FilterOperator.Equal, "5")});
            formattingRule5.Style.BackgroundColor = System.Drawing.Color.LightPink;
            formattingRule5.Style.Color = System.Drawing.Color.Transparent;
            formattingRule6.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
            new Telerik.Reporting.Data.Filter("=Fields.D01", Telerik.Reporting.Data.FilterOperator.Equal, "4")});
            formattingRule6.Style.BackgroundColor = System.Drawing.Color.LightYellow;
            formattingRule6.Style.Color = System.Drawing.Color.Transparent;
            this.txtD1.ConditionalFormatting.AddRange(new Telerik.Reporting.Drawing.FormattingRule[] {
            formattingRule1,
            formattingRule2,
            formattingRule3,
            formattingRule4,
            formattingRule5,
            formattingRule6});

-Thanks
Rajendra S(rajendra.soni@e-zest.in)
Allan Hill
Top achievements
Rank 1
 asked on 16 Feb 2010
3 answers
158 views
I'm dynamically building a report from a set of parameters in an xml file.  I have categories defined in one drop down list and the list of reports in a second drop down list.  Changes to ListBox1 should only update the values in ListBox2 and changes to ListBox2 should only add textbox controls to Panel1.  However, when I change the values in either box the ReportViewer refreshes the current report.  Even if I change the value in ListBox2 I have to wait for the old report to refresh before I can hit the run button for the second report.

Any ideas?

Thanks,

Paul

<

 

telerik:RadScriptManager ID="RadScriptManager1" Runat="server" LoadScriptsBeforeUI="true"></telerik:RadScriptManager>

 

 

 

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="DropDownList1">
<UpdatedControls>

 

<telerik:AjaxUpdatedControl ControlID="DropDownList2" />

 

</UpdatedControls>

 

</telerik:AjaxSetting>

 

<telerik:AjaxSetting AjaxControlID="DropDownList2">

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="Panel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

</AjaxSettings>

 </

 

telerik:RadAjaxManager>

 

 <

 

asp:XmlDataSource ID="dsCategory" runat="server" DataFile="~/TelerikReportsConfig.xml" XPath="ReportCategories/ReportCategory"></asp:XmlDataSource>

 

 

<

 

asp:Label ID="lblCategory" runat="server" Text="Category" Width="96px"></asp:Label>

 

 

<

 

asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="dsCategory" DataTextField="Name" DataValueField="ID" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"></asp:DropDownList>

 

 

<br />

 

 

<

 

asp:XmlDataSource ID="dsReports" runat="server" DataFile="~/TelerikReportsConfig.xml" XPath="ReportCategories/ReportCategory/Report"></asp:XmlDataSource>

 

 

<

 

asp:Label ID="lblReports" runat="server" Text="Report" Width="96px"></asp:Label>

 

 

<

 

asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="dsReports" DataTextField="Name" DataValueField="Report" AutoPostBack="True" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged"></asp:DropDownList>

 

 

 <br />

 

<br />

 

<

 

asp:Panel ID="Panel1" runat="server"></asp:Panel>

 

<br />

 

<br />

 

 

<

 

asp:Button ID="btnRun" runat="server" onclick="btnRun_Click" Text="Run Report" />

 

 

<

 

telerik:ReportViewer ID="ReportViewer1" runat="server" Visible="True" Width="100%" ></telerik:ReportViewer>

 

 

 

 

Iana Tsolova
Telerik team
 answered on 16 Feb 2010
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?