Telerik Forums
Reporting Forum
7 answers
329 views
Hello, i'm new in this forum and in telerik. I'm using crosstab and I want to make the rows in the crosstab of a different color depending on a field of dataset. I saw that I can do it with FormattingRules, but I want to do a design, because the color I want is a field of the dataset. How can I do? 
Thanks for your help,
Silvia
Robert Munz
Top achievements
Rank 1
 answered on 04 Jun 2009
7 answers
139 views
Ok not sure if the documentation is not clear and/or I am losing my mind over here...

I have a problem where I cannot just bind to a datasource but have to actually add rows to the report on the fly, I have tried everything I can think of, Dim textBox1 As New Telerik.Reporting.TextBox(), details.items.add(textBox1) etc... but they all add as columns "NOT" rows. So something as simple as below does not work...

Do While i < 5  
    textBox1 = New Telerik.Reporting.TextBox  
    textBox1.Value = "Data Item: " & i  
    detail.Items.Add(textBox1)  
    i = i + 1  
Loop 
 

I have tried, tables, panels etc. all having the same problem. What am I missing I just want to be able to add dynamic data (without a datasource) and have it go "DOWN" the page not "ACROSS" pretty simple but there is no documentation that I could find that talks about adding simple data without a datasource to your report etc.

Yes the report is built dynamicly and in this one area there is no way I am going to reshape the data and fill another dataset just to assign it. it is a little to complicated and way to much overhead for doing something like that. I am just hoping that is not my only option as that would be silly.

Thanks in advance.
Christopher Bishop
Top achievements
Rank 2
 answered on 04 Jun 2009
1 answer
159 views
Hi,

I searched most of forum, online documentation and also encountered a video related to report parameter.  I get the details and trying to implement passing a parameter to a report which is outside a report but i am not successful in this scenario.

Look at the following situation:

- I am creating a report  and viewing in report viewer on browser.
- During the load event of .aspx page i am assigning a parameter value.  (Parameter Name : a1)
- This value is collecting in the report which i am using for certain condition.
When i run the report the parameter a1 contains nothing. It means it is not collecting any sort of value which i assigned during load event of .aspx page.

Assigning Report Parameter value in .ASPX page
Imports NSSReports 
Imports Telerik.Reporting.Data 
Partial Class AllReports_SectionReportGroupDetails 
    Inherits System.Web.UI.Page 
 
    Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad 
         
TryCast(ReportViewer1.Report, SectionReportGroup).ReportParameters("a1").Value = 5 
     
End Sub 
 
End Class 

Collecting parameter value in report
Imports System.ComponentModel 
Imports System.Drawing 
Imports System.Windows.Forms 
Imports Telerik.Reporting 
Imports Telerik.Reporting.Drawing 
Imports System.Data 
Imports System.Data.SqlClient 
 
Partial Public Class SectionReportGroup 
    Inherits Telerik.Reporting.Report 
    Public Sub New() 
        InitializeComponent() 
        DisplayData() 
    End Sub 
 
Public sub DisplayData() 
Dim t as string 
tRetrieveSelectCommand() 
 
End Sub 
 
Public Function RetrieveSelectCommand() As String 
        Dim s As String = Nothing 
 
        Select Case Me.Report.ReportParameters("a1").Value 
            Case 1 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 2 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 3 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 4 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 5 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 6 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 7 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M7_JUL),SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 8 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M8_AUG),SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 9 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M9_SEP),SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 10 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M10_OCT),SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 11 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M11_NOV),SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
            Case 12 
                s = "Select RESOURCE_NAME,SECTION_ID, DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK, SUM(M12_DEC),SUM(M1_JAN), SUM(M2_FEB),SUM(M3_MAR),SUM(M4_APR),SUM(M5_MAY),SUM(M6_JUN),SUM(M7_JUL),SUM(M8_AUG) FROM RESOURCE_DATA GROUP BY RESOURCE_NAME,SECTION_ID,DIVISION_ID,RESOURCE_YEAR,RESOURCE_MONTH,RESOURCE_WEEK" 
        End Select 
        Return s 
    End Function 
 
 
 
End Class 

when i try to check the parameter value with the message box,i got nothing:
msgbox (Me.Report.ReportParameters("a1").Value.ToString)

Even i used one the example from the forums i am unable to collect the value of parameter.
Public Property OrganizationKey() As Integer
Get
Return Me.ReportParameters("a1").Value
End 
GetSet(ByVal Value As Integer)
Me.ReportParameters("a1").Value = Value
End 
SetEnd Property


Still i am not getting nothing.

Please tell me how to collect the report parameter in this scenario.

thanks.

Regards
Syed Arshad


Steve
Telerik team
 answered on 04 Jun 2009
2 answers
205 views
Hi

I have an invoice I have created with Telerik Reporting. When I export it to PDF the company logo is all grey and fuzzy. I have seen some post regarding this and change the display settings but it hasn't resolved it.

