Telerik Forums
Reporting Forum
5 answers
229 views
Hello,

I have a problem when I try to show some data on a Line Chart.

I have attached one image with both Data and Line Chart.

As you can see, the green line is not correct because its three values are located on the first three points (Mar'11, May'11 and Jul'11), and must be located on second, third, an sixth respectively (May'11 Jul'11 and Ene'12) as it is shown on Data Table.

The SQL source for this Chart is this:

ES00000120S9     
09/03/2011 0:00:00     
Mar'11     
36,9388000000        
20/02/2012
ES00000120S9 09/05/2011 0:00:00 May'11 38,3738000000 20/02/2012
ES00000120S9 11/07/2011 0:00:00 Jul'11 41,0802000000 20/02/2012
ES00000120S9 09/09/2011 0:00:00 Sep'11 47,0580000000 20/02/2012
ES00000120S9 09/11/2011 0:00:00 Nov'11 51,5185000000 21/02/2012
ES00000120S9 09/01/2012 0:00:00 Ene'12 52,7473000000 21/02/2012
ES00000121J6 09/03/2011 0:00:00 Mar'11 94,4507000000 20/02/2012
ES00000121J6 09/05/2011 0:00:00 May'11 94,7643000000 20/02/2012
ES00000121J6 11/07/2011 0:00:00 Jul'11 95,7689000000 20/02/2012
ES00000121J6 09/09/2011 0:00:00 Sep'11 97,2266000000 20/02/2012
ES00000121J6 09/11/2011 0:00:00 Nov'11 97,1023000000 21/02/2012
ES00000121J6 09/01/2012 0:00:00 Ene'12 97,4383000000 21/02/2012
ES00000121T5 09/05/2011 0:00:00 May'11 100,0459000000 20/02/2012
ES00000121T5 11/07/2011 0:00:00 Jul'11 100,4433000000 20/02/2012
ES00000121T5 09/01/2012 0:00:00 Ene'12 383,3258000000 21/02/2012

The last three values are located on Mar'11, May'11 and Jul'11 on chart.

I don't know how to fix it.

Is there any solution?

Thank you very much.

Elian
Telerik team
 answered on 27 Feb 2012
3 answers
291 views
I have a ReportService.svc that is called from clients that are either passing credentials using Windows or Basic auth depending on their browser.  How can I support both Windows and Basic auth calls to the ReportService.svc from Telerik Reporting for Silverlight?

<basicHttpBinding>
    <binding name="basicBinding">
        <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
        </security>
    </binding>
</basicHttpBinding>

IvanY
Telerik team
 answered on 27 Feb 2012
8 answers
2.2K+ views
Hi,
I have report which has conditional formatting based on clientId. if the clientid is some x, I need to hide some controls. But when I hide these controls, right side controls are moving to left and bottom controls moving to top. How can I fix control's position with out considering other controls visibility. Please help on this.
Steve
Telerik team
 answered on 27 Feb 2012
1 answer
176 views
I get an error(in the designer preview) that reads "An error has occured while processing Report 'MyReport': Unable to cast the type 'System.Nullable '1' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types."

I know that this has to do with the datasource I'm choosing to use. I'm 'extending' the model's Entity partial class with a method that should return an enumerable collection of classes that contain my data that I pulled from the model with LINQ. Sort of like the code that is given here: http://www.telerik.com/ClientsFiles/311739_EntityFrameworkDemo.zip

Here's the method I'm using to get data:
public partial class MyDataModelEntities
    {
        public IEnumerable<SessioinReportData> QuerySessionReport()
        {
            var query = from user in this.users
                        from session in this.sessions
                        where user.id.Equals(session.assigned_user_id)
                        select new SessioinReportData
                        {
                            CreatedBy = user.user_name ?? "",
                            SessionType = session.session_type ?? "Unknown",
                            DateEntered = (session.date_entered != null ? session.date_entered.Value.ToString("MM/dd/yyyy") : "n/a"),
                            NumericID = session.numeric_id,
                            Status = session.status
                        };
            return query;
        }
         
    }
 
    /// <summary>
    /// This contains data needed for the report
    /// </summary>
    public class SessioinReportData
    {
        public string CreatedBy { get; set; }
        public string SessionType { get; set; }
        public string DateEntered { get; set; }
        public int NumericID { get; set; }
        public string Status { get; set; }
         
    }

Here's the code for one of the entity objects that I'm using:
namespace MyProject.Web.Model
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;
 
    // The MetadataTypeAttribute identifies sessionMetadata as the class
    // that carries additional metadata for the session class.
    [MetadataTypeAttribute(typeof(session.sessionMetadata))]
    public partial class session
    {
        internal sealed class sessionMetadata
        {
 
            // Metadata classes are not meant to be instantiated.
            private sessionMetadata()
            {
            }
 
            public Nullable<Guid> assigned_user_id { get; set; }
 
            public Nullable<bool> confirm_flag { get; set; }
 
            public Nullable<Guid> created_by { get; set; }
 
            public Nullable<DateTime> date_end { get; set; }
 
            public Nullable<DateTime> date_entered { get; set; }
 
            public Nullable<DateTime> date_modified { get; set; }
 
            public Nullable<DateTime> date_start { get; set; }
 
            public Guid id { get; set; }
 
            public Nullable<Guid> modified_user_id { get; set; }
 
            public string notes { get; set; }
 
            public Nullable<Guid> parent_id { get; set; }
 
            public string session_type { get; set; }
 
            public string status { get; set; }
        }
    }
}

