Telerik Forums
Reporting Forum
4 answers
551 views
Hello,

I am running a report I built and I get:

An error has occurred while processing Report '':
Specific cast is not valid.

How am I supposed to debug this?  I have no idea what is causing this.
Brian Mains
Top achievements
Rank 1
 answered on 19 Jan 2010
1 answer
139 views
Hi
I have some code that adds subreports to a mainreport.  There can be any number of subreports of various widths and various numbers of rows .  I get blank pages at the end of the report

I have a loop that adds the reports by calling the following sub.
I in the sub below I Set the initial width to 15 the height to 1 and then  add padding
I Set the location then databind
I then get the height of the report and add that to the start location. 
As we cross pages this obviously does not work.  Please help

 

 

Private Sub AddTestSubReports(ByVal MySubReport As Telerik.Reporting.SubReport, ByVal mTestCode As String, ByVal mTestTitle As String, ByVal lasttest As Int16)

 

 

'Adds a single test to the report as a subreport

MySubReport =

 

New Telerik.Reporting.SubReport

 

MySubReport.Size =

 

New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(10, Telerik.Reporting.Drawing.UnitType.Cm), New Telerik.Reporting.Drawing.Unit(1, Telerik.Reporting.Drawing.UnitType.Cm))

 

MySubReport.Style.Padding.Bottom =

 

New Telerik.Reporting.Drawing.Unit(1, Telerik.Reporting.Drawing.UnitType.Cm)

 

MySubReport.Dock = System.Windows.Forms.DockStyle.Top

MySubReport.Name =

 

"SubReport2"

 

 

 

 

 

MySubReport.Style.BorderColor.Default = System.Drawing.Color.MidnightBlue

MySubReport.Style.Color = System.Drawing.Color.Transparent

MySubReport.Location =

 

New Telerik.Reporting.Drawing.PointU(New Telerik.Reporting.Drawing.Unit(0, Telerik.Reporting.Drawing.UnitType.Cm), New Telerik.Reporting.Drawing.Unit(myStartLocation, Telerik.Reporting.Drawing.UnitType.Cm))

 

 

 

 

 

Dim mobjTestResults As New objTestResults(mCertificateCode, mTestCode)

 

mobjTestResults.BuildTestHeadings(

 

False)

 

mobjTestResults.AddResultsTodtResults()

 

 

Dim txtTemp As New Telerik.Reporting.TextBox

 

 

Dim SubRep As New CertificatTestSubRep1

 

MySubReport.ReportSource = SubRep

SubRep.txtTestName.Value = mTestTitle

DeleteUnwantedSubRepItems1(mobjTestResults.dtResults.Columns.Count, SubRep, mobjTestResults.mdtColums)

 

 

SubRep.DataSource = mobjTestResults.dtResults

 

Me.DetailSection1.Items.Add(MySubReport)

  

myStartLocation = myStartLocation + MySubReport.Height.Value

 

 

End Sub

 

 

 

Al
Top achievements
Rank 1
Iron
 answered on 19 Jan 2010
3 answers
116 views

Well I have uninstalled RadControls_for_ASP.NET_AJAX_2009 Q1, but when I am trying to install RadControls_for_ASP.NET_AJAX_2009 Q2, system shows me this error:


"Telerik RadControls for ASP.NET

AJAX VSExtensions are installed.

Please uninstall and restart this setup."


But when I am trying to delete VSExtensions from   Control panel/Add or Remove shows this massage:

"Telerik RadControls for ASPNET AJAX are not installed"



And at last how I can uninstall this VSExtension?

Petar
Telerik team
 answered on 19 Jan 2010
1 answer
134 views
Hello,

I'm looking at the C# examples that came with the download.  Do I have to bind in initializecomponent?  I have a report with 4 params, and the data source is dependent on these parameters.  So what I am wondering is, from what I'm seeing on these examples, is why do I have to bind my dataset generated from a table adapter in the constructor when I don't know what the data will be until the user fills in params.

I'm just getting into telerik reporting, so forgive my newbieness :-)

EDIT: after looking at it, it does not appear the needdatasource event is firing after parameters have been specified and I click the preview button.  I'm not sure why that is, do you have to do something for that to happen?

Thanks.
Steve
Telerik team
 answered on 19 Jan 2010
2 answers
460 views
Hello,

I'm using this approach to bind a form: http://blogs.telerik.com/kevinbabcock/posts/09-03-14/telerik_reporting_connecting_to_stored_procedures.aspx

So I'm using a stored proc, and binding the data in the needdatasource event.  I have four parameters, but I see no parameter list to be able to edit them... what is going on, do I need to enable something?  I'm at a loss here as to how I can supply property values in the ASPX web page and in the preview window.

Note, I setup the parameters in the properties grid in the designer.

