Telerik Forums
Reporting Forum
2 answers
249 views
Hello all
I am new with Report and I would binding a field of my Report (not a field of DataSource)
MyReport.cs 
public partial class MyReport : Telerik.Reporting.Report
{
      public string MyString
   {
      get { return "Demo Telerik Report"; }
      }
 
        public EntiteDatabase()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
 
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
}
And in my TextBox, I tried to bind with this expression "=Report.MyString" but it's dosen't work.
It's possible ?
I wouldn't use static method because this field could depending parameters of my report or others ...

thanks for help
Olivier
Top achievements
Rank 1
 answered on 23 Jul 2013
1 answer
124 views
Hello,

I want to use Reporting for a series of reports for my organization - the site is based in DotNetNuke. 

I've used reporting before and am reasonably comfortable with it all... but I'm curious if anyone has any suggestions for broadly how to organize the reports. I would like to make a central library of reports and a report controller of sorts that handles permissions, access, and parameters. Then, I'll probably make a DNN module that shows reports matching some set of conditions. 

But, before I dive in with this, I'm wondering if anybody has any suggestions or thoughts on how to organize and handle many reports. What's the best way to make sure that individual reports get the right parameters? What's the best way to store a list of reports and parameters? Are there any features of functions of Telerik's framework that apply specially in this sort of context?

Thanks,

Mike
Stef
Telerik team
 answered on 22 Jul 2013
1 answer
136 views
in the following code would it be possible to pass code that deletes a page break and reformats the footer on the docx that the report is converted to.  I am thinking p.invokemethod(method name) or something like that.  This is a workaround to auto page break place in docx document at end of page.  I do not want to add to my app.config as earlier post suggests.

Telerik.Reporting.Processing.RenderingResult result = TelContractrp.RenderReport("DOCX", TelContractirs,deviceInfo);
            string dContract = DateTime.Now.ToString().Replace("/", "");
            dContract = dContract.Substring(0, 12);
            dContract = dContract.Replace(":", "");
            string fileName2 = result.DocumentName + "_" + dContract + "." + result.Extension;
            string filePath2 = System.IO.Path.Combine(saveLocation, fileName2);
            FileStream fs = new FileStream(filePath2, FileMode.Create);
            fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            fs.Close();
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.UseShellExecute = true;
            p.StartInfo.FileName = filePath2;
            p.Start();
Stef
Telerik team
 answered on 22 Jul 2013
3 answers
253 views
Folks

Using RadControls for ASP.NET AJAX Q1 2013 SP2 with Reporting version = 7.1.13.705. In my report I have a SQLDatasource (i.e. SQLDatasource2).

I would like to Filter that Datasource in Page load event of ASP.net not inside Report NeedDataSource event.

This works in Report NeedDataSource event.
private void TestReport1_NeedDataSource(object sender, EventArgs e)
      {
          //Take the Telerik.Reporting.Processing.Report instance
          Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
           
          string stsql = "SELECT M.ManagerID, C.FirstName + ' ' + C.LastName AS Name, E.Gender FROM  (SELECT DISTINCT ManagerID  FROM HumanResources.Employee) AS M INNER JOIN";
          stsql += " HumanResources.Employee AS E ON M.ManagerID = E.EmployeeID INNER JOIN Person.Contact AS C ON E.ContactID = C.ContactID WHERE (E.Gender = N'F') ORDER BY Name";
          this.sqlDataSource2.SelectCommand = stsql;
         
 
      }


But I would like to filter the Datasource in Page load event of asp.net. I came up with this..

Protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Report1 myReports = new Report1();
 
            Reports.TestReport1 myReport = new Reports.TestReport1();
 
            string stsql = "SELECT M.ManagerID, C.FirstName + ' ' + C.LastName AS Name, E.Gender FROM  (SELECT DISTINCT ManagerID  FROM HumanResources.Employee) AS M INNER JOIN";
            stsql += " HumanResources.Employee AS E ON M.ManagerID = E.EmployeeID INNER JOIN Person.Contact AS C ON E.ContactID = C.ContactID WHERE (E.Gender = N'F') ORDER BY Name";
 
// Need help here to filter SQLDatasource2..
        }
         
    }


Any help is appreciated. I use Asp.net Ajax a lot, trying to implement Telerik Reporting along with Webforms in a new project. Thanks

gc_0620


Peter
Telerik team
 answered on 22 Jul 2013
1 answer
93 views
I am using Visual Studio 2012 .
I created a business Object , created a Telerik Report and have it successfully connected to the business object data source.
The method that gets the data returns a DataTable . I have a column for event Id and another one for duration and If I use a table I am able to see 40 rows with their specific event Id and event duration.

NOW when I use the graph wizard, select the clustered column, select the data source, I put the eventId in Categories and Duration in Values. When I try to preview the report I obtain 40 different empty graphs. Why is that? What am I doing wrong?
I want the information of all the rows to be in ONE graph.