I've tried adjusting for the Nullable types in a dew different ways. Nothing seems to work. If you don't know of any suggestions on how to fix this, at least tell me what you think the problem lies with.
Hrisi
Telerik team
 answered on 27 Feb 2012
3 answers
427 views
i am trying to do a conditional statement in a report that results in a

chr(0252) or a

chr(0251) as the result.  a "x" or a checkmark in wingding font.  using telerik latest reporting and VS 2010.  this works in ssrs vs 2008 but not in telerik.  it does not recognizt the CHR()

An error has occurred while processing TextBox 'textBox87':

The expression contains undefined function call chr().

 
how do yuo do this in telerik reporting?  need this asap

 

 

 

 

Elian
Telerik team
 answered on 27 Feb 2012
1 answer
161 views
I am attempting to export a database of over 1,000 individuals to an excel file. Attached is a screenshot of the results I get when I try to do this. It only displays 10 results at a time for some reason, rather than the entire set of data. Clearly it is not acceptable to repeat this process 300 times (or more as the community continues to expand) to export the entire user database. I was wondering if there was some way to get the program to export the entire list into one excel spreadsheet. Any thoughts/suggestions?
Hadib Ahmabi
Top achievements
Rank 1
 answered on 27 Feb 2012
2 answers
215 views
Hello,

I use a PictureBox to display a dynamic loaded Imagelist (Hardcopyscans) of a Document Manegement System.
Now i need to scale the report automaticaly so it fits the width of the 1st picture in the List.

But i allways got two pages instead of one, because the reportsize seems to be to small for the image.
Or, if i scale up the report size, the image wil be shown to small or does some uggly, scaling - that results in unreadable text.

Also, if i receive a "landscape formated image" the size of the report shuld manage this situation, not cuting off the document in two separate pages.

Right now i use something like this in the NeedDataSource Handler:
if (dicFormat["PageSettigs"] == "Landscape") 
    this.Report.PageSettings.Landscape = true;
else 
    this.Report.PageSettings.Landscape = false;

SizeU u1 =
new SizeU(new Unit(lstImage[0].Width, UnitType.Pixel),
new Unit(lstImage[0].Height, UnitType.Pixel));
this.Report.PageSettings.PaperSize = u1;

The content of the image shuld be printed best in 1:1 size.
Whats the best way to manage this?
Roger
Top achievements
Rank 1
 answered on 27 Feb 2012
0 answers
118 views
Hi,

I'm using the following code in order to group two columns by values.
I have a question regarding this issue: How can merge the grouped cells (Please view the attached image)?

c# code:
static string oldValueStatic = string.Empty;
        static string oldValueStatic2 = string.Empty;
 
        private void Nightly_ItemDataBinding(object sender, EventArgs e)
        {
            oldValueStatic = string.Empty;
            oldValueStatic2 = string.Empty;
        }
 
        public static string CutDuplicates(string data)
        {
 
            if (0 == string.Compare(oldValueStatic, data, true))
            {
                data = string.Empty;
            }
            else
            {
                oldValueStatic = data;
            }
            return data;
        }
 
        public static string CutDuplicates2(string data)
        {
 
            if (0 == string.Compare(oldValueStatic, data, true))
            {
                data = string.Empty;
            }
            else
            {
                oldValueStatic = data;
            }
            return data;
        }

I'm calling the functions as below:
= CutDuplicates(Fields.Env)

It is very appreciated to explain by supplying a step-by-step instructions how to solve the above issue.

Regards,
Bader
Bader
Top achievements
Rank 1
 asked on 26 Feb 2012
2 answers
539 views
I am getting above error when trying to assign below string to HtmlTextBox.

"question 1 (tips: <P><SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA" lang=EN-AU><SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA" lang=EN-AU>After this is</SPAN></SPAN></P>)"

Telerik.Reporting.HtmlTextBox txtBox = new Telerik.Reporting.HtmlTextBox();
txtBox.Value = value;
In the above code value is equal to above string. How can I solve this error?

Also I want to know how to use StripHTMLTags function. Or if there is any other way to remove HTML tags.

HtmlTextBox1.Value = StripHTMLTags(IncomingHTMLText);

Above doesn't work. It gives an error saying that StripHTMLTags  is not found.

Help would be appreciated....
Milen | Product Manager @DX
Telerik team
 answered on 24 Feb 2012
2 answers
131 views
Nevermind.
AccMan
Top achievements
Rank 1
 answered on 24 Feb 2012
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?