Telerik Forums
Reporting Forum
1 answer
60 views
I upgraded to version 2.9.9.202 from 2.9.8.1105 and now the colors on my report are very dim compared to the bright colors that I previously had.  I am using generic Red, Light Green, and Yellow.  Has anyone else seen this?
Svetoslav
Telerik team
 answered on 26 Mar 2009
1 answer
288 views
Hi,

I  create a subreport in the detail by passing display ID as below:

  private void detail_ItemDataBound(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.DetailSection section = sender as Telerik.Reporting.Processing.DetailSection;
            DataRowView row = section.DataItem as DataRowView;
            object ID = row.Row["ID"];

            if ((row["ID"] != null) && (row["ID"].ToString().Length != 0))
            {
                              
                //pass parameter- ID, date from & date to
                this.subDrivingLicense.ReportSource = new rptDriverReminderSub1();
                this.subDrivingLicense.ReportSource.DataSource = blDrivingLicense.ListRecords(ID.ToInt(), strDateFrom, strDateTo);

            }                          
        }

but sub report always show "the expression contains object "ExpiryDate" that is not defined in the current context".

What should i do to fix it?anything i miss out?

Ivan
Telerik team
 answered on 26 Mar 2009
1 answer
137 views
Hi :
     All the reports export  to pdf format,where has a cumbrous blank page which only have pagehead and pagefoot follow the last page.
thx
chen
Hrisi
Telerik team
 answered on 25 Mar 2009
1 answer
341 views
Hello,

I tried to pass a parameter to a subreport with a NeedDataSource event handler.
The subreport uses a generated DataSet, say SubReportDataSet.xsd, and there is an SQL parameter @Parameter in the SelectCommand.

When I tried the below error example code, I could only get the message rendered to the subreport:
 "The expression contains object '####' that is not defined in the current context. "
,where the object '####' refers to a first data expression in the report surface, like =Fields.FirstField

I checked that the NeedDataSource runs and It fills the dataset correctly. I tried to put the event handler to the subreport or the main report, with no difference in the result.

Eventually, I fixed the report by creating a new SqlAdapter (working example below).

I just wonder if this is a bug? I use Q1 2009 (3.0.9.311).

Strangely, a generated adapter works fine as a CrossTab datasource. Adapter connection string and parameters are set up in a NeedDataSource event. I have a CrossTab embedded in an othewise empty subreport and I fill the DataSet just like in the error example. Except that I don't have to dynamically set a datasource anywhere.

Regards,
-mika-

UPDATED: The answer was right, the DataSource in the error example should be set:
report.DataSource = Me.SubReport1DataSet.SubReport1DataSetTable


