Telerik Forums
Reporting Forum
1 answer
163 views

Hi

     I am new in telerik reporting I create simple report for our compnay employee details

1)  how to use telerik reporting in web application

     i got one code from telerik site but  i cant create sqldatasource in that class ( i think its only support in web)

using System;
using Telerik.Reporting.Chart;

  
public partial class Report1 : Report
   {
       
public Report1()
       {
           
/// <summary>
           
/// Required for telerik Reporting designer support
           
/// </summary>
           
InitializeComponent();

           
// create a datasource
           
SqlDataSource sqlDataSource = new SqlDataSource();
           sqlDataSource.ID =
"myDataSource";
           sqlDataSource.ConnectionString =
           ConfigurationManager.ConnectionStrings[
"NorthwindConnectionString"].ConnectionString;
           sqlDataSource.SelectCommand =
           
"SELECT CategoryName, SUM(ProductSales) AS TotalSales FROM [Product Sales for 1997] GROUP BY CategoryName";
           
//setup chart
           
BuildChart();
       }
       
private void BuildChart()
       {
           
// assign it to Chart  
           
Chart1.DataSourceID = "myDataSource";
           
// Set the column for data and data labels:
           
// Each bar will show "TotalSales", each label along
           
// X-axis will show "CategoryName.
           
Chart1.Series[0].DataYColumn = "TotalSales";
           Chart1.PlotArea.XAxis.DataLabelsColumn =
"CategoryName";
           
// assign appearance related properties
           
Chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300;
           Chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color =
           System.Drawing.Color.BlueViolet;
           Chart1.PlotArea.Appearance.Dimensions.Margins.Bottom =
           Telerik.Reporting.Charting.Styles.Unit.Percentage(30);

       }
   }




2)  I have write code in  following event.But i cant give data source for that chart1

private

 

void chart1_NeedDataSource(object sender, EventArgs e)

 

{

 

}

3) I trying following code this code also throwing error like

An error has occured while processing Chart 'chart1':
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

 

private void chart1_NeedDataSource(object sender, EventArgs e)

 

{

Telerik.Reporting.Processing.

 

Chart chart = sender as Telerik.Reporting.Processing.Chart;

 

 

 

string command = "Select EmpId,Salary from tblemp";

 

 

 

SqlDataAdapter sqldataAdapter = new SqlDataAdapter(command, "Data Source=SVNSERVER;Initial Catalog=HR;User ID=sa;Password=Ava_123@");

 

 

 

DataSet ds = new DataSet();

 

sqldataAdapter.Fill(ds);

 

 

DataView dv = ds.Tables[0].DefaultView;

 

chart.DataSource = dv;

 

 

//this.DataSource = dv;

 

 

chart1.Series[0].PlotArea.XAxis.DataLabelsColumn =

"EmpName";

 

chart1.Series[0].PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 330;

 

 

 

 

}

 


3) Finally i want  how to bind values from database to chart



Regards,

Friend
Ivan
Telerik team
 answered on 08 Jun 2009
3 answers
262 views
Hi, if I had two report names TotalReport1 and TotalReport2 in a combo box on a windows app, how can I show whichever one I want in a reportviewer at run time ? I had something like

ReportViewer testViewer = new ReportViewer();
testViewer.Report = ????

Do I have to populate the IReportDocument with the report name I choose in the combo box, if so does anyone know the syntax ?

Thanks a lot,

Pete.
Pete
Top achievements
Rank 1
 answered on 05 Jun 2009
2 answers
219 views
Hi, I have an empty winform that I add the controls dynamically at runtime, depending on the value in a dropdown.

If one of the options in the combobox is a telerik report I've already set up called Report1 how can I programmatically assign this to a new ReportViewer and add the ReportViewer control at runtime, is this possible ? Thanks
Pete
Top achievements
Rank 1
 answered on 05 Jun 2009
6 answers
343 views
Hi,

I've just installed Telerik Report Q1 2009, and now I'm having this problem.

In visual studio, I added a new item of Telerik Report Q1 2009 in my project. I could see the auto-generated code in Code mode, but when I switched to the design mode, it threw an exception on the opened design mode page, which said: Object reference not set to an instance of and object. In addition, when I run the Telerik Reporting Q1 2009 Demo Application, click one of the nodes in the left tree,say, Sales Dashboard, an error window pop up showing:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Exception has been thrown by the target of an invocation.


When I clicked the "Details" button, it shows following details:
/*---------------------------------------------------------------------------------------------------------------------------------------------*/

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.ReportViewer.WinForms.WinViewer.UpdateScrollSize()
   at Telerik.ReportViewer.WinForms.WinViewer.OnSizeChanged(EventArgs eventArgs)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
   at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
   at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout)
   at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
   at Telerik.ReportViewer.WinForms.ReportViewerAreaBase.InitializeComponent()
   at Telerik.ReportViewer.WinForms.ReportViewerAreaBase..ctor()
   at Telerik.ReportViewer.WinForms.WinViewer..ctor()
   at Telerik.ReportViewer.WinForms.ReportViewer..ctor()
   at Telerik.Reporting.QuickStart.ReportViewerContainerControl.InitializeComponent()
   at Telerik.Reporting.QuickStart.ReportViewerContainerControl..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Telerik.QuickStart.WinControls.MainForm.NavigateToExample(ExamplesTreeNode treeNode)
   at Telerik.QuickStart.WinControls.MainForm.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
qsf
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/qsf.exe
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
QuickStart
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/QuickStart.DLL
----------------------------------------
Telerik.WinControls.UI
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/Telerik.WinControls.UI.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
CSharp.ReportLibrary
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/CSharp.ReportLibrary.DLL
----------------------------------------
Telerik.WinControls
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/Telerik.WinControls.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Telerik.Reporting
    Assembly Version: 3.0.9.430
    Win32 Version: 3.0.9.430
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Telerik.Reporting/3.0.9.430__a9d7983dfcc261be/Telerik.Reporting.dll
----------------------------------------
System.Drawing.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
TelerikCommon
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/TelerikCommon.DLL
----------------------------------------
Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///E:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
Telerik.ReportViewer.WinForms
    Assembly Version: 3.0.9.430
    Win32 Version: 3.0.9.430
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Telerik.ReportViewer.WinForms/3.0.9.430__a9d7983dfcc261be/Telerik.ReportViewer.WinForms.dll
----------------------------------------
Telerik.Reporting.Processing
    Assembly Version: 3.0.9.430
    Win32 Version: 3.0.9.430
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Telerik.Reporting.Processing/3.0.9.430__a9d7983dfcc261be/Telerik.Reporting.Processing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

/*---------------------------------------------------------------------------------------------------------------------------------------------*/
My OS is windows XP professional SP3. But in my colleage's computer, which is Windows server 2003, there is no such problem.





Jason
Top achievements
Rank 1
 answered on 05 Jun 2009
7 answers
341 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
147 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
181 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
221 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
206 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
106 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
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?