Telerik Forums
Reporting Forum
1 answer
190 views
Telerik,

I got a small problem with the background image for textboxes see screenshot below.
http://screencast.com/t/fNRZWVqLIJih

I use the following properties:
http://screencast.com/t/pDsNSRml4N3o

Is it possible to align the image to the right side?

Steve
Telerik team
 answered on 10 Aug 2012
1 answer
173 views
Occasionally my report generates an exception which I wish to catch and handle in my web page.
I had a look at the post : http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-handle-errors-exceptions.aspx
which provides a nice piece of c# code.
I have translated this to VB to get this :
          
 AddHandler _rptBody.[Error], Sub(innerSender As Object, eventArgs As ErrorEventArgs)
      Me.ReportViewer.Report = Nothing
       Me.Label1.Text = eventArgs.Exception.Message.ToString()
End Sub


But sadly Visual Studio informs me that :

Error is not an event of object.

I have to say that c# is my language and not VB but sadly I have to do this in VB.

Am I doing something wrong here?
Paul
Top achievements
Rank 1
 answered on 10 Aug 2012
1 answer
86 views
Hi,

i would bind a report with datas. i have a DAL method returns a collection of A objects contains a B object list.
List of A object contains properties and a list of B object.

i would fill my report's textboxes  with A properties and a table with A list of B object.
the DAL method is called from a aspx page with a reportviewer and a reportbook.

my reportviewer is correctly displayed but with empty reports.

Filling the report with A object properties works. but filling the table of the report with A object's List<B> does'nt work.

i fill my cells with =Fields.property

in the aspx page, i bind my report with the object with : report.Datasource = A object;

How can i fill my table?
thanks
PICKUP
Top achievements
Rank 2
 answered on 10 Aug 2012
1 answer
224 views
I have a report that I am trying to create a cross tab for.

I can get it to creat the report fine but for some reasons the pages will repeat for the toalt number of records I have.
So when I print a report for 65 records it formats and creats the record and the first page is correct, but it creates 65 pagas all of them exaclty the same.  What am I missing?

my seltect is as follows
SELECT  m.FGID, GroupName, CategoryDescription, GroupDescription, TickerAbv, SecurityMasterDescription, SUM(MarketValue) AS Total, e.FamilyMemberName , percentage, (SUM(MarketValue) * percentage) AS eTotal

what I would like is to group on CategoryDescription and GroupDescription
then display SecutirityMasterDescription and Total

then pivot so the FamilyMemberName becomes the dynamic headers with the eTotal as the detail under the FamilyMemberName

The report formats to this design, but it displays it 65 times.
Also one other issue, there are time where there are no matching FamilyMembers so iti si getting a null value and printing an empty column, is their a way to suppres the blank column.
Kapil
Top achievements
Rank 1
 answered on 10 Aug 2012
5 answers
351 views
Hi,

I have never used the ReportViewer before. When I add the ReportViewer to my web application, it looks great and styled as it should in the design, but when I go to run my program, the images are all broken, and there is no styling of the bar. This is before I assign any report to the viewer.

Unfortunately, I have this project which is due in a very short time frame, and this is holding me up. I hope that someone may have a quick answer for me.

I am running Reporting Q3 2007 and Visual Studio 2008.

I tried my existing application that I am trying to get the ReportViewer to show up in and I created a brand new application with just the ReportViewer and I received the same result.

Any help anyone has would really be great. I may be forced to use Crystal Reports to finish my project otherwise. Thanks.

Andre
Travis Williams
Top achievements
Rank 2
 answered on 09 Aug 2012
2 answers
1.6K+ views
Hi,

We are experiencing the following error when adding these lines to the web.config:

    <Telerik.Reporting>
        <Extensions>
            <Render>
                <Extension name="XLS">
                    <Parameters>
                        <Parameter name="DefaultPageFooter" value="false"/>
                    </Parameters>
                </Extension>
                <Extension name="XLSX">
                    <Parameters>
                        <Parameter name="DefaultPageFooter" value="false"/>
                    </Parameters>
                </Extension>
            </Render>
        </Extensions>
    </Telerik.Reporting>

This only happens when it is outside of the development environment and it seems to be down the the XLSX segment (if I remove that then it works).

The error that we are getting is this:

Server Error in '/' Application.

A null or zero length string does not represent a valid Type.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: A null or zero length string does not represent a valid Type.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[TypeLoadException: A null or zero length string does not represent a valid Type.]
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +10161414
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +42
   System.Type.GetType(String typeName, Boolean throwOnError) +71
   Telerik.Reporting.Processing.ExtensionManagerBase.CreateExtensionInfo(String typeName, String extensionName) +55

[ExtensionManagerException: Error loading extension type with name .]
   Telerik.Reporting.Processing.ExtensionManagerBase.CreateExtensionInfo(String typeName, String extensionName) +214
   Telerik.Reporting.Processing.ExtensionManagerBase.Config(ExtensionInfoCollection extensions, ReportingConfigurationSection section) +539
   Telerik.Reporting.Processing.ExtensionManager.get_Instance() +98
   Telerik.Reporting.Processing.ExtensionManager.ListExtensions(Type extensionType) +13
   Telerik.Reporting.Processing.ReportProcessor.ListRenderingExtensions() +27
   Telerik.Reporting.Processing.ReportProcessor.GetExtensionInfoCore(String name) +29
   Telerik.Reporting.Processing.ReportProcessor.GetExtensionInfo(String format) +136
   Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +22
   Telerik.ReportViewer.WebForms.ReportRenderOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +43
   Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, Hashtable renderingContext) +192
   Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() +223
   Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) +195
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171