Any help is appreciated!
Thanks!
Peter
Telerik team
 answered on 22 Jul 2013
1 answer
66 views
Hey,

i´v a Little Problem with the Printing Function in the ReportViewer. I want to print an generated Document automaticly, but when i´m opening the Form, i can´t Print the Document, becouse it is not generatet in the Moment. The Generation takes about ca. 1 - 2 Seconds.

Now my Question. How can i check automaticly if the Generation of the Document is finish?

Thangs a lot.
Dee
Stef
Telerik team
 answered on 22 Jul 2013
5 answers
399 views
Hi

I have installed a new font in c:\windows\fonts Folder
I restarted the pc

I can use the new font in Windows Office Word.

But i can't see the new font in telerik reporting designer, why ?

Thanks for any anyswer.
Peter
Telerik team
 answered on 22 Jul 2013
2 answers
397 views
Hello all,

by default, the boolean parameter shows a radio button.
Any chance I can setup a checkbox for my boolean parameter?
Will
Top achievements
Rank 1
 answered on 22 Jul 2013
2 answers
225 views
Hi Telerik,
I have an issue in regards to dynamic reports.
I am adding columns dynamically, but cell is being duplicated for all cells in content section, for each row.
This is my code:
private void table1_ItemDataBinding(object sender, EventArgs e)
        {

           // table is being populated from as WS

            processingTable.DataSource = table;


            //we do not clear the Rows collection, since we have a details row group and need to create columns only
            this.table1.ColumnGroups.Clear();
            this.table1.Body.Columns.Clear();
            this.table1.Body.Rows.Clear();
            int i = 0;
            this.table1.ColumnHeadersPrintOnEveryPage = true;

            // Properties are the object properties - they will represent the columns
            foreach (PropertyInfo property in properties)
            {
                Telerik.Reporting.HtmlTextBox textboxGroup = null;
                Telerik.Reporting.HtmlTextBox textBoxTable = null;

                Telerik.Reporting.TableGroup tableGroupColumn = new Telerik.Reporting.TableGroup();
                this.table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));

                textboxGroup = new Telerik.Reporting.HtmlTextBox();
                textboxGroup.Style.BorderColor.Default = Color.Black;
                textboxGroup.Style.BorderStyle.Default = BorderType.Solid;
                textboxGroup.Value = property.Name;
                textboxGroup.Size = new SizeU(Unit.Inch(1.1+i), Unit.Inch(0.3));
                tableGroupColumn.ReportItem = textboxGroup;
                


                textBoxTable = new Telerik.Reporting.HtmlTextBox();
                textBoxTable.Style.BorderColor.Default = Color.Black;
                textBoxTable.Style.BorderStyle.Default = BorderType.Solid;
                textBoxTable.Value = "=Fields." + property.Name;
                textBoxTable.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
                this.table1.Body.SetCellContent(0, i++, textBoxTable,1,1);
                this.table1.Items.AddRange(new ReportItemBase[] { textboxGroup, textBoxTable });
                
                this.table1.ColumnGroups.Add(tableGroupColumn);
                
            }

        }
I am attaching the screenshot for it. Basically all contain the same value for all columns, it´s taking the first value I set in
this.table1.Body.SetCellContent(0, i++, textBoxTable,1,1);
but all fields are different for each column.
I am attaching an image with some sample data for one row (fields.png).
Please help.

Thanks,
Unknown
Top achievements
Rank 1
 answered on 19 Jul 2013
1 answer
90 views
I do not have any page breaks on any of my sections or detail and it seems that when I convert to docx programmatically the docx has section breaks within it.  Why is this happening and how can it be prevented.  I have included the conversion code that I am using.

Telerik.Reporting.Processing.ReportProcessor TelContractrp = new Telerik.Reporting.Processing.ReportProcessor();
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
Telerik.Reporting.InstanceReportSource TelContractirs = new Telerik.Reporting.InstanceReportSource();
TelContractirs.ReportDocument = currRpt;
Telerik.Reporting.Processing.RenderingResult result = TelContractrp.RenderReport("DOCX", TelContractirs,deviceInfo);
 string dContract = DateTime.Now.ToString().Replace("/", "");
 dContract = dContract.Substring(0, 12);
 dContract = dContract.Replace(":", "");
 string fileName2 = result.DocumentName + "_" + dContract + "." + result.Extension;
 string filePath2 = System.IO.Path.Combine(saveLocation, fileName2);
 FileStream fs = new FileStream(filePath2, FileMode.Create);
 fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
 fs.Close();
 System.Diagnostics.Process p = new System.Diagnostics.Process();
 p.StartInfo.UseShellExecute = true;
 p.StartInfo.FileName = filePath2;
 p.Start();
Unknown
Top achievements
Rank 1
 answered on 19 Jul 2013
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?