Telerik Forums
Reporting Forum
3 answers
84 views
Can you use a user-function with a ParamArray as the argument? I tried but when i preview my report, it gives me the big dreaded error box and says The expression contains undefined function call CsvList().

Here is my function def:

Public Function CsvList(ParamArray items As String()) As String
    Return Join((From s In items Where Not String.IsNullOrEmpty(Trim(s)) Select s).ToArray, ", ")
End Function

and here is my call to the function:

= my_reports.General.CsvList(
  Fields.Firm,
  Fields.Name1,
  Fields.Name2,
  Fields.Address,
  Fields.AptType + " " + Fields.AptNum,
  Fields.City,
  Fields.State,
  Fields.Zip,
  "PH: " + Fields.Phone,
  "FX: " + Fields.Fax,
  "RSN: " + Fields.Reason
)
Peter
Telerik team
 answered on 10 May 2011
1 answer
268 views
Hi,
I'm trying to use the evaluation version of telerik Reporting and I've this kind of problem.
I need to show into the report some data (busines objects) from a ViewModel of mine.

I mean:
I have a view with a reportViewer :

 

 

 

    <telerik:ReportViewer x:Name="ReportViewer1" Report="{Binding DataContext.Report, ElementName=this}" />

 

In its code behind I set the datacontext to the ViewModel:

 

 

    this.DataContext = new myViewModel();

 


Now the problem is:
in myViewModel I have the property "Report" as Telerik.Reporting.Report
and also another property "MyProp" (string) that I need to show into the Report

Is it possible to do that and what is the way?
I mean: how have I to set the textBox in the report ?

thanks in advance
Michele Semprini

Chavdar
Telerik team
 answered on 09 May 2011
3 answers
219 views
Hi

We're using the silverlight report viewer control on a client application, everything was working fine till yesterday, now we're getting this error while trying to preview a report:

The type initializer for 'System.Windows.FrameworkElement' threw an exception.
The type initializer for 'System.Windows.Media.Transform' threw an exception.
Not enough storage is available to process this command

Please, this is urgent... what its causing it? how can we prevent it?

thanks in advance

Roygar
Peter
Telerik team
 answered on 09 May 2011
4 answers
396 views
I am facing problems regarding binding the columns of table in report, i have used the mysql db and the data is taken in a dataset
which contains all the data and data can be seen during debugging in a dataset but how can i display that data into a table which is inside
a report, i have taken parameters of report which are being shown when i run the application any urgent help will be grateful
Peeyush
Top achievements
Rank 1
 answered on 06 May 2011
3 answers
143 views
Hi Guy,

I have a problem with the next chart inside my report.

I have the following data

Name Year Amount
Company A 2009 5
Company A 2009 5
Company B 2009 5
Company B 2009 5


I want two bars, one for Company A at X-axis value 2009 and Y value: 10, second is Company B with X-axis value 2009 and Y value 10.

The current situation is that I get two bars, for company A, one company B with both value: 5

How can I add up these values?

            this.chart1.DataGroupColumn = "Name";
            this.chart1.DataSource = this.sqlDataSource1;
            this.chart1.PlotArea.XAxis.AutoScale = false;
            this.chart1.PlotArea.XAxis.DataLabelsColumn = "Year";

Thank you,
Robert
Peter
Telerik team
 answered on 06 May 2011
1 answer
132 views
Hi,

I create a report programatically like this:

Dim report As New myrpt
Dim adapter As New System.Data.SqlClient.SqlDataAdapter(sql, GetConnectionString())
report.DataSource = adapter
Me.ReportViewer1.Report = report
Me.ReportViewer1.RefreshReport()

Then if i set the value of a text box (in the designer) to [=Fields.Data], it will display [=Fields.Data] when I display the report instead of displaying the data from the database.  The connection is correct.  What do i need to do differently?

I figured out why the details were splitting.

Thanks
Mathias
Top achievements
Rank 1
 answered on 05 May 2011
1 answer
112 views
I’m confused about how the reporting works for Silverlight.    Is the viewer the only thing available on the Silverlight side?    I have data in my Silverlight application that resides on the client side, but the Telerik report seems to be created on the server side (ASP.Net).    Does that mean I need to push my client data (in the form of a List, Dictionary, or

SortableCollectionView)

 

 

