Telerik Forums
Reporting Forum
3 answers
496 views
We have created a very dynamically generated report (meaning that it adds subreports and columns depending on the data that is bound to it). When I run the report as a PDF, it works just fine. However, when I export the report as an MHTML or XLS, I get the "Parameter is not valid" exception when it attempts to render the report.

Dim mimType As String = String.Empty 
                Dim extension As String = String.Empty 
                Dim encoding As System.Text.Encoding = Nothing 
                Dim buffer As Byte() = Telerik.Reporting.Processing.ReportProcessor.Render("MHTML", tReport, Nothing, mimType, extension, encoding) 
                Dim fs As New FileStream("C:\Report" ID & ".MHTML", FileMode.Create) 
                fs.Write(buffer, 0, buffer.Length) 
                fs.Flush() 
                fs.Close() 

Like I said, it renders everything perfectly find as a PDF, but when it attempts to render it as an MHTML file or XLS, it blows up.

We are using the NeedDataSource event handler of the SubReports inside of the Main report as described by Telerik as the right thing to do, and it does work flawlessly for PDF. From there we are adding columns and sizing things in the subreport for each section that needs to be added to the report.
Rossen Hristov
Telerik team
 answered on 15 Aug 2008
1 answer
68 views
Hello all -

I have a quick question about series.  Given the following result set:

 
Content Knowledge           Other Supervisor    3.846153 
Content Knowledge           Peer                4.423076 
Content Knowledge           Primary Supervisor  4.571428 
Content Knowledge           Self                4.000000 
Cross Cultural Intelligence Other Supervisor    3.933333 
Cross Cultural Intelligence Peer                4.941176 
Cross Cultural Intelligence Primary Supervisor  5.000000 
Cross Cultural Intelligence Self                4.333333 
Emotional Intelligence      Other Supervisor    4.375000 
Emotional Intelligence      Peer                4.363636 
Emotional Intelligence      Primary Supervisor  5.000000 
Emotional Intelligence      Self                3.888888 
Leadership Attributes       Other Supervisor    4.045454 
Leadership Attributes       Peer                4.157894 
Leadership Attributes       Primary Supervisor  4.916666 
Leadership Attributes       Self                4.083333 
Social Intelligence         Other Supervisor    4.050000 
Social Intelligence         Peer                4.625000 
Social Intelligence         Primary Supervisor  4.181818 
Social Intelligence         Self                4.200000 

Is it possible to auto generate the series rather than having to create them manually?  In this example there should be 4 series (Self, Peer, Other Supervisor, Primary Supervisor).  The x-axis grouping should be Content Knowledge, Emotional Intelligence, etc.  The y data value should be average score.

It seems if I don't manually create the series but only set the following properties on the chart object, it will create the series for me automatically but it is always of type bar chart and I need a line chart.

 
chart1.DataGroupColumn = "RaterType"
chart1.Legend.Appearance.GroupNameFormat = "#VALUE"
chart1.PlotArea.XAxis.DataLabelsColumn = "QuestionSetName"

Having to create the series manually seems like a lot of work.  Any insight to this matter will be greatly appreciated.

Thanks!



Chavdar
Telerik team
 answered on 14 Aug 2008
3 answers
101 views
Hi team

i need to ask about feature that is exit in the crystal reports

in crystal reports if the last  record fields doesn't completed in the page
the record transferred to the next page so all the record field will be in one page

is there is any property in the telerik reporting that can do that
Milen | Product Manager @DX
Telerik team
 answered on 14 Aug 2008
1 answer
198 views
Hello all -

I'm currently evaluating Telerik Reporting and am attempting to create a simple chart.  I have a TableAdapter on the reporting surface as well as a Chart control.  When I bring up the ChartUI I am unable to databind it to the TableAdapter (I'm assuming this is possible?).  The following message is displayed: To dynamically populate the chart with data use the NeedDataSource event.

Is it not possible to define the databindings at design time rather than from within code-behind?  I'm sure I'm just doing something silly but if someone could shed some light on my problem that would be great!

Thanks!
Chavdar
Telerik team
 answered on 14 Aug 2008
1 answer
207 views
Hi

I earlier wrote a post on how to do what was almost a cross join and how to print this using Telerik Reporting, this was currently not very easy.

I figured that the best way simply was to load the data into a Object List and the bind the report to the list.
This all works very well however what iam wondering now is whether it is possible to call a function of the object from the report.

        public string getDayShift(int mDay)  
        {  
            foreach(shift mShift in myShifts) {  
                if ((int)mShift.Start.DayOfWeek==mDay) {  
 
                    return mShift.ToString();  
                }  
            }  
            return "";  
        }  
        public string getShift1  
        {  
            get { return getDayShift(1); }  
            set {  }  
        }  
        public string getShift2  
        {  
            get { return getDayShift(2); }  
            set { }  
        }  
 

Currently iam using the two last functions to allow me access to the function from Telerik reporting, however this gives me quite some redundant code.

Is there any way to call this function directly or is this the only way ?
Rossen Hristov
Telerik team
 answered on 12 Aug 2008
5 answers
593 views
I have been searching for the right code to allow Telerik Reporting Q2 2008 to export the contents of a report to Excel without displaying it in an ASP.NET viewer.  I simply need to hit a button in the webapp and email an attached Excel spreadsheet created in Reporting.  Does anyone have some code or an example.  I have successfully done TIFFs and PDFs this way but not XLS.

Thanks in advance.
Doug
Rossen Hristov
Telerik team
 answered on 12 Aug 2008
7 answers
141 views
Hi Team,

    Till now i dont have any problem with reporting.
    But i have a issue with displaying the reporting
    As, i have kept a report viewer in my aspx page and binding data using dataset. I am able to view the data from the report, but the main problem is,.. I am able to see every control two times. like . 6 navigation buttons and  2 print buttons.

Please let me konw where i did mistake.

Thanks & Regards,
Narendra
Rossen Hristov
Telerik team
 answered on 12 Aug 2008
3 answers
73 views

I am using the multicolumn report in the report preview it appears good

but when i view the report with the report viewer in IE only half the report appears in the center of the screen and the remaing of the report doesn't appears 
 

Rossen Hristov
Telerik team
 answered on 12 Aug 2008
5 answers
165 views
I'll admit that I have been lazy and haven't really researched this, but one thing that would be really great is if the Telerik Reporting supported binding reports to an XML datasource.  I currently use ComponentOne (haven't subscribed to them for over a year though) for my reporting component but would love to switch everything I do over to Telerik and use only a single source.  Again, I haven't actually researched this so there *may* already be support for XML Datasources.

Would love to hear if I can do that or not.
Rossen Hristov
Telerik team
 answered on 12 Aug 2008
1 answer
123 views
Hi

I have a database which holds information about employee shifts, i would like to make a report showing one week of shifts using Telerik reporting.

I have no problem making a report that shows data like this

Name    Shift
Morten   15-05-2008 15:00-18:00
Peter       18-05-2008 18:00-22:00

However i would like my result to be something like

Name   Mondag   Tuesdag Wednesdag Thursdag Friday Saturday Sonday
Morten  15:00-18:00                              19:00-22:00

As you may conclude from this my table structure looks something like this

[employee_db] { employee_id, employee_name}
[shifts] { employee_id, shift_start, shift_end }

A secondary issue is that a person may even have two shifts on a single day.

How should this be solved ?
Using subreports for each person for each day ? (seems very inefficient)

Currently using Linq as a datasource.
Rossen Hristov
Telerik team
 answered on 12 Aug 2008
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?