Here is the code i am using just incase it is related to that. I am also using Q1 2009.

               string mimType = string.Empty;  
                string extension = string.Empty;  
                Encoding encoding = null;  
                byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render(  
                 "PDF", invoice, null, out mimType, out extension, out encoding);  
                FileStream fs = new FileStream("c:\\Invoice.pdf", FileMode.Create);  
                fs.Write(buffer, 0, buffer.Length);  
                fs.Flush();  
                fs.Close();  


Gary
Top achievements
Rank 1
 answered on 04 Jun 2009
6 answers
196 views
Unable to cast object of type 'Telerik.Reporting.Processing.Data.DataGroup' to type 'System.Data.DataRowView'

on this code:

_memberId = int.Parse(((System.Data.DataRowView)(itemBase.DataObject))["MemberID"].ToString()); 




So what do I cast the DataObject to now ?

David Penrose
Top achievements
Rank 1
 answered on 04 Jun 2009
1 answer
99 views
Hello,

Telerik reporting can create a physical file for each report?

All reports are generated within a dll?

I want to save a report in a folder, such as Crystal Reports files. Rpt from the ReportViewer CrystalReports to assign the file you need.

Telerik Reporting got this option?


Steve
Telerik team
 answered on 02 Jun 2009
1 answer
105 views
Hi,

I am trying to view the report on report viewer on browser. During the design time, preview time, what ever the structure i placed , its displaying exactly and even when i convert to pdf, i saw the same format as design and previous time.  But when i view in report viewer the structure is complete different and format has changed. But when i convert from to pdf, its the same what ever i used in design or preview time.

Can you tell when it is happening.

Thanks.

Regards
Syed Arshad
Milen | Product Manager @DX
Telerik team
 answered on 01 Jun 2009
1 answer
160 views
Hello, am developing an application for a bank and on my development environment the report show when called. ie Telerik Reporting 2009. But when I take it to the production server, nothing shows. I did some checking and found out that some of the Telerik Reporting dll's need to be copied manually. I have done this. Now the export bar from the report show and it indicates "Generating Report..." but still the data does not show.

Please, what am I doing wrong or what do I have to do. 

Thanks.
Hrisi
Telerik team
 answered on 01 Jun 2009
1 answer
295 views

Hello,

I'm trying to create a table programmatically. I have been rather succesful in doing so but I can not find a way to set the size for the columns and rows (width for columns and height for rows).

When you create a report using the designer you can do so by using the mouse. Also if you click on the columns the property editor shows an item with the name TableColumnX or TableRowX where X is the number of the column. However I was unable to locate these items in the code-behind of the report.

Any ideas?

Svetoslav
Telerik team
 answered on 01 Jun 2009
1 answer
254 views
Development Environment:  VS Studio 2005, ASP.NET, VB.NET, Telerik Reporting v3.0.9.430

Problem: Trying to hide empty space of a subreport which resides within a subreport.

Attempts so far:  Tried setting height of the detail section of both sub reports to 0.01 within the constructor.  Have all text boxes property CanShrink set to True.

Report Design Look:

Main Report:
-------------------------------------------------
Report Header Section
-------------------------------------------------
Detail Section with Text Boxes
SubReport1
-------------------------------------------------

SubReport1 (w/Header/Footer Visible=False):
-------------------------------------------------
Detail Section with Text Boxes
          SubReport2
-------------------------------------------------

SubReport2 (w/Header/Footer Visible=False):
-------------------------------------------------
Detail Section with only one Text Box (CanShrink=True)
-------------------------------------------------


Code for both SubReport1 and SubReport2:
Public Sub New()  
    InitializeComponent()  
    Me.DetailSection1.Height = Unit.Inch(0.01)  
    Me.DataSource = Nothing 
End Sub 


Report Output:
By setting the border for the detail section of SubReport1 and SubReport2 I can see that SubReport2 is hidden yet SubReport1's detail section is still expanded for the content of SubReport2.  This report has mutliple rows returned and only a few rows will contain data within SubReport2.  SubReport1 always has data

Here is an example of what it should look like:

                              Example Report 1
Patients for: Dr. Bob Burns
Name                  DOB                   Age                   Gender
Bob Smith           01/01/1974        35                      Male
Nancy Apple       05/01/1976        33                      Female
          Here are some notes for Nancy Apple
Joe Johnson       03/25/1978        31                      Male


Here is what is really produced by the report:

                              Example Report 1
Patients for: Dr. Bob Burns
Name                  DOB                   Age                   Gender
Bob Smith           01/01/1974        35                      Male

Nancy Apple       05/01/1976        33                      Female
          Here are some notes for Nancy Apple
Joe Johnson       03/25/1978        31                      Male


Any help is greatly appreciated.

Warren
Steve
Telerik team
 answered on 29 May 2009
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?