Telerik Forums
Reporting Forum
1 answer
193 views
Is there an example of how to use the Html5 reportviewer with a objectdatasource

public class DashboardController : Controller
{
     public ActionResult Index()
    {
        var model = data.GetReportData()
 
        return View(model);
    }
}
@(Html.TelerikReporting().ReportViewer()
        .Id("reportViewer1")
        .ServiceUrl("/api/reports/")
        .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.htmll")
        .ReportSource(new TypeReportSource{TypeName="MyReportLibrary, Dashboard"})
        .ViewMode(ViewModes.INTERACTIVE)
        .ScaleMode(ScaleModes.SPECIFIC)
        .Scale(1.0)
        .PersistSession(true)
)

How do I attached the model to the reportsource?
IvanY
Telerik team
 answered on 20 Nov 2013
1 answer
1.0K+ views
PLEASE REFER TO MY STACK OVERFLOW QUESTION FOR DETAILED EXPLANATION.

http://stackoverflow.com/questions/20039340/binding-data-to-a-telerik-report

I'm using ASP.NET MVC with telerik reporting. I'm trying to bind data to a dataset, which is assigned to a telerik report.

I have tried with below code but data is not showing up.

private void Report1_ItemDataBound(object sender, EventArgs e)
        {
            SqlDataAdapter adapter = new SqlDataAdapter();
            rep = new reportRepository();
            List<ReportViewModel> model = rep.GetData();

            // Creating and configuring the ObjectDataSource component:
            var objectDataSource = new Telerik.Reporting.ObjectDataSource();
            objectDataSource.DataSource = dsConvertion.ToDataSet(model); // GetData returns a DataSet with three tables
            objectDataSource.DataMember = "tblFirst"; /// Indicating the exact table to bind to. If the DataMember is not specified the first data table will be used.

            // Creating a new report
            Telerik.Reporting.Report report = new Telerik.Reporting.Report();

            // Assigning the ObjectDataSource component to the DataSource property of the report.
            report.DataSource = objectDataSource;

            // Use the InstanceReportSource to pass the report to the viewer for displaying
            Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
            reportSource.ReportDocument = report;

        }

Peter
Telerik team
 answered on 20 Nov 2013
3 answers
169 views

I am new to Telerik reporting and am trying to include a simple graph from data that has two columns (X, Y), for instance



1 345



2 10



...



12 3273 



The Graph wizard seems to assume a more complicated data structure and requires a category.



For the simple X Y graph I need there are no grouping or categories.



How do I graph this simple data.







The graph produced by the wizard also has "ALL" under the X axis for which I can not find the property displaying this text.



Petio Petkov
Telerik team
 answered on 20 Nov 2013
4 answers
251 views
Ive seen this post but no resolution. Is there a way to do page counting within a group. ie. Report is 15 pages long and the numbering would look like (page number-page count) .
Group 1 (1-5,2-5,3-5...) Group 2 (1-7,2-7,3-7...) Group 3 (1-3,2-3,3-3)

If this is not possible (which I seem to believe is the case, because the problem of resetting the pagecount) is it possible to reset the page number at the end of each group? The numbering would be simply the count inside the group.
Group 1 (1,2,3,4,5) Group 2 (1,2,3,4,5,6,7) Group 3 (1,2,3)

Any help is appreciated..

Thanks

Nick
Top achievements
Rank 1
 answered on 19 Nov 2013
1 answer
78 views
How do i use the function to change a bit field from 0 or 1 to yes or no?

IIf(expr, truePart, falsePart)
Petio Petkov
Telerik team
 answered on 19 Nov 2013
1 answer
83 views
Hi

I need to know if Tool Tip Manager(as in Web Control) Exist in Reports?

Senthil
Petio Petkov
Telerik team
 answered on 19 Nov 2013
3 answers
215 views
Hello Telerik-Team,

we have built a report with the TelerikReportingSystem. The PDF should be for high quality printing and therefor we need the PDF in CMYK color mode. At least the fonts have to be in pure black (only one color), because of the better printing results. If you print an RGB-PDF in CMYK you can cause blurry fonts.
Is there a possibility to generate the PDF in CMYK or convert it afterwards? I guess, we are not the first, who print the generated PDFs for high quality in a printing shop.

Thanks!

Betty Häusler, Christian Tesch
Stef
Telerik team
 answered on 19 Nov 2013
1 answer
137 views

Clicking on ReportViewer after selecting check boxes from RadComboBox does not cause a post back if the report is in a control.

How can I make a RadComboBox cause post back when click in the report area, but only if something actually has changed in the RadComboBox?



I have 1 control with multiple rad combox with post back set to true.

I have another control with a ReportViewer.

If the reports isn’t loaded the post back works, but if a report is loaded there is no post back caused by the RadComboBox selecting in to the report viewer AREA.



Test.aspx



