Telerik Forums
Reporting Forum
2 answers
297 views
Why can't I connect an object that implements IEnumerable as a DataSource on an ObjectDataSource? The following class is allowed:
public class MyClass
{
    private int test;
 
    public int Test
    {
      get { return test; }
      set { test = value; }
    }
 
    public IEnumerator GetEnumerator()
    {
        return null;
    }
}

but if I add ": IEnumerable" after "MyClass", the Data Explorer on the report only displays the message "No Data Source"

I'm using Telerik Reporting 2010 Q2 SP1 (4.1.10.921)

BTW: My real class returns an enumerator from GetEnumerator(), that is not the problem...

Sverre

    public class MyClass
{
        private int test;

        public int Test
        {
          get { return test; }
          set { test = value; }
        }

        public IEnumerator GetEnumerator()
        {
            return null; 
        }
   
Sverre
Top achievements
Rank 2
 answered on 10 Nov 2010
2 answers
172 views

I'm evaluating the component and everything seems to be working perfectly but there is one thing i want to do and i cant find a way.

I have a report that generates only 1 page (wich is correct) but i need to print 3 copies  and put in the report the number of each copy (1,2,3) or "original, duplicate, triplicate) ... 

How can we achieve this?

thanks,

Joaquim

Joaquim sa
Top achievements
Rank 1
 answered on 10 Nov 2010
6 answers
783 views
Hi,

I have a Windows application which uses the Telerik Reporting for displaying reports. 
  1. The Windows application has many comment fields (contains rich text - data copied from Word, Exel, PDF).
  2. The comments data could contain Chinese, European, Indian etc alphabets.
  3. Styles like Font change, Bold, italics, highlights can be applied to the comment fields

4.   The data is stored in the Access Database

Issues are as follows:

When these comment fields are to be displayed in the Reports--> HTMLTextBox, (since richtext htmlTextbox is used) error occurs as the HtmlTextBox is unable to identify the html tags (mostly generated by Word, Excel and Pdf).

Steps Followed

  1. Place the HTMLTextbox controls in the detail section of the Reports
  2. HTMLTextBox --> Properties   --> Value --> Bind the Comment field from the database to the control
  3. Properties -- > Change the Font to Arial Unicode MS to accept other language characters
  4. Build report.
  5. This report is called from the Windows Application.

Please find attached a sample HTML generated from the Word and the error occured.

Please note..
When these Html generated tags is directly copied into the Design View of  Editor properties of the [HTMLTextBox--> Value ]
and switch back to HTML mode, they are displayed fine when you Preview from the Report project (like harcoding) . I have noticed that the Design view of the Editor Properties validates the HTML to proper Html tags. But the HTMLTextBox as such fails to do the same.

The reports needed for the application is dynamic data.

Please need a solution to this..

Thanks
Shalini

Sample HTML

<SPAN FONT-SIZE: 16px""><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size: 10.0pt; mso-bidi-font-family: Arial;

mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><STRONG><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS';

mso-bidi-font-size: 10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信有限公司</SPAN><SPAN COLOR: black;

FONT-FAMILY: Arial; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(CHEERSIN LIMITED)<?xml:namespace prefix = o ns =

""urn:schemas-microsoft-com:office:office"" /><o:p></o:p></SPAN></STRONG></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size:

10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信工程有限公司</SPAN><SPAN COLOR: black; FONT-FAMILY: Arial;

mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(WISE FAITH ENGINEERING LIMITED)<o:p></o:p></SPAN></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size:

10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信企業有限公司</SPAN><SPAN COLOR: black; FONT-FAMILY: Arial;

mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(CHEER VISION ENTERPRISES LIMITED)<o:p></o:p></SPAN></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><EM><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS';

mso-bidi-font-size: 10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信行有限公司</SPAN><SPAN COLOR: black;

FONT-FAMILY: Arial; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(FAITH KIND COMPANY LIMITED)<o:p></o:p></SPAN></EM></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><SPAN COLOR: #ff8040; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size: 10.0pt;

mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial""><SPAN lang=DE FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size: 10.0pt;

mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信技研有限公司</SPAN><SPAN FONT-FAMILY: Arial; mso-bidi-font-family:

Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(NETECIS ENGINEERING LIMITED)</SPAN></SPAN></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size:

10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信技術有限公司</SPAN><SPAN COLOR: black; FONT-FAMILY: Arial;

mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(SMARTCOMM TECHNOLOGIES CO., LIMITED)<o:p></o:p></SPAN></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size:

10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信科技有限公司</SPAN><SPAN COLOR: black; FONT-FAMILY: Arial;

mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(WISE HONOUR TECHNOLOGIES LIMITED)<o:p></o:p></SPAN></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""><SPAN lang=DE COLOR: black; FONT-FAMILY: 'Arial Unicode MS'; mso-bidi-font-size:

10.0pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial"">智信科技香港有限公司</SPAN><SPAN COLOR: black; FONT-FAMILY:

Arial; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Arial Unicode MS'"">(WISE MICROTEK CO., LIMITED)<o:p></o:p></SPAN></P>
<P MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify""></SPAN></SPAN></P>

Jason Horspool
Top achievements
Rank 1
 answered on 10 Nov 2010
0 answers
141 views
I hope I haven't missed a post, but somehow I can't get the reportbook (Q2-2010) working. I've got the following code:

srMTO.MTOwsSoapClient soaplink = new srMTO.MTOwsSoapClient();
dsCompleteQuestionnaire1 = soaplink.GetCompleteQuestionnaire( QuestionnaireId );
Telerik.Reporting.Report QuestionnaireReport =
new reports.rap_CompleteQuestionnaire();
QuestionnaireReport.DataSource = dsCompleteQuestionnaire1;
QuestionnaireReport.DataMember =
"CompleteQuestionnaire";
ReportBook QuestionnaireBook =
new ReportBook();
//QuestionnaireBook.Reports.Add( new Rapporten.rap_CompleteQuestionnaire_Front() )
QuestionnaireBook.Reports.Add( QuestionnaireReport );
reportForm.SelectedReportBook = QuestionnaireBook;
(last two lines are in reality not commented)

and the other form (reportForm with the ReportViewer):

Telerik.Reporting.ReportBook report = SelectedReportBook;
this.reportViewer1.Report = report;
this.reportViewer1.RefreshReport();

I had it working for the QuestionnaireReport (the same way), but realized I needed a front page. So I needed the ReportBook. But the content is just not showing. Neither with just the QuestionnaireReport.

Any ideas what I'm doing wrong?

PS. I know that the DataMember of the report is obsolete, but attaching it to the objectdatasource this way is not working (for me).
Peter
Top achievements
Rank 1
 asked on 10 Nov 2010
1 answer
344 views
Hello,

I am fairly new to using Telerik Reports and was wondering if it is at all possible to use LINQ as a DataSource for these reports. My end goal is to call an IQueryable Function, while passing in a Username and Time Period to generate the Report for that User.

public static IQueryable GetUserReport(int UserID, string Period)
        {
            DataContext Data = new DataContext();
            var Reports = (from c in Data.UserInfo
                         where c.UserID == UserID && c.Period == Period
                         orderby c.UserID ascending
                         select c);
 
            return Reports;
        }

I have tried using SQL DataSources in my Reports, but would prefer to use LINQ if at all possible. Do Telerik Reports support the use of LINQ, or am I spinning my wheels on this one?

EDIT: Note, I am currently using what I believe is the newest version:
Telerik Reports: 2010.3 1110
RadControls for ASP.NET + AJAX:  2010.3 1109

Best Regards,

Landon
Tomas
Top achievements
Rank 1
 answered on 10 Nov 2010
6 answers
443 views
Hi,

we're still evaluating Telerik Reporting, especially the Silverlight components.

One problem we've found so far is, that it seems the image export does not obviously support transparent background colors.
Currently we tried the TIFF-Export using the Silverlight Report Viewer and the API of the rendering engine itself, both without luck.

What did we miss to get transparent background images (preferrably in PNG format) using the server side API ? Examples would be very appreciated ;)

