Telerik Forums
Reporting Forum
5 answers
417 views

I stepped through the report event and noted that the NeedDataSource fires whenever I press preview from the Report viewer.  I do notice however, that the NeedDataSource event fires again when I do an export from the report viewer.    This event is where I set the report.DataSource, this also means that this is where I run the database queries.

I would have thought that since the report.DataSource has already been set/cached during the "preview" action (through the NeedDataSource), the "export to excel" action will not cause the NeedDataSource event to fire again.  This is a winforms application by the way so asp.net statelessness is not an issue.

You see, I have a fairly large monthly data set and it takes twice the time to preview the report and export the report because of this NeedDataSource event.

How is the NeedDataSource event triggered?  What sets the report.Datasource to nothing? 

An example of the NeedDataSource event:

 

 

 

Private Sub MonthlyAccepted_AS_MasterReport_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.NeedDataSource

 

 

 

Dim subGroupName As ISOSettlementProvisionSubGroupName = EnumUtility(Of ISOSettlementProvisionSubGroupName).Parse(Me.ReportParameters(SETTLEMENT_TYPE).Value)

 

 

 

Dim dayofMonth As Date = Date.Parse(Me.ReportParameters(MONTH).Value & " 1, " & Me.ReportParameters(YEAR).Value)

 

me.DataSource = BusinessObjects.MonthlyAcceptedASInfo.GetData(dayofMonth, subGroupName)

 

 

End Sub

Thanks.

 

 

Daniel
Top achievements
Rank 1
 answered on 06 Jan 2010
2 answers
83 views
Hi
I would like the default datetime format to mm/dd/yyyy using a format function.
for eg.
How can i change the format of  = Now()
from 1/5/2010 4:48:00PM to 1/5/2010

Regards
SUNU
sunu
Top achievements
Rank 1
 answered on 06 Jan 2010
1 answer
132 views
Is there a simple way to copy a report to use as a basis for a new report.  Right now I am creating a new report and then copying individual items from the original to the new report.  This works, but is time consuming.
Schlurk
Top achievements
Rank 2
 answered on 05 Jan 2010
3 answers
253 views
When we generate large reports (150 + pages) and then try to export those reports as PDFs, we get the following errror: Report is unavailable or session has expired.

We have increased the seession timeout to 60 in the web.config

<

 

sessionState timeout="60" />

Any ideas?

 

Steve
Telerik team
 answered on 05 Jan 2010
2 answers
250 views
Hello,

In general I am very please with telerik; however, it seems like VB.NET is an afterthought in regards to samples...

The following is the code supplied for VB.NET to connect a chart to a datasource and seems useless as far as correct code....not that it can't be modified but just a bit annoying.

This is from ms-help://telerik.reporting.3.2/Reporting/BuildingDatabindDatabase.html

Imports System  
Imports Telerik.Reporting.Chart  
 
Public Partial Class Report1  
 Inherits Report  
 Public Sub New()  
  """ <summary>  
  """ Required for telerik Reporting designer support  
  """ </summary>  
  InitializeComponent()  
 
    End Sub 
 Private Sub chart1_NeedDataSource(sender As Object, e As System.EventArgs)  
 " create a datasource  
   Dim sqlDataSource As 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" 
 Dim procChart As Telerik.Reporting.Processing.Chart = DirectCast(sender, Telerik.Reporting.Processing.Chart)  
 procChart.DataSource = "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)  
 
End Sub 
End Sub 
 End Class 


John
John S.
Top achievements
Rank 1
 answered on 05 Jan 2010
2 answers
134 views
I am trying to follow the video tutorial for using parameterized queries here, but the tutorial seems to revolve around using a SqlDataAdapter which the video shows as showing up in the Telerik Reporting menu in the toolbox, but in my Telerik Reporting Q3 2009 there is no SqlDataAdapter.

How do I get this to show up?

Help! I'm under a time crunch!!
James
Top achievements
Rank 1
 answered on 05 Jan 2010
3 answers
123 views
Hello,

Has anyone connected to Reporting Q2 2009 using Enterprise Library 4.1 DAAB?

I've reviewed the Code Examples and Videos, 22Reporting ConnectingToData however I was unable to find a way.

Are there any short online examples of this type of data connection?

Many thanks
Steve
Telerik team
 answered on 05 Jan 2010
2 answers
174 views
How di i get a report when we select only one report parameter i.e., remaining report parameters are not to be selected
Nagesh Mynedi
Top achievements
Rank 1
 answered on 05 Jan 2010
3 answers
124 views
Dear Support Please attach a example of Sample  Reporting
using Database .(Siverlight)

Thanks and Regards,
Krishna Surapaneni
Steve
Telerik team
 answered on 04 Jan 2010
2 answers
209 views
I recently downloaded the trial of the reporting component, and have created a report project in my solution with a couple of reports. Upon running the web site I get the "failed to map path" error, which upon searching I see is a security issue - http://www.telerik.com/community/forums/reporting/telerik-reporting/failed-to-map-the-path.aspx. Are you actually saying that to run your report viewer I have to run as an Administrator, when we should actively be encouraging users to run without elevated rights? Do I, and the rest of the developers, now have to Run as Admin every time, sometimes forgetting, then having to close VS and reopen it?

In the replies to the other thread you state that it's the WebConfigurationManager causing the error and that you can't touch that, which is true, but not helpful. The error is because you loop through the handlers to ensure that Telerik.ReportView.axd is present and it's that and only that, that requires elevated permissions as far as I can see. there really any reason to check that the handler is present? You could easily document the requirements for the handler; I have to add the handler anyway, so why check for its presence? There may be a very good reason why you need to check, and I'd love to hear it, but all I can see is that you throw an exception when initialising the viewer if the handler isn't configured.

I love the reporting framework you've built, but this is causing me to think again about using it.

Dave
Dave
Top achievements
Rank 1
 answered on 04 Jan 2010
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?