Telerik Forums
Reporting Forum
1 answer
117 views

Hello,

My team is very excited to move into Telerik Reports, however we have first been trialling the software and came accross an issue that we are unable to solve.  Unfortunately we're on a tight deadline, and would sincerely appreciate any prompt responses.

[See Sample Project, Code & screenshot: http://www.addeight.net/telerik-issue.zip]


We are having trouble binding a sub report based on repeating datafrom a parent (master) report. What we need to be able to do is have a masterreport that repeats SolutionIDs (the primary key), and sub reports (which holdall the totals/information based off a single SolutionID). I cannot useFilters, as the data being returned in the sub reports is complicated.

We have seen these articles as references, and have tried (to our knowledge)everything in them:

http://www.telerik.com/community/forums/reporting/telerik-reporting/i-need-to-know-when-to-pass-parameters-to-a-subreport.aspx

http://www.telerik.com/documents/TelerikReporting-LearningGuide.pdf

http://www.telerik.com/community/forums/reporting/telerik-reporting/how-do-i-pass-parameters-to-subreport-sproc.aspx

http://www.telerik.com/support/kb/reporting/designing-reports/using-data-source-with-parameters-in-telerik-reporting.aspx

http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-set-datasource-of-a-sub-report.aspx

http://www.telerik.com/community/forums/reporting/telerik-reporting/set-subreport-datasource-programmatically.aspx#421286

http://www.telerik.com/ClientsFiles/product.videos/28/

Asyou can see by the screenshot attached (Screenshot.png in root of zip file), we are close. We have used the following code 


    Public Sub New() 

        InitializeComponent() 

 

        'bind the master's datasource 

        Dim cmdMaster As New SqlCommand("SELECT * FROM Solutions WHERE CompanyID=@CompanyID", cn) 

        cmdMaster.Parameters.AddWithValue("@CompanyID", 10) 

        Dim daMaster As New SqlDataAdapter(cmdMaster) 

        Dim dt As New DataTable("Solutions") 

        daMaster.Fill(dt) 

 

        Me.DataSource = dt 

        Me.DataMember = "Solutions" 

    End Sub 

 

    Private Sub SolutionDetails_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles SolutionDetails.NeedDataSource 

        Dim item As Telerik.Reporting.Processing.ReportItemBase = TryCast(sender, Telerik.Reporting.Processing.ReportItemBase) 

        Dim dataRow As DataRowView = DirectCast(item.DataItem, DataRowView) 

        Dim adapter As New SqlDataAdapter("SELECT * FROM Solutions WHERE ID=@SolutionID", cn) 

        adapter.SelectCommand.Parameters.AddWithValue("@SolutionID", dataRow("ID")) 

 

        SolutionDetails.ReportSource.DataSource = adapter 

 

        Test_SolutionDetail1.Debug = dataRow("ID") 

        'Me.DataSource = adapter 

    End Sub 


 

Again, we need to have the sub report on each SolutionID, and we need to be able toquery data based off that SolutionID in the sub report.

We sincerely appreciate any help in advance, and cannot stress the tight deadline we are working with enough.  If you can help, we are more than happy to compensate you for your time!


Cheers!

Justin Brouwer
Top achievements
Rank 1
 answered on 15 Feb 2010
2 answers
229 views
when designing in my  own report class library,  sample.dll  so it can be used in my webapp,

the Integer Parameter  needs to be (Int64) or else I would get cast error.

           Int64 territoryId = (Int64)this.ReportParameters["TerritoryId"].Value; 
 

When the setting is Int64, i can click Preview and report comes up via the class library.  If it's set to int,

An error has occured while processing Chart 'chart1':
Specified cast is not valid.





But when I add this reference to my webapp to use the ReportViewer,
it doesn't like Int64 and gives the cast error, I debug in VS and see it's this line, so  I change it to  int, it works.
int territoryId = (int)this.ReportParameters["TerritoryId"].Value; 




I don't think this is what supposed to happen?
They are both .Net 3.5, the class and webapp are even in the same solution.
I'm using  Telerik Reporting Q3 2009  v. 3.2.9.1211  Trial

Khanh Nguyen
Top achievements
Rank 1
 answered on 13 Feb 2010
4 answers
205 views
I have datacolumn(LeadDate)  that is returned from SQL,
if the format is DateTime,  i get the following error:

An error has occured while processing Report '':
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

When applying the column to the xaxis of a chart.

Example of data with type of datetime from SQL:
LeadDate            DayActuals 
2010-02-01 00:00:00 27 
2010-02-02 00:00:00 48 
2010-02-03 00:00:00 23 
2010-02-04 00:00:00 56 
2010-02-05 00:00:00 31 
2010-02-06 00:00:00 19 
2010-02-07 00:00:00 24 
2010-02-08 00:00:00 27 
2010-02-09 00:00:00 62 
2010-02-10 00:00:00 6 

When the column is CONVERT(VARCHAR(8),LeadDate,1) as LeadDate , like below, there's no error.
But the Column is no longer DateFormat  and I'm not able to format the LeadDate column on the chart.
LeadDate    DayActuals 
02/01/10    27 
02/02/10    48 
02/03/10    23 
02/04/10    56 
02/05/10    31 
02/06/10    19 
02/07/10    24 
02/08/10    27 
02/09/10    62 
02/10/10    7 


I want to return the column as DateTime format so I can format the data on the xaxis using
using this technique: http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-format-x-axis-value-on-chart.aspx


Khanh Nguyen
Top achievements
Rank 1
 answered on 13 Feb 2010
1 answer
125 views
Telerik team,
I programmatically generate a report page, in which there is 3 charts and 2 tables.
When browser render this page, the first page only display the header section, the detail and footer section always go to the second page.  I would like  the the detail section to be displayed inside the first page too.
I searched the forum and found the problem may be solved by the article:
http://www.telerik.com/support/kb/reporting/general/problem-telerik-reporting-renders-blank-pages.aspx

I try all the solutions inside the article, except the one that remove the header section, none can solve my problem.

My problem is :
    can I split the report page in multiple page programmatically so that each page will have charts or spreadsheets be displayed

or does telerik report provide multiple detail sections to solve my page render problem.

if so, can you provide some example ?

Thanks in advance!

Qixiong
Peter
Telerik team
 answered on 12 Feb 2010
1 answer
538 views
Hi there,

I am currently learning to use Telerik reporting, and am stuck on something that should be simple, but I just can't figure it out !!

I have added a table to the designer view of my report.

In the "MyReport_NeedDataSource" method I simply want to add data to this table.

I don't want to bind the table to an SQL data source, I simply want to add the values programatically, row by row.

The table is already five columns wide, so I would like something like:

        table1.rows.add(new tablerow("value1", "value2", "value3", "value4", "value5");

        or even something like:

        table1.rows[0].cells[0] = "value1";
        table1.rows[0].cells[1] = "value2";
        table1.rows[0].cells[2] = "value3";
        table1.rows[0].cells[3] = "value4";
        table1.rows[0].cells[4] = "value5";

I'm sure there must be a way to do something like this. Please advise when able.

Kind regards, Ben.
Steve
Telerik team
 answered on 12 Feb 2010
1 answer
103 views
Hi all. We're developing a WPF project with Telerik Rad Controls for WPF and Telerik Open Access for our ORM. Now, we're moving to the reporting phase, and we want to use Telerik Reporting as well, but there are a couple of questions that I need to ask before we can decide to use it over Reporting Services:

  1. Does your ReportViewer support both local and remote processing modes? We need to be able to handle reports both locally and from a reporting server.
  2. Do you have an auto refresh feature for the report, like th one ein Reporting Services?

Thanks a lot.
Steve
Telerik team
 answered on 12 Feb 2010
3 answers
118 views
We are looking to convert some Crystal Reports to use telerik.  We have a subweb that displays all our reports based on report display type and what report is to be displayed.

All report requests are directed to the same page which takes a uniqueidentifier id to determine which report to display.  We take our XML report data and convert it to a dataset to be used by the report.datasource.  What I can't figure out is how to specify which report to use.  A previous post said to use the following instead of instead of the IReportDocument syntax.

 

Dim report As Telerik.Reporting.Report = New Report()

 

report.DataSource = myDataSet

ReportViewer1.Report = report

ReportViewer1.DataBind()

So, my question is, how do I specify which report to use?  We have hundreds of reports and would like to stick with our convention of having one aspx page that includes the report viewer.  The included VB.ReportLibrary would then have the report templates.

Thank You for your help

Peter
Telerik team
 answered on 11 Feb 2010
1 answer
124 views
Dear Telerik team,

How do I do it if I want to show a footer group on Textbox2 value that is based on the header group textbox1 value.
eg. I want to include  textbox1 value, into textbox2 expression,
say if textbox1 value = "1" then display "a" otherwise blank --this is for the textbox2 expression.

Please help,

Regards
Steve
Telerik team
 answered on 11 Feb 2010
1 answer
160 views
Hi,
Is it possible to repeat the background image in a serie item like it is in plain html?
item.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Image; 
item.Appearance.FillStyle.FillSettings.ImageDrawMode = Telerik.Reporting.Charting.Styles.ImageDrawMode.Align; 
item.Appearance.FillStyle.FillSettings.BackgroundImage = "/Media/status/whiteStrike.gif"

Regards,
Mattias
Ves
Telerik team
 answered on 11 Feb 2010
1 answer
63 views
Telerik team,
I have report page. In the detail section of the page, I programmatically generate some spreadsheets and charts.
The generated page always have 2 pages. the first page only display the header section and the detail section and footer section always go to the second page, No Matter how long the detail and footer section will be.
Pages should not be display in such way. 
Do you know what kind of report setting will result in this issue ?
Thanks in advance.
Qixiong
Peter
Telerik team
 answered on 11 Feb 2010
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?