to the server side (probably using a WCF service) to view it in Silverlight.   In other words can the Silverlight viewer look at a Silverlight report or must it always be a report created in straight ASP.Net. 

Peter
Telerik team
 answered on 05 May 2011
1 answer
289 views

I'm trying to use Exec:
=Sum(Fields.Total)/Exec('rptName', Sum(Fields.Total))

to calculate %.

But I'm getting 0.

Order and Sample are the result of the grouping

If I use only  = Exec('rptName', Sum(Fields.Total)) I'm getting 64.

Can someone help me, please...

Peter
Telerik team
 answered on 05 May 2011
1 answer
200 views
Hi

I read the post at http://www.telerik.com/help/reporting/understanding-events.html to know how to retrieve the value of the data from datasource before rendering all of the parts of the report

However, no matter what i tried to set the width of my TextBoxSeg ... the FIRST row data won't be reformatted correctly
Basically i want to display something similar to this XX-XX-XXXX-XXX-XXX  . But i don't know EXACTLY how many characters for each segment. And that information only available when the data has been bounded to the textbox.
So I use the ItemDataBound event. Inside that event , I will find the length of the Data of the TextBox and set the width of the textBox corresponding to the Length.
Then i just need to move the Location of other segments correspondingly
That's the whole idea 

I also attach the image of my report result to let you see the problem of rendering
this is the code
private Unit oneUnit = new Unit(100/8);
        private Unit originalTextSeg1Width;
        private Unit originalTextSeg2Width;
        private Unit originalTextSeg3Width;
        private Unit originalTextSeg4Width;
        private Unit originalTextSeg5Width;
        private Unit originalTextDash1X;
        private Unit originalTextDash2X;
        private Unit originalTextDash3X;
        private Unit originalTextDash4X;
        
        private Unit originalTextSeg2X;
        private Unit originalTextSeg3X;
        private Unit originalTextSeg4X;
        private Unit originalTextSeg5X;
        public GLIncomeStatementDT()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            //Original Width
            originalTextSeg1Width = textSeg1.Width;
            originalTextSeg2Width = textSeg2.Width;
            originalTextSeg3Width = textSeg3.Width;
            originalTextSeg4Width = textSeg4.Width;
            originalTextSeg5Width = textSeg5.Width;
            //Original X location
            originalTextDash1X = textDash1.Location.X;
            originalTextDash2X = textDash2.Location.X;
            originalTextDash3X = textDash3.Location.X;
            originalTextDash4X = textDash4.Location.X;
             
            originalTextSeg2X = textSeg2.Location.X;
            originalTextSeg3X = textSeg3.Location.X;
            originalTextSeg4X = textSeg4.Location.X;
            originalTextSeg5X = textSeg5.Location.X;
            //
            textSeg1.ItemDataBound += new EventHandler(textSeg1_ItemDataBound);
            textSeg2.ItemDataBound += new EventHandler(textSeg2_ItemDataBound);
            textSeg3.ItemDataBound += new EventHandler(textSeg3_ItemDataBound);
            textSeg4.ItemDataBound += new EventHandler(textSeg4_ItemDataBound);
            textSeg5.ItemDataBound += new EventHandler(textSeg5_ItemDataBound);
            this.DataSource = null;
            this.NeedDataSource += new EventHandler(FilteredReport_NeedDataSource);
             
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
 
        #region Setup Seg's Width dynamically
        
        void textSeg5_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.TextBox textSeg5Position = (Telerik.Reporting.Processing.TextBox)sender;
            textSeg5.Style.BackgroundColor = Color.Purple;
            textSeg5.Width = originalTextSeg5Width * (textSeg5Position.Text.Length);
        }
 
        void textSeg4_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.TextBox textSeg4Position = (Telerik.Reporting.Processing.TextBox)sender;
            textSeg4.Style.BackgroundColor = Color.Yellow;
            textSeg4.Width = originalTextSeg4Width * (textSeg4Position.Text.Length);
 
 
 
 
 
            textDash4.Location = new PointU() { X = originalTextDash4X + textSeg4.Width - oneUnit, Y = textDash4.Location.Y };
            textSeg5.Location = new PointU() { X = originalTextSeg5X + textSeg4.Width - oneUnit, Y = textSeg5.Location.Y };
        }
 
        void textSeg3_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.TextBox textSeg3Position = (Telerik.Reporting.Processing.TextBox)sender;
            textSeg3.Style.BackgroundColor = Color.Green;
            textSeg3.Width = originalTextSeg3Width * (textSeg3Position.Text.Length);
 
 
 
 
            textDash3.Location = new PointU() { X = originalTextDash3X + textSeg3.Width - oneUnit, Y = textDash3.Location.Y };
            textSeg4.Location = new PointU() { X = originalTextSeg4X + textSeg3.Width - oneUnit, Y = textSeg4.Location.Y };
            textDash4.Location = new PointU() { X = originalTextDash4X + textSeg3.Width - oneUnit, Y = textDash4.Location.Y };
            textSeg5.Location = new PointU() { X = originalTextSeg5X + textSeg3.Width - oneUnit, Y = textSeg5.Location.Y };
        }
 
        void textSeg2_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.TextBox textSeg2Position = (Telerik.Reporting.Processing.TextBox)sender;
            textSeg2.Style.BackgroundColor = Color.Blue;
            textSeg2.Width = originalTextSeg2Width * (textSeg2Position.Text.Length);
 
 
            textDash2.Location = new PointU() { X = originalTextDash2X + textSeg2.Width - oneUnit, Y = textDash2.Location.Y };
            textSeg3.Location = new PointU() { X = originalTextSeg3X + textSeg2.Width - oneUnit, Y = textSeg3.Location.Y };
            textDash3.Location = new PointU() { X = originalTextDash3X + textSeg2.Width - oneUnit, Y = textDash3.Location.Y };
            textSeg4.Location = new PointU() { X = originalTextSeg4X + textSeg2.Width - oneUnit, Y = textSeg4.Location.Y };
            textDash4.Location = new PointU() { X = originalTextDash4X + textSeg2.Width - oneUnit, Y = textDash4.Location.Y };
            textSeg5.Location = new PointU() { X = originalTextSeg5X + textSeg2.Width - oneUnit, Y = textSeg5.Location.Y };
        }
        void textSeg1_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.TextBox textSeg1Position = (Telerik.Reporting.Processing.TextBox)sender;
            textSeg1.Style.BackgroundColor = Color.Red;
            textSeg1.Width = originalTextSeg1Width * (textSeg1Position.Text.Length);
 
 
            textDash1.Location = new PointU() { X = originalTextDash1X + textSeg1.Width - oneUnit, Y = textDash1.Location.Y };
            textSeg2.Location = new PointU() { X = originalTextSeg2X + textSeg1.Width - oneUnit, Y = textSeg2.Location.Y };
            textDash2.Location = new PointU() { X = originalTextDash2X + textSeg1.Width - oneUnit, Y = textDash2.Location.Y };
            textSeg3.Location = new PointU() { X = originalTextSeg3X + textSeg1.Width - oneUnit, Y = textSeg3.Location.Y };
            textDash3.Location = new PointU() { X = originalTextDash3X + textSeg1.Width - oneUnit, Y = textDash3.Location.Y };
            textSeg4.Location = new PointU() { X = originalTextSeg4X + textSeg1.Width - oneUnit, Y = textSeg4.Location.Y };
            textDash4.Location = new PointU() { X = originalTextDash4X + textSeg1.Width - oneUnit, Y = textDash4.Location.Y };
            textSeg5.Location = new PointU() { X = originalTextSeg5X + textSeg1.Width - oneUnit, Y = textSeg5.Location.Y };
        }
Peter
Telerik team
 answered on 04 May 2011
4 answers
170 views
Hi
I'm new to telerel reporting.  I know telerik reports are created as .cs file and compiled with my web applications.  I would like to know if it is possible for me to create a report in some format so that I can distribute this report to users later and they can use their current web application to run the report without re-compiling the whole thing.  Can this be done with telerik reporting?
Thanks
Edwin
Zensell
Top achievements
Rank 1
 answered on 04 May 2011
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?