Telerik Forums
Reporting Forum
1 answer
136 views
Hi all,

IS there any way for the report to persist it's report generation timestamp on the date it was first printed?

I've tried this:  http://www.telerik.com/community/forums/reporting/telerik-reporting/show-current-date-time-on-report-header.aspx but the date will change each time you open up the report again. thanks in advance 
Steve
Telerik team
 answered on 10 Dec 2012
0 answers
86 views

 

In the Sales by product line per period the demo show how the columns and the rows can be expanded and collapsed, but I don't see a way to do this? I cannot find this information in the documentation? How is this accomplished?

Eric Klein
Top achievements
Rank 1
 asked on 10 Dec 2012
2 answers
139 views
Here is the exact error that is reported when telerik and the session state are configured(it's attached as image file).  When using telerik reporting tool..I'm using sql datasouces to get values and here is the all code that I used..I used designer part to create the report  page..
namespace TelerikReporting
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using System.Configuration;
    using System.Data.SqlClient;
    using DataService.ConnectionFactory;
 
    public partial class PropRep : Telerik.Reporting.Report
    {
        public PropRep(int ID)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            this.ReportParameters["ID"].Value = ID;
            PropTest.Parameters["@ID"].Value = ID;
            PropTest.ConnectionString = ConnectionFactory.GetConnectionString(ConnectionType.SQLConnection);
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
    }
}

This is code for aspx page which has Report Viewer
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:ReportViewer ID="ReportViewer1" Width="100%" Height="800px" runat="server"></telerik:ReportViewer>
    </div>
    </form>
</body>
</html>

and this is the aspx.cs codebehind part of the page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
public partial class Reporting_Report : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["PID"] != null)
            {
                int ID = Convert.ToInt32(Request.QueryString["PID"].ToString());
                Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
                instanceReportSource.ReportDocument = new TelerikReporting.PropRep(ID);
                this.ReportViewer1.ReportSource = instanceReportSource;
            }
  
        }
    }
}
Peter
Telerik team
 answered on 10 Dec 2012
1 answer
75 views
Hi,

I have a report that is currently using a SQL Data Source for its data, which is working fine. However, my program uses this same SQL query in various classes. This means that the same query is being stored in the sqlDataSource component within my Telerik report, as well as in my SQL.cs file, which contains all queries used within my C#.

Is there a way of getting my Telerik report to get the SQL for its data source from the SQL.cs file, rather than having to duplicate this SQL code?

Thanks,
Ashley
Ashley
Top achievements
Rank 1
 answered on 10 Dec 2012
1 answer
106 views
Dear Telerik Team ,

     I am creating a table dynamical from code behind not in design time where  the number of columns are dynamic and  i  have a requirement where i need  to display summary at end of each column how do i achieve this without using the design wizard.
Thank you.

Regards, 
 Kiran

  
Steve
Telerik team
 answered on 10 Dec 2012
1 answer
148 views
Is it possible to change report size according to paper settings in runtime? Docking and anchoring didn't make any effect.
Steve
Telerik team
 answered on 07 Dec 2012
1 answer
126 views
Hi,
I got a requirement here.
I have 3 parameters , one of them is  a multivalue parameter.
Based on the number of values in multivalued parameter , i need to create Panel in the report



how can i access the parameters in the designer which is passed by the report viewer ?





Thanks
Peter
Telerik team
 answered on 07 Dec 2012
1 answer
113 views
Hello,

I'm using a dynamic table to display a schedule on a report. The table is laid out with a header row and a single data row for the scheduled items. As soon as the text in one of the data row's cells is larger than can be displayed the complete row won't be rendered any more. The report contains only the header row and no second page.

Is there a property on the TextBox element that enables PageBreaks inside the Box itself or am I missing something else?

Kind regards
Markus

Here's the code I use to define the table, it's called from the report's constructor:

private void BuildTable(ScheduleInfo context) {
    //create empty table
    var scheduleTable = new Table {
        Location = new PointU(Unit.Cm(0), Unit.Cm(0)),
        Name = "ScheduleTable",
        RowHeadersPrintOnEveryPage = true,
        KeepTogether = false
    };
 
    //insert table in detail section
    Details.Items.AddRange(new ReportItemBase[] { scheduleTable });
 
    var rowGroup = new TableGroup();
 
    //add header row
    scheduleTable.Body.Rows.Add(new TableBodyRow(Unit.Cm(0.8)));
 
    //set page layout
    if (context.Columns.Count<5) {
        ToPortrait();
    }
    else {
        ToLandscape();
    }
 
    var columnWidth = Width/context.Columns.Count;
    var minWidth = Unit.Mm(30);
    if (columnWidth < minWidth) columnWidth = minWidth;
 
    var rowHeight = Unit.Mm(6);
    var i = 0;
 
    foreach (var column in context.Columns) {
        scheduleTable.Body.Columns.Add(new TableBodyColumn(columnWidth));
 
        var headerText = new TextBox {
            Value = column.Header,
            Size = new SizeU(columnWidth, rowHeight)
        };
 
        headerText.Style.Font.Bold = true;
 
        var cellInfo = column.Appointments != null
            ? string.Join("\n\n", column.Appointments.Select(x => x.ToString()))
            : null;
 
        var cellText = new TextBox {
            Value = cellInfo,
            Size = new SizeU(columnWidth, rowHeight),
            KeepTogether = false
        };
 
        scheduleTable.Body.SetCellContent(0, i, cellText);
 
        var colGroup = new TableGroup {ReportItem = headerText};
        colGroup.GroupKeepTogether = false;
        scheduleTable.ColumnGroups.Add(colGroup);
 
        scheduleTable.Items.AddRange(new ReportItemBase[] { headerText, cellText });
 
        i++;
    }
 
    rowGroup.Groupings.AddRange(new [] {new Grouping("")});
    rowGroup.Name = "DetailGroup";
    rowGroup.GroupKeepTogether = false;
    scheduleTable.RowGroups.Add(rowGroup);
 
    Details.Items.Add(scheduleTable);
}

Markus Wolff
Top achievements
Rank 1
 answered on 07 Dec 2012
10 answers
249 views
Hi ,

 As Export options(combo and export link) is disabled , we cannot export the report.

On the button click,  we are showing reports in report viewer.

kindly tell me the solution for this.


Thanks for the help



Eduardo
Top achievements
Rank 1
 answered on 06 Dec 2012
1 answer
188 views
I have just upgraded a reporting project that is several years old and I see that there have been some breaking changes in the reporting structure.  

I several sub reports inside of a report.  The datasource to each one is determined dynamically inside of the Ctor of the report itself.
How would I accomplish this within the new model?   Any help would be greatly appreciated. 


public ClaimsReport()
        {
            InitializeComponent();

            BindToSubReport(1, subReport_Sacramento);
            BindToSubReport(2, subReport_Modesto);
            BindToSubReport(3, subReport_Fresno);
        }

    public  void BindToSubReport(int officeID, SubReport subReport)
        {
            using (eEntities context = new eEntities ()) {

                List<StrapReportClaimOutput> outputList = context.StrapReportClaimOutputs
                                                 .Where(x => x.OfficeID.Equals(officeID))
                                                 .OrderByDescending(o => o.TotalDocketing)
                                                 .ToList();

               subReport.ReportSource.DataSource = outputList;
            }
        }
Steve
Telerik team
 answered on 06 Dec 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?