Thanks.
Steve
Telerik team
 answered on 19 Jan 2010
8 answers
171 views
Is there a way to trap a runtime error on a field so I can replace the field value with just "Error" instead of that big error msg that shows up by default.
john81
Top achievements
Rank 1
 answered on 18 Jan 2010
1 answer
122 views
Hello,

I need to design a report that is flexible. The report can have a maximum of 12 columns and a minimum of 1 column. At any point in time the report should be able to render any number of columns between 1 and 12 depending on what comes from the database.

How can I create this type of report? Can it be done?

Please, I really need help on this. At the very least please let me known if it can be done.
Schlurk
Top achievements
Rank 2
 answered on 18 Jan 2010
6 answers
999 views
This is really weird.

I am using the latest RadControls and Reporting 1.0 SP1.
On my dev PC I do not receive the error.
When I move the files to production I get the error:

Could not load file or assembly 'Telerik.Charting, Version=1.0.2.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Telerik.Charting, Version=1.0.2.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Charting, Version=1.0.2.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' could not be loaded.

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Telerik.Charting, Version=1.0.2.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763
(Fully-specified)
LOG: Appbase = file:///D:/Inetpub/wwwroot/
LOG: Initial PrivatePath = D:\Inetpub\wwwroot\bin
Calling assembly : Telerik.Reporting, Version=1.1.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be.
===

I don't have Telerik.Charting.dll that came with Reporting in my bin folder as it causes duplicate namespace errors with pages that use RadChart.dll