Error example:
Private Sub SubReport1_NeedDataSource(ByVal sender As System.ObjectByVal e As System.EventArgs) _ 
        Handles MyBase.NeedDataSource 
 
    'Take the Telerik.Reporting.Processing.Report instance  
    Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report) 
 
    ' Read connection string from app.config / web.config 
    Dim connSettings As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("SiteSqlServer"
 
    If (connSettings IsNot NothingAndAlso (connSettings.ConnectionString <> NothingThen 
        Me.SubReport1DataSetTableAdapter1.Connection.ConnectionString = connSettings.ConnectionString 
 
        'ReportParameter value to SQL 
        Dim param As Integer = report.Parameters("Parameter"
        Me.SubReport1DataSetTableAdapter1.Fill(Me.SubReport1DataSet.SubReport1DataSetTable, param) 
 
        ' Set report data source 
        report.DataSource = Me.SubReport1DataSetTableAdapter1 
 
    End If 
 
End Sub 

Working example:
Private Sub SubReport1_NeedDataSource(ByVal sender As System.ObjectByVal e As System.EventArgs) _ 
        Handles MyBase.NeedDataSource 
 
    'Take the Telerik.Reporting.Processing.Report instance  
    Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report) 
 
    ' Read connection string from app.config / web.config 
    Dim connSettings As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("SiteSqlServer"
     
    If (connSettings IsNot NothingAndAlso (connSettings.ConnectionString <> NothingThen 
        Dim conn As SqlConnection = New SqlConnection(connSettings.ConnectionString) 
        Dim commandText As String = "SELECT ... WHERE id = @Parameter" 
        Dim cmd As New SqlCommand(commandText, conn) 
 
        'ReportParameter value to SQL 
        Dim param As Integer = report.Parameters("Parameter"
        cmd.Parameters.Add("@Parameter", SqlDbType.VarChar, 10).Value = param 
 
        Dim adapter As New SqlDataAdapter(cmd) 
 
        Dim ds As New DataSet() 
        adapter.Fill(ds) 
        report.DataSource = adapter 
 
    End If 
 
End Sub 

Ivan
Telerik team
 answered on 25 Mar 2009
6 answers
430 views
I'm using VS2008 with 2009-Q1 reporting.  The reporting menu is missing.  How do I get it to appear? 
John W Wilson
Top achievements
Rank 1
 answered on 25 Mar 2009
4 answers
202 views
Hi all,
    I have a problem with reporting, when I export to any(like excel, PDF,CSV,etc.), it will be 2 pages, and if there is a chart, it will be print 2 times of this chart. I don't konw why? If you have any ideas, Please let me know.
    Additionally, I have advanced a problem a.m. Please help with it. It also about chart, when export to excel, the chart does not display. I have no idea about this.

Thanks ,

BestRegards,
Rain 
Rain
Top achievements
Rank 1
 answered on 25 Mar 2009
1 answer
123 views
I am presently using the bundled Crystal Reports, but I am looking at Telerik Reporting to supplement or replace it. I have a problem with a specific report in Crystal and I wonder if the Telerik product can do a better job.

The report is a two column member directory with family members. It lists the member name, contact info, spouse, and children. I want each family group to stay together, and not break cross a column or a page. With Crystal, the family groups will not break across a page (which is good), but they will break across a column (bad). After much web searching and support ticketing, I find that this can't be done in Crystal.

Can Telerik Reporting handle this?
Ivan
Telerik team
 answered on 24 Mar 2009
1 answer
101 views
hello ,
Please any one can help me , I get this error 
An error has occured while processing Chart 'chart1':
An Unexpected error has occurred. Please review the InnerException for more information how to resolve the problem.
(happened when item doesn't have value then other choose another item get this )


this is my code


 

private void chart1_NeedDataSource(object sender, EventArgs e)

 

{

Telerik.Reporting.Processing.

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

 

 

DateTime fromDate = Convert.ToDateTime(this.ReportParameters["StartDate"].Value);

 

 

DateTime todate = Convert.ToDateTime(this.ReportParameters["EndDate"].Value);

 

 

string country = this.ReportParameters["CountryId"].Value.ToString();

 

 

int recordCount = Convert.ToInt32(this.ReportParameters["RecordCount"].Value);

 

 

GetMedicationReportTableAdapter adapter = new GetMedicationReportTableAdapter();

 

 

dsMedication.GetMedicationReportDataTable data = adapter.GetMedicationData(fromDate, todate, country, recordCount);

 

medicationChart.DataSource = data.DefaultView;

}

 

thanks in advance


Chavdar
Telerik team
 answered on 24 Mar 2009
6 answers
391 views
Hello,

How can I make a panel or detail row in the grid have a gradient background?

I only see one color I can set for the background color of either. I tried using an image (gradient) as the background image and repeated it with the RepeatX option and it worked except I can see on the panel where each image is repeated (i.e. there are visible vertical lines across my panel.

Should I create a new gradient image that matches the width of my report so the repeating won't happen or is there a better way to get gradient on a panel?

Thanks.
Svetoslav
Telerik team
 answered on 24 Mar 2009
0 answers
78 views

Hello ,
Please any one can help me , I made Report in telerik reporting with  4 report parameters 2 datetime , 1 integer , 1 string , inside this report I put subreport with same parameter because main report for chart and subreport for display date , first
NeedDataSource fired true but second NeedDataSource  have error  Error converting data type nvarchar to datetime sql exception was unhandled by user code

 

thanks in advace

Nada
Top achievements
Rank 1
 asked on 24 Mar 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?