Thank you so far and kind regards

Sebastian
Sebastian
Top achievements
Rank 1
 answered on 10 Nov 2010
1 answer
266 views
The barcode throws an error if the data returned starts with a letter it works if the data starts with a number.  I am using Codabar symbology.  I have included a screenshot.
gureumi
Top achievements
Rank 1
 answered on 09 Nov 2010
0 answers
85 views
I'd like to find a simpler(and better) way of initializing an element.

Let me take an example of TextBox.
Because of Type conversion and etc. It is quite messy.

The following code is what I have as a solution. I used extension method.

Is Telerik going to provide something similar to this?


     double leftPoint = 0;
       double Y_FirstLine = 0.02;
     double width = 1.25;
     double height  = 0.25;
 
     Telerik.Reporting.TextBox textBox;
 
      // Add ItemInfoId Box
      textBox = new Telerik.Reporting.TextBox();        
      textBox.SetTextBoxAttribute("ItemId", leftPoint, Y_FirstLine, width, height);
      groupHeaderSection1.Items.Add(textBox);
 
      // Add Cost  Box
      leftPoint +=  0.6;
      textBox = new Telerik.Reporting.TextBox();
      textBox.SetTextBoxAttribute("COST", leftPoint, Y_FirstLine, width, height);
      groupHeaderSection1.Items.Add(textBox);

                  // a lot more of TextBoxes ... 
 
 
public static class TextBoxExtension
{
   public static void SetTextBoxAttribute(
         this Telerik.Reporting.TextBox  itemBox,
         string value, double left, double top, double width, double height)
   {
      itemBox.Value = value;
      itemBox.Location = new Telerik.Reporting.Drawing.PointU(
        new Telerik.Reporting.Drawing.Unit(left, Telerik.Reporting.Drawing.UnitType.Inch),
        new Telerik.Reporting.Drawing.Unit(top, Telerik.Reporting.Drawing.UnitType.Inch));
      itemBox.Size = new Telerik.Reporting.Drawing.SizeU(
        new Telerik.Reporting.Drawing.Unit(width, Telerik.Reporting.Drawing.UnitType.Inch),
        new Telerik.Reporting.Drawing.Unit(
             height, Telerik.Reporting.Drawing.UnitType.Inch));
   }
}
gureumi
Top achievements
Rank 1
 asked on 09 Nov 2010
0 answers
107 views
Hi,
   I am new to Telerik reporting. I have one report which has a text box control. I need to display this report for two text box values. I can hardcode these values but I don't know how to display a single report as two reports based on the value.

Textbox1.value = "ACTIVE COPY";
textbox1.value = "File Copy";

I want to display same report for these two values.

I appreciate your help.

Thanks
Raj
Raj
Top achievements
Rank 1
 asked on 09 Nov 2010
1 answer
163 views
I am getting an error
"The name already exists in the tree: _10_035".
on one of my reports in the Silverlight Viewer only.
The report has Document Map and Bookmarks set.
This error does not come up with other reports or in the Designer Preview
Any tips as why this error would only come up in the silverlight viewer?
Steve
Telerik team
 answered on 09 Nov 2010
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?