Any clues as to how to resolve this?  (I've cleared the bin/gac on both machines and mirrored the contents, still no go).

Thanks,
Jason

Steve
Telerik team
 answered on 18 Jan 2010
2 answers
354 views
Hello,

I've been trying to create a mock sample data set to use on a report in design-time; basically, it's a simple class that with a public static function that returns an object with a property that contains a List generic collection containing additional objects.

When binding this object in the NeedDataSource event handler, it works when binding to the object itself; however, I implemented a SubReport in the master report to list the objects contained in the List collection. Here's where the problem gets blurry.

I implemented a NeedDataSource on the report (contained in the master report as a subreport) that assigns the List collection of objects to the report. I then use the binding syntax to bind to the object's properties, but the expression does not return a value, rather it's blank. The number of displayed table cells matches the number of objects in the List collection, but no values of fields are displayed.

Example: object in List contains the "Ime" property; neither =Ime or =Fields.Ime displays the value. Also, using just any binding expression doesn't result in an error (like =Foo).
Klemen Slavič
Top achievements
Rank 2
 answered on 18 Jan 2010
0 answers
131 views
Hi

  We are using Telerik reporting to generate reports and we are facing this problem that one particular report which brings out around 8000 records is not getting exported to any format. When I try to export, it just giving out blank page in pdf ,excel etc. on webserver.
  This behaviour is very different when I try to reproduce it in my local development machine and it didnt even generate a report in the report viewer and ofcourse the pdf , excel are blank again.
We know this particular report and its code are working fine because it is generating report for other input parameters which are generating around 200 to 500 records. We are not getting any errors and it just simply not displaying any data, this is really frustrating.

We are making some complex calculations in the stored procedure for this report , the code for which is I am attaching below. When I execute this particular stored procedure it is generating 8000 records in around 2 mins and everything seems to be working fine at the database end. I even checked extending connection string time out period but its of no use.

USE [GBE_GBSDB]  
GO  
/****** Object:  StoredProcedure [dbo].[usp_Report_DistributorInvoiceSummary]    Script Date: 01/07/2010 11:08:57 ******/  
SET ANSI_NULLS ON 
GO  
SET QUOTED_IDENTIFIER ON 
GO  
ALTER procedure [dbo].[usp_Report_DistributorInvoiceSummary]  
@ManufacturerId int,  
@InvoiceId int,  
@StartDate datetime,  
@EndDate datetime  
AS     
BEGIN 
SELECT  max(dbo.CustomerSpend.InvoiceNumber) as InvoiceNumber,  
   convert(varchar(12),max(dbo.CustomerSpend.InvoiceDate),101) as [Date],  
   max(dbo.CustomerSpend.SellerProductNumber) as Item,  
   case when isnull(ltrim(rtrim(max(dbo.Product.PackSize))),'')=''   
   then max(PackSizeAlias.PackSize) else max(dbo.Product.PackSize) end as PackSize,  
   max(CustomerSpend.SellerMfgCustomerName) as Manufacturer,  
   max(CustomerSpend.SellerProductBrandedLabel) as DistributorBrand,  
   max(dbo.Product.ProductDescription) as [Description],  
   max(dbo.CustomerSpend.SellerMfgCustomerPN) as MFC,  
            max(dbo.SubmissionCouponSpendRelation.ActualCalculatedCases - CAST(isnull(SplitQty,'0'AS FLOAT)/ProductQtyPerCase) as CaseQty,  
   isnull(max(dbo.CustomerSpend.TotalItemPrice),0) as TotalCost,  
   MAX(dbo.CustomerSpend.SellerCustomerId) as AccountNum,  
   MAX(CustomerSpend.BuyerActualCustomerId) as RestaurantId,  
   MAX(CustomerSpend.SellerActualCustomerId) as DistributorId  
into  #tb  
FROM        dbo.SubmissionInvoice  
INNER JOIN dbo.Coupon  
ON   SubmissionInvoice.CouponId=Coupon.CouponId  
INNER JOIN   dbo.CouponGroupRelation   
 ON   dbo.Coupon.CouponId = dbo.CouponGroupRelation.CouponId  
INNER JOIN   dbo.CouponProductGroup  
 ON      dbo.CouponProductGroup.CouponProductGroupId = dbo.CouponGroupRelation.ProductGroupId  
INNER JOIN   dbo.ProductGroupRelation  
 ON      dbo.CouponProductGroup.CouponProductGroupId = dbo.ProductGroupRelation.ProductGroupId  
INNER JOIN   dbo.SubmissionCoupon   
 ON   dbo.SubmissionInvoice.SubmissionInvoiceId = dbo.SubmissionCoupon.InvoiceId  
inner join dbo.SubmissionCouponSpendRelation  
 ON      SubmissionCouponSpendRelation.SubmissionCouponId = dbo.SubmissionCoupon.CouponSubmissionId  
inner JOIN   dbo.CustomerSpend  
 ON  SubmissionCouponSpendRelation.CustomerSpendId = dbo.CustomerSpend.CustomerSpendId  
inner JOIN dbo.Product  
 ON  dbo.CustomerSpend.ActualProductId=dbo.Product.ProductId  
 and  dbo.Product.ProductId=ProductGroupRelation.ProductId  
left join  (select  ProductPackSizeAlias.ProductId,  
       MAX(ProductPackSizeAlias.PackSize) as PackSize  
    from  ProductPackSizeAlias  group by ProductId  
    ) as PackSizeAlias  
on    Product.ProductId=PackSizeAlias.ProductId  
WHERE  (DATEDIFF(S, dbo.Coupon.StartDate, CustomerSpend.InvoiceDate) >= 0)   
AND   (DATEDIFF(S, dbo.Coupon.EndDate,CustomerSpend.InvoiceDate) <= 0)    
and   CouponTypeId=1   
and   CustomerSpend.SrcMfgActualCustomerId=@ManufacturerId  
and   SubmissionInvoice.SubmissionInvoiceId=@InvoiceId  
group by CustomerSpend.CustomerSpendId,Coupon.CouponId   
select  #tb.*,  
   Restaurant.CustomerName as CustomerName,  
   Distributor.CustomerName as DistributorName,  
   Distributor.CustomerLogoBinary as DistributorLogo,  
   CL_C.Address1 as Address1_c,  
   CL_C.Address2 as Address2_c,  
   CL_C.City AS City_c,   
   USState_C.USStateName as state_c,  
   CL_C.Zipcode AS Zipcode_c,  
   CL_C.PrimaryPhoneNumber AS Phone_c,  
   CL_D.Address1 as Address1_D,  
   CL_D.Address2 as Address2_D,  
   CL_D.City AS City_D,   
   USState_D.USStateName as state_D,  
   CL_D.Zipcode AS Zipcode_D,  
   CL_D.PrimaryPhoneNumber AS Phone_D   
from  #tb  
left join Customer as Restaurant  
on   #tb.RestaurantId=Restaurant.CustomerId  
left join Customer as Distributor  
on   #tb.DistributorId=Distributor.CustomerId  
left join (select * from CustomerLocation where CustomerLocation.CustomerLocationId in (select MAX(CustomerLocation.CustomerLocationId) from CustomerLocation group by CustomerLocation.CustomerId)  
   )as CL_C  
ON   CL_C.CustomerId=#tb.RestaurantId  
left join USState as USState_C  
on   CL_C.USStateId=USState_C.USStateId  
left join (select * from CustomerLocation where CustomerLocation.CustomerLocationId in (select MAX(CustomerLocation.CustomerLocationId) from CustomerLocation group by CustomerLocation.CustomerId)  
   )as CL_D  
ON   CL_D.CustomerId=#tb.DistributorId  
left join USState as USState_D  
on   CL_D.USStateId=USState_D.USStateId  
END 
GO  
 
We really appreciate if some one from telerik team can help on this ASAP.

Thanks,
Kumar Pindiprolu.
kumar pindiprolu
Top achievements
Rank 1
 asked on 17 Jan 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?