Telerik Forums
Reporting Forum
1 answer
131 views
Hi there,

is it possible to have a list of objects with three lists inside, create a graph inside a list, bind the the list to the parent list and show data from two of the child lists in my graph?

I did this with tables and that worked perfect for me, but I have no idea if it works with graphs and if, how it could work.

Any hint?

Best regards
Manfred
Nasko
Telerik team
 answered on 20 Jun 2014
2 answers
116 views
Hi Telerik Team!
Our firm is considering of using telerik reports.
We are going  to show it on Sharepoint web.
We also need to manage it for example in WPF application or by SharePoint Web Part. I know there is standalone designer where we can design or modify reports, but now I have to download report.trdx modify it in standalone designer, save it and again upload it to the sharepoint.

Is there a designer as a control which I could embed in my applications?

For example I have got report.trdx on Sharepoint list, by one click I open it in
designer and after modification I save it again to the Sharepoint List.

Second question:
Is there possibility of using custom controls as a parameter value chooser? For example a tree or slider?

Best Regards
Tomek
Tomasz
Top achievements
Rank 1
 answered on 20 Jun 2014
3 answers
79 views
This code worked with Telerik 2011 but fails to work with Telerik 2014.  It generates: "An exception of type 'System.NullReferenceException' occurred in Reporting.dll but was not handled in user code".

   " Public Shared Sub ConfigureCslReport(ByRef Report1 As Telerik.Reporting.Report)
         ' Change the design-time connection string to the run-time connection string
 
        CType(CType(Report1.Items("ReportFooterSection1").Items("SubReport1"), Telerik.Reporting.SubReport).Report.DataSource, Telerik.Reporting.SqlDataSource).ConnectionString = Reporter_Common.GetConnectionString("SHPR")
 
        CType(CType(Report1.Items("ReportFooterSection1").Items("SubReport2"), Telerik.Reporting.SubReport).Report.DataSource, Telerik.Reporting.SqlDataSource).ConnectionString = Reporter_Common.GetConnectionString("SHPR")
 
        CType(CType(Report1.Items("ReportFooterSection1").Items("SubReport3"), Telerik.Reporting.SubReport).Report.DataSource, Telerik.Reporting.SqlDataSource).ConnectionString = Reporter_Common.GetConnectionString("SHPR")
 
        CType(CType(Report1.Items("ReportFooterSection1").Items("SubReport4"), Telerik.Reporting.SubReport).Report.DataSource, Telerik.Reporting.SqlDataSource).ConnectionString = Reporter_Common.GetConnectionString("SHPR")
     End Sub"

Since 90% of the report works, why do these 4 SubReports in the Footer section fail?  The "Reporter_Common.GetConnectionString("SHPR")"  just returns the SQL connection to the database and is used without errors in the rest of the report.

Any ideas?
Stef
Telerik team
 answered on 20 Jun 2014
2 answers
569 views
Hello,

I'm using Telerik reporting and I have had two datetime report parameters to my report: FromDate and ToDate.

I have set the default value of ToDate parameter to today's date and I would like to set the default value of FromDate to 12 months before today's date. Is there any way of doing that using the functions given on the Edit Expression window (in ReportParameter Collection Editor)?

Thanks in advance!
Nasko
Telerik team
 answered on 20 Jun 2014
1 answer
475 views
Hello,

I require to create Telerik Label Report with following configuration,

On Web Page,
- There will be one Drop Down List of various labels types like Avery 5160 or 5162 etc, user can select the Label type from this DDL.
- There will be two TextBox like Row and Column, where user can specify the Row and Columnnumber into which the single address can be display.
- After selecting Label type and inserted Row and Column, user will click on 'Generate Report' button.
- When this button clicks, Telerik will create report for selected label type and insert the address at specified position (row and Column)

Is this possible using Telerik Reporting? If yes then how?

Thank you,
Jatin Mandalia
Stef
Telerik team
 answered on 19 Jun 2014