Partial Class test
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Alert.Show("Changed")
    End Sub
End Class


test.aspx



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
 
<%@ Register src="Options/MYfilters.ascx" tagname="MYfilters" tagprefix="uc1" %>
<%@ Register src="Options/MYReport.ascx" tagname="MYReport" tagprefix="uc2" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <table style="width: 100%;">
            <tr>
                <td>
   
                    <uc1:MYfilters ID="MYfilters1" runat="server" />
   
                </td>
            </tr>
        </table>
          <table style="width: 100%;">
            <tr>
                <td>
   
                    <uc2:MYReport ID="MYReport1" runat="server" />
   
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>


Myfilters.ascx.vb





<%@ Control Language="VB" AutoEventWireup="false" CodeFile="MYfilters.ascx.vb" Inherits="Options_MYfilters" %>
<telerik:RadComboBox ID="Company_ComboBox" runat="server" AutoPostBack="True" CheckBoxes="True"
    EnableCheckAllItemsCheckBox="True" MaxHeight="500px">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="Company_1" Value="Company_1" Checked="True" />
        <telerik:RadComboBoxItem runat="server" Text="Company_2" Value="Company_2" />
        <telerik:RadComboBoxItem runat="server" Text="Company_3" Value="Company_3" />
    </Items>
    <Localization AllItemsCheckedString="All Companies Selected" ItemsCheckedString="Select All Companies" />
</telerik:RadComboBox>




MyReport.ascx.vb



<%@ Control Language="VB" AutoEventWireup="false" CodeFile="MYReport.ascx.vb" Inherits="Options_MYReport" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms" Namespace="Telerik.ReportViewer.WebForms"
    TagPrefix="telerik" %>
<telerik:ReportViewer ID="ReportViewer1" runat="server" Style="border: 1px solid #ccc;"
    Width="100%" Height="950px">
 
</telerik:ReportViewer>




MyReport.ascx.vb



Imports Telerik.Reporting
Imports Telerik.Web.UI
 
Partial Class Options_MYReport
    Inherits System.Web.UI.UserControl
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
 
        Dim reportType As Type = Type.[GetType]("CompanyQuarterlySales, ReportsClassLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")
        Dim TheReport As IReportDocument = DirectCast(Activator.CreateInstance(reportType), IReportDocument)
        Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
        instanceReportSource.ReportDocument = TheReport
        Me.ReportViewer1.ReportSource = instanceReportSource
 
        Me.Page.Title = "Quartely - " + reportType.Name
        Dim report As Telerik.Reporting.Report = DirectCast(instanceReportSource.ReportDocument, Telerik.Reporting.Report)
 
        report.ReportParameters("Top").Value = "10"
        report.ReportParameters("CompID").Value = "13"
        report.ReportParameters("Country").Value = "*"
        report.ReportParameters("OpCo").Value = "*"
        report.ReportParameters("Department").Value = "*"
        report.ReportParameters("Site").Value = "*"
        report.ReportParameters("StartDate").Value = "2013"
 
        Me.ReportViewer1.RefreshReport()
    End Sub
End Class

Attached is an image of what is happening.







KS
Top achievements
Rank 1
 answered on 18 Nov 2013
2 answers
383 views

Hello Telerik,

 

I am posting my question here at WPF > General Discussions, because I didn’t see a forum for WPF > ReportViewer (the closest thing I found was WPF > PDFViewer). I don’t want to get lost or forgotten, so if you know where I should post this question, please reply back, and let me know. BTW, I went ahead and posted a duplicate of this question on the Telerik Reporting forum.

 

I am using Visual Studio 2010 and RadControls for WPF, v.2013.3.1016.40 (Dev). My WPF project references Telerik.Reporting.dll, runtime version v4.0.30319.

 

I have been attempting to use the web resource How to: Add report viewer to a WPF application. When I try to apply Step #4 in this resource, I get the error:

 

    Cannot find type Telerik.Reporting.ReportSource in module Telerik.Reporting.dll.

 

When I search the Internet for help, I cannot find a resolution to this problem. Can you please help?

 

Thank you

BRIAN
Top achievements
Rank 1
 answered on 18 Nov 2013
3 answers
142 views
I have no exposure whatsoever to Telerik reporting (and unfortunately I need a quick answer.)

It's my understanding that Telerik Reporting is completely incompatible with SSRS, a totally different system.

If so, we've run into a technical roadblock with SSRS and I'm looking for alternatives.

Can anyone definitively tell me (and better yet provide a sample) if Telerik Reporting is capable of exporting a report into PDF that consists of a title/cover page that is entirely covered by an image, and a following set of report pages that all have header and footer fields?

(I know this sounds trivial but apparently header/footers in SSRS leave blanks on the title page, even if they're set to do not print.)
IvanY
Telerik team
 answered on 18 Nov 2013
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?