Version Information: Microsoft .NET Framework Version:2.0.50727.5420; ASP.NET Version:2.0.50727.5420


We are using 2011 Q3 or the reporting so we know it is not a case of missing the XamlRendering dll (as it is no longer required we believe).

Any help would be appreciated.

Many thanks


Carl Howarth
PSP IT Design & Development
Giuseppe
Top achievements
Rank 1
 answered on 09 Aug 2012
2 answers
187 views
Dear Telerik Support Team,

would it be possible for you to provide with a sample solution on how to generate a report containing a Chart (Lines) that is filled with a SqlDataSource with a multi valued parameter using  the datagroupcolumn value.

I have tried for hours to achieve this but cannot get it to work. The chart does not split the selected values into series or the datasource does not select multiple data.

To recreate the problem the steps would be as follows:

- Create a report with a multi value parameter that accepts instance ids e.g. person ids
- Create a SqlDataSource with the same parameter and pass the reports parameter value to it
- Create a chart and set the DataGroupColumn to the persons id to get a series for each person contained in the datasource
- Execute the preview and select two or more persons via the report parameter
- The chart will only display one series, independant of what is selected as a parameter whereas a crosstable set to the same datasource with column grouping set to the person id will display multiple rows.

I did not add any series explicitly. If I add some series explicitly the legend text will be the explicitly specified name. What I need would be the value of the DataGroupColumn as a Legend entry. The workaround you provide in your example with #NAME:#VALUE does not work as it references the Series name.

Is there a way to tell the Chart which DataSource Columns to use for X,Y, LEGEND if no Series have been defined explicitly?
I have found the PlotArea.XAxis.DataLabelsColumn but nothing for Y or Legend. Is it mandatory to specify series explicitly?

I'd appreciate a quick response,
thank you for your time.
Muhammad
Top achievements
Rank 1
 answered on 09 Aug 2012
1 answer
131 views
We have purchased Q2 2012 .i have a query in reporting

I need to dyamically bind the columns based on the dataset columns.i have used the sample you have provided, but no luck .
we are not getting any data in reporting panel.

i have created on .aspx page using web form development and used the below shown code.
On button click it has to display 5 rows from the table i have mentioned.
Note: i can see the Getdata() method returns 5 rows in debug mode.But this dataset is not able to bind in report viewer.

what is the wrong in my code.please guide us

ASPX page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="teleriksample.test" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=6.1.12.611, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
    Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"></head>
<body>
    <form id="form1" runat="server">
    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
    <telerik:ReportViewer ID="ReportViewer1" runat="server"></telerik:ReportViewer>
    </form>
</body></html>

Code behind part
 public DataTable GetData()
        {
            string conn1 = "Data Source=AES159\\SQLEXPRESS;Initial Catalog=TestDB;User Id=sa;Password=passwd@123;";
            SqlConnection sqlconn = new SqlConnection(conn1);


            string selectCommandText =      "SELECT top 5 * from login_master";

            sqlconn.Open();
            SqlDataAdapter dataAdapter = new SqlDataAdapter(selectCommandText, sqlconn);
            DataTable dataTable = new DataTable();

            dataAdapter.Fill(dataTable);
            sqlconn.Close();
            return dataTable;
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource();
            objectDataSource.DataSource = GetData(); // GetData returns a DataTable
            //objectDataSource.CalculatedFields.Add(new Telerik.Reporting.CalculatedField("FullName", typeof(string), "=Fields.Name + ' ' + Fields.ProductNumber")); // Adding a sample calculated field.

            // Creating a new report
            Telerik.Reporting.Report report1 = new Telerik.Reporting.Report();

            // Assigning the ObjectDataSource component to the DataSource property of the report.
            report1.DataSource = objectDataSource;
            
    
            //// Use the InstanceReportSource to pass the report to the viewer for displaying
            Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
            reportSource.ReportDocument = report1;

            //// Assigning the report to the report viewer.
            ReportViewer1.ReportSource = reportSource;

            // Calling the RefreshReport method in case this is a WinForms application.
            //ReportViewer1.RefreshReport();

            ReportViewer1.Visible = true;

        }

regards,
Sanjay

Steve
Telerik team
 answered on 09 Aug 2012
1 answer
178 views
Hi,
I  have a 13- digit number. and i want to create a barcode in report. how can i create this.
i wanted to create a barcode for books.
can anyone help me..


code 128 is working fine with 10 digits..but i need 13 digit or universal for books.
because i tried all sybology .but it did'nt work 

thanks
Elian
Telerik team
 answered on 08 Aug 2012
1 answer
111 views
Hi!

I'm currently working with a sub report, and trying to set the stylename of a textbox dynamically in code based on it's value.

switch (data.Value)
    {
        case "Value1":
            tbxScanState.StyleName = "Stylename1";
            break;
        case "Value2":
                tbxScanState.StyleName = "Stylename2";
                break;
    }

However, it seems that this changes the stylename for tbxScanState in all of the subreports, rather than just the subreport I'm currently working with. Do you know how I might achieve my goal?
Steve
Telerik team
 answered on 08 Aug 2012
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?