12 answers
445 views

I’m having some issues with the report rendering when using conditional visibility and lists.  

To start with, the text box with conditional visibility ( based on the value of the field) doesn’t “suppress” the area of the panel, which causes problems with single line text boxes (this is reproduced in the second case/page where there are no comments on Sheet.

Secondly, when there is no items on the nested table inside a list and the “empty” space is not “suppressed”. This case is shown in the fifth case/page where the Education doesn’t contain any Certificates.

 

The conditional visibility is implemented in all cases with Bindings such as:

Fields.CertificateList.Count >0

Here is a brief data structure:

 Sheet

                 Description

                 Score

                 Comments (multiline)

                List<SheetTrace>

                List<Education>

 

SheetTrace

                Date

                 Username

                Action

                Comments (multiline)

 

Education

                 Title

                School

                Comments (multiline)

                List<Certificate>

 Certificate

            Class

            Grade

The report is designed with the following layout:

masterPanel -> maps to Sheet

panel1 -> maps to SheetTrace and contains a Table object to show  traces.

panel2 -> maps to Education and contains a List which shows Education items and a nested Table which shows Certificates.


The layout of the report and a set of sample screens are attached.

The installed Telerik report version is :Q2 2013, 7.1.13.612 under Visual Studio 2010 SP1
A complete self-contained project is available at your request.

Thanks in advance,
Chris

 

Nasko
Telerik team
 answered on 19 Jun 2014
3 answers
120 views
Hi I'm trying style selectors but having trouble to follow your guide in version Q3 2012. 
Here are the steps I have done:
1. Add a new stylerule in the StyleRule collection editor
2. Click on Selectors ellipse
3. Add a DescendantSelector
? - the newly added DescendantSelector does not have child selectors property, only a value. 
At this point I don't know how to add child selectors to it.

I would like to create a style rule so that every TextBox in the ReportHeader has blue, calibri font..

Thanks,
Roland
Peter
Telerik team
 answered on 19 Jun 2014
4 answers
232 views
ASPX:
<
telerik:RadGrid ID="ManagersPLProgressRadGrid" runat="server" AllowAutomaticInserts="false"
               AllowMultiRowSelection="true" AllowSorting="true" AutoGenerateColumns="false"
               AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="false" GridLines="Both"
               Skin="" Visible="true" ShowFooter="true" AllowPaging="true" AllowCustomPaging="false"
               PageSize="10" OnNeedDataSource="ManagersPLProgressRadGrid_NeedDataSource" OnItemDataBound="ManagersPLProgressRadGrid_ItemDataBound"
               OnItemCommand="ManagersPLProgressRadGrid_ItemCommand">
               <HeaderStyle CssClass="GridHeader" Font-Bold="True" ForeColor="White" />
               <ItemStyle CssClass="GridRow" />
               <AlternatingItemStyle />
               <ActiveItemStyle CssClass="GridRow" />
               <SelectedItemStyle CssClass="selectedrow" />
               <PagerStyle CssClass="GridPager" VerticalAlign="Middle" ShowPagerText="false" Mode="NextPrevAndNumeric" />
               <MasterTableView CommandItemDisplay="None" CssClass="Frame" Width="100%" RowIndicatorColumn-Reorderable="True"
                   AllowSorting="false" EnableHeaderContextMenu="False" AllowCustomSorting="False"
                   AllowMultiColumnSorting="False" ShowFooter="True" ForeColor="White" BackColor="Navy">
                   <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
                   <Columns>  
                       <telerik:GridBoundColumn UniqueName="ContactID" HeaderText="" DataField="ContactID"
                           Visible="false" />                 
                        <telerik:GridTemplateColumn HeaderStyle-Width="5%">
                           <ItemTemplate>
                            <asp:LinkButton ID="lnkShowData" runat="server" CommandName="HideShow">></asp:LinkButton>
                           </ItemTemplate>
                           </telerik:GridTemplateColumn>
                           <telerik:GridBoundColumn UniqueName="CINumber" HeaderText="" DataField="CINumber"
                               HeaderStyle-Width="10%" />
                           <telerik:GridBoundColumn UniqueName="GName" HeaderText="" DataField="GName"
                               HeaderStyle-Width="10%" />
                           <telerik:GridBoundColumn UniqueName="FName" HeaderText="" DataField="FName"
                               HeaderStyle-Width="10%" />
                           <telerik:GridTemplateColumn>
                           <ItemTemplate>
                               <br />
                               <%--<div class="inner">
                                   <div style="float: left;">--%>
                                       <rsweb:ReportViewer ID="reportViewer" runat="server" Font-Names="Verdana" Font-Size="8pt"
                                           InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
                                           BorderStyle="None" InternalBorderStyle="None" ShowToolBar="False" BackColor="Transparent" Width="100%" Height="65%">
                                           <LocalReport ReportPath="Secure\ManagerPLProgress.rdlc">
                                             
                                           </LocalReport>
                                       </rsweb:ReportViewer>
                                 <%--  </div>      
                               </div>--%>
                               <asp:Panel id="pnlTIPrograms" runat="server" Visible="false">
                                           <div class="inner">
                                                       <p><b>Submitted Manager Identified Activities</b></p>
                                               <telerik:RadGrid ID="ManagerIdentifiedActivitiesRadGrid" runat="server" AllowAutomaticInserts="false"
                                                   AllowMultiRowSelection="true" AllowSorting="true" AutoGenerateColumns="false"
                                                   AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="false" GridLines="Both"
                                                   Skin="" Visible="true" ShowFooter="true" AllowPaging="true" AllowCustomPaging="false"
                                                   PageSize="10" OnNeedDataSource="ManagerIdentifiedActivitiesRadGrid_NeedDataSource"
                                                   OnItemDataBound="ManagerIdentifiedActivitiesRadGrid_ItemDataBound">
                                                   <HeaderStyle CssClass="GridHeader" Font-Bold="True" ForeColor="White" BackColor="LightBlue" />
                                                   <ItemStyle CssClass="GridRow" />
                                                   <ActiveItemStyle CssClass="GridRow" />
                                                   <SelectedItemStyle CssClass="selectedrow" />
                                                   <PagerStyle CssClass="GridPager" VerticalAlign="Middle" ShowPagerText="false" Mode="NextPrevAndNumeric" />
                                                   <MasterTableView CommandItemDisplay="None" CssClass="Frame" Width="100%" RowIndicatorColumn-Reorderable="True"
                                                       AllowSorting="false" EnableHeaderContextMenu="False" AllowCustomSorting="False"
                                                       AllowMultiColumnSorting="False" ShowFooter="True" ForeColor="Black" BackColor="LightBlue">
                                                       <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
                                                       <Columns>
                                                           <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="" HeaderStyle-Wrap="true">
                                                           <ItemTemplate>
                                                               <asp:Label ID="numLabel" runat="server"  Width="30px" />
                                                           </ItemTemplate>
                                                           </telerik:GridTemplateColumn>
                                                           <telerik:GridBoundColumn UniqueName="ProgramNameHours" HeaderText="" DataField="ProgramNameHours"
                                                               HeaderStyle-Width="25%" />
                                                           <telerik:GridBoundColumn UniqueName="Areas" HeaderText="" DataField="Areas"
                                                               HeaderStyle-Width="25%" />
                                                       </Columns>
                                                       <NoRecordsTemplate>
                                                           <div style="width: inherit">
                                                               There are no records to display</div>
                                                       </NoRecordsTemplate>
                                                   </MasterTableView>
                                                   <ClientSettings>
                                                       <Resizing AllowColumnResize="True"></Resizing>
                                                       <Selecting AllowRowSelect="False"></Selecting>
                                                   </ClientSettings>
                                               </telerik:RadGrid>
                                           </div>                                  
                                           <div class="inner">
                                               <p><b>Submitted Accredited Programs</b></p>
                                               <telerik:RadGrid ID="ProgramsRadGrid" runat="server" AllowAutomaticInserts="false"
                                                   AllowMultiRowSelection="true" AllowSorting="true" AutoGenerateColumns="false"
                                                   AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="false" GridLines="Both"
                                                   Skin="" Visible="true" ShowFooter="true" AllowPaging="true" AllowCustomPaging="false"
                                                   PageSize="10" OnNeedDataSource="ProgramsRadGrid_NeedDataSource" OnItemDataBound="ProgramsRadGrid_ItemDataBound">
                                                   <HeaderStyle CssClass="GridHeader" Font-Bold="True" ForeColor="White" BackColor="Green" />
                                                   <ItemStyle CssClass="GridRow" />
                                                   <ActiveItemStyle CssClass="GridRow" />
                                                   <SelectedItemStyle CssClass="selectedrow" />
                                                   <PagerStyle CssClass="GridPager" VerticalAlign="Middle" ShowPagerText="false" Mode="NextPrevAndNumeric" />
                                                   <MasterTableView CommandItemDisplay="None" CssClass="Frame" Width="100%" RowIndicatorColumn-Reorderable="True"
                                                       AllowSorting="false" EnableHeaderContextMenu="False" AllowCustomSorting="False"
                                                       AllowMultiColumnSorting="False" ShowFooter="True" ForeColor="Black" BackColor="Green">
                                                       <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
                                                       <Columns>
                                                           <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="">
                                                           <ItemTemplate>
                                                               <asp:Label ID="noLabel" runat="server"  Width="30px" />
                                                           </ItemTemplate>
                                                           </telerik:GridTemplateColumn>
                                                           <telerik:GridBoundColumn UniqueName="ProgramNameHours" HeaderText="" DataField="ProgramNameHours"
                                                               HeaderStyle-Width="25%" />
                                                           <telerik:GridBoundColumn UniqueName="Areas" HeaderText="" DataField="Areas"
                                                               HeaderStyle-Width="25%" />
                                                       </Columns>
                                                       <NoRecordsTemplate>
                                                           <div style="width: inherit">
                                                               There are no records to display</div>
                                                       </NoRecordsTemplate>
                                                   </MasterTableView>
                                               </telerik:RadGrid>
                                           </div>
                               </asp:Panel>
  
                           </ItemTemplate>
                             
                       </telerik:GridTemplateColumn>
                   </Columns>
                   <NoRecordsTemplate>
                       <div style="width: inherit">
                           There are no records to display</div>
                   </NoRecordsTemplate>
               </MasterTableView>
               <ClientSettings>
                   <Resizing AllowColumnResize="True"></Resizing>
                   <Selecting AllowRowSelect="False"></Selecting>
               </ClientSettings>
           </telerik:RadGrid>
C# CODE:
public
partial class ManagerPLProgress : System.Web.UI.Page, IManagerPLProgressView
    {
 
        private ManagerPLProgressPresenter presenter;
 
        protected void Page_Init(object sender, EventArgs e)
        {
            presenter = new ManagerPLProgressPresenter(this);
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                presenter.Initialize();
            }
        }
 
        protected void ManagersPLProgressRadGrid_NeedDataSource(object sender, EventArgs e)
        {
            presenter.GetManagersPLProgress();
        }
 
        protected void ManagersPLProgressRadGrid_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "HideShow")
            {
                if (Page.IsValid)
                {
                    GridDataItem item = e.Item as GridDataItem;
                    Panel Panel1 = item.FindControl("pnlTIPrograms") as Panel;
                    if (Panel1.Visible == true)
                    {
                        Panel1.Visible = false;
                    }
                    else
                    {
                        Panel1.Visible = true;
                    }
                }
            }
        }
 
        protected void ManagersPLProgressRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            ProfessionalLearningService plSvc = new ProfessionalLearningService();          
            if (e.Item is GridPagerItem)
            {
                GridPagerItem pager = (GridPagerItem)e.Item;
                Label lbl = (Label)pager.FindControl("ChangePageSizeLabel");
                if (lbl != null) lbl.Visible = false;
 
                RadComboBox combo = (RadComboBox)pager.FindControl("PageSizeComboBox");
                if (combo != null) combo.Visible = false;
            }
 
            if (e.Item is GridDataItem)
            {
                //DateTime startDate;
                //DateTime endDate;
                //DateTime yearEndDate = new DateTime(Convert.ToInt32(DateTime.Now.Year), 12, 31);
                var contactID = ((CIPortal.BusinessLogic.DTO.ManagerPLProgress)(e.Item.DataItem)).ContactID.Value;
                if (contactID != Guid.Empty)
                {                   
                    var pLHours = plSvc.GetPLHours(contactID, StartDate, EndDate);
                    var reportViewer = (ReportViewer)e.Item.FindControl("reportViewer");
                    reportViewer.LocalReport.DataSources.Add(new ReportDataSource("DSPLHours", pLHours));
 
                    var ManagerIdentifiedActivitiesRadGrid = (RadGrid)e.Item.FindControl("ManagerIdentifiedActivitiesRadGrid");
                    ManagerIdentifiedActivitiesRadGrid.DataSource = presenter.GetManagerIdentifiedActivitiesForManagerPLProgress(contactID); //plSvc.GetManagerIdentifiedActivitiesForManagerPLProgress(contactID, StartDate, EndDate);
 
                    var ProgramsRadGrid = (RadGrid)e.Item.FindControl("ProgramsRadGrid");
                    ProgramsRadGrid.DataSource = presenter.GetProgramsForManagerPLProgress(contactID); //plSvc.GetProgramsForManagerPLProgress(contactID, StartDate, EndDate);
                     
                }
            }
        }
 
        protected void DisplayButton_Click(object sender, EventArgs e)
        {
            SearchType = "daterange";
            ManagersPLProgressRadGrid.Rebind();
        }
 
        protected void btnSearchManagers_Click(object sender, EventArgs e)
        {
            SearchType = "contact";
            ManagersPLProgressRadGrid.Rebind();
        }
 
        protected void ProgramsRadGrid_NeedDataSource(object sender, EventArgs e)
        {
 
        }
 
        protected void ProgramsRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                GridPagerItem pager = (GridPagerItem)e.Item;
                Label lbl = (Label)pager.FindControl("ChangePageSizeLabel");
                if (lbl != null) lbl.Visible = false;
 
                RadComboBox combo = (RadComboBox)pager.FindControl("PageSizeComboBox");
                if (combo != null) combo.Visible = false;
            }
 
            if (e.Item is GridDataItem)
            {
                GridDataItem pager = (GridDataItem)e.Item;
                Label lbl = (Label)pager.FindControl("noLabel");
                lbl.Text = (e.Item.ItemIndex + 1).ToString();
 
            }
        }
 
        protected void ManagerIdentifiedActivitiesRadGrid_NeedDataSource(object sender, EventArgs e)
        {
        }
 
        protected void ManagerIdentifiedActivitiesRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                GridPagerItem pager = (GridPagerItem)e.Item;
                Label lbl = (Label)pager.FindControl("ChangePageSizeLabel");
                if (lbl != null) lbl.Visible = false;
 
                RadComboBox combo = (RadComboBox)pager.FindControl("PageSizeComboBox");
                if (combo != null) combo.Visible = false;
            }
 
            if (e.Item is GridDataItem)
            {
                GridDataItem pager = (GridDataItem)e.Item;
                Label lbl = (Label)pager.FindControl("numLabel");
                lbl.Text = (e.Item.ItemIndex + 1).ToString();
 
            }
 
 
        }
}

Here is my ASPX and C# Code. The RadGrid has a nested ReportViewer and two more RadGrid within an ItemTemplate column. Everything works for the first time when default data is populated. However, next time user can do a filter by specfying additonal search criteria and same code fails with below error while performing a  ManagerPLProgressRadGrid.Rebind() in the btnSearchTeachers_Click event. I have identified that the issue is with the ReportViewer nested within the RadGrid, if the ReportViewer control is removed everything works as expected. Has anybody faced similar issue when a ReportViewer is nested within a Telerik RadGrid. Have googled a lot but have not yet found a solution. Thanks in advance for any help!

Cannot unregister UpdatePanel with ID 'DocMap' since it was
not registered with the ScriptManager. This might occur if the
UpdatePanel was removed from the control tree and later added again,
which is not supported.
Parameter name: updatePanel
imi
Top achievements
Rank 1
 answered on 19 Jun 2014
3 answers
205 views

Greetings All!
I just started using Telerik Reporting Q1 2014 SP1 (8.0.14.507) and am having a hair-pulling issue regarding report parameters. I have 5 report parameters on the report, and I am passing them values via an ASP.NET 4.5 page just prior to showing the report viewer:

01.protected void Page_Load(object sender, EventArgs e)
02.        {
03.            if (!Page.IsPostBack)
04.            {
05.                // TEMPORARY!!! Only Use For Development if viewing this page directly!!
06.                //Session["REPORT_REPAIR_ID"] = 7;
07. 
08.                if (Session["REPORT_REPAIR_ID"] != null)
09.                {
10.                    TypeReportSource src = new TypeReportSource();
11.                     
12.                    src.TypeName = "Halliburton.DBS.AssetRepairTracker.Reports.RepairOrder, Halliburton.DBS.AssetRepairTracker";
13. 
14.                    src.Parameters.Add(new Telerik.Reporting.Parameter("ReportID", Convert.ToInt32(Session["REPORT_REPAIR_ID"])));
15.                    src.Parameters.Add(new Telerik.Reporting.Parameter("MfgConnection",
16.                                                                        WebConfigurationManager.ConnectionStrings["ManufactureSupport"].ConnectionString));
17.                    src.Parameters.Add(new Telerik.Reporting.Parameter("AssetConnection",
18.                                                                        WebConfigurationManager.ConnectionStrings["AssetRepair"].ConnectionString));
19.                    src.Parameters.Add(new Telerik.Reporting.Parameter("DBProvider", WebConfigurationManager.ConnectionStrings["AssetRepair"].ProviderName));
20.                    src.Parameters.Add(new Telerik.Reporting.Parameter("CryptoKey", this.CryptoKey));
21. 
22.                    this.trvReportViewer.ReportSource = src;
23.                }
24.                else
25.                    throw new Exception("Bad Redirect");
26.            }
27.        }

However when the report is initialized, and I peak at the parameter collection, all the parameters are null (or empty). This is causing an invalid parameter value exception when the parameters validate (because I have AllowNull = false)
(See attached screenshots)




Peter
Telerik team
 answered on 18 Jun 2014
2 answers
262 views
So I am working on a proof of concept application that uses the HTML5 report viewer to display reports on a server. I am using sub-reports and drill-through reports quite a bit and it raises a question for me, or perhaps more accurately a concern. The reports obviously work just fine if they're in the same directory, however it would be fairly easy to forget to place them in the same location on the server and or just leave one out which would obviously cause that part of the report to fail. My question is what kind of alternatives (if any) do I have to add the same type of functionality without needing separate files. 

Ideally I'd like it to be something to the effect of display a report that has a link, when you click on the link the report looks inside itself and uses information that is there to hide all the old stuff and display new information (from a different data source) and the report viewer would have the 'history' so that navigating back would revert all those changes with the back arrow. I imagine that it's possible to do with a visibility toggle, but I'm not sure if that's what I should be looking into. Any advice would be appreciated, and I hope that I made it clear enough what I'm looking for.

-Randy
Nasko
Telerik team
 answered on 17 Jun 2014
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?