Telerik Forums
Reporting Forum
1 answer
147 views
Hi,

I am using Telerik Reporting Q2 2009, and a bug was discovered with the date parameters.  I have two of them: Start Date and End Date, both allow nulls.

To recreate the issue, I uncheck the Null checkbox on one, click the "Go to the next month" link a few times, uncheck the Null checkbox on the other, click the "Go to the next month" link once, and I receive a System Error.  Note that I did not select a date from the first date selection.  With the calendar still open, I clicked the Null checkbox on the next date selection.

This is most reliably recreated in Safari 3

Server Error in '/' Application.

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

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.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

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.

Stack Trace: 

[ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
   System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +8623897
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +72
   System.Web.UI.WebControls.Calendar.RaisePostBackEvent(String eventArgument) +51
   System.Web.UI.WebControls.Calendar.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

Steve
Telerik team
 answered on 29 Jul 2009
1 answer
101 views
Hi,
I'm building an report that shows an order and it's order items.
As datasource I'm using an order entity with a collection that contains the items.
What is best practice for this scenario?

In reportheader section I have placed some fields like the order number, order date, the customers name, address and so on.
In page footer section I have placed info about the seller like company name, organisation number, phone.

But what about the order items, where do I put them?
Should I use a subreport, table, list?
And where/how do I bind the subreport, table, list to my order item collection?

/Mattias
Steve
Telerik team
 answered on 28 Jul 2009
2 answers
457 views
Hello,

in my line line chart I have a few hundreds data points. The label values shown for the X-axis are dates. I show only labels for the first data point of every quarter (beginning of January, April, July, ...).

Here's the code for that which is embedded in a data point loop:

ChartAxisItem chartAxisItem;  
 
if (entry.QuotesDate.Month % 3 == 1 && entry.QuotesDate.Month != oldMonth)  
{  
    chartAxisItem = new ChartAxisItem(entry.QuotesDate.Date.ToString("yyyy-MM"));  
    oldMonth = entry.QuotesDate.Month;  
}  
else  
{  
    chartAxisItem = new ChartAxisItem();  
}  
 
_gideonChart.PlotArea.XAxis.AddItem(chartAxisItem);  
 
_gideonChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270;   
 

Unfortunately "something" is shown even for the empty ChartAxisItem entries. That results in a horizontal white bar which runs right through my labels.

If you know what might cause this behavior or how to implement the above in a better way please let me know.

And how can I show major grid lines in the same selective way?

Thanks and kind regards,

Gerald
Gerald
Top achievements
Rank 1
 answered on 28 Jul 2009
5 answers
612 views

Hi,

I have created a report with the built in UI. I create the parameters programmatically in the following way:

 

ReportParameter

 

parameter = new ReportParameter();

 

parameter.Name =

"ParameterOne";

 

parameter.UI.AvailableValues.DataSource = m_dataSource;

parameter.UI.AvailableValues.DisplayMember =

"displayText";

 

parameter.UI.AvailableValues.ValueMember =

"value";

 

parameter.UI.Visible =

true;

 

parameter.UI.Text =

"please choose a value";

 

parameter.Value =

"None";

 

report.ReportParameters.Add(parameter);

 

In addition to the report i have a aspx page with a web report viewer and a button.
In the button event click I would like to read the values of the parameters as the user entered (or the default values if none were entered) and save them to my database.

I can't get to the new values, all I get is the default values.

I think if I could fire the Need_DataSource event I would be able to read the values the users chose there. But I can't figure out a way to fire the event without creating a new report and then loosing all the information I need.

Is this they way to get what I want? If so how can I fire the event. If not how can I achieve what I want?

Naphtali

Naphtali
Top achievements
Rank 1
 answered on 28 Jul 2009
2 answers
325 views
How do you hide the item label (number above the bar in a bar chart) for each series when series is created at runtime through needdatasource? 
Steve
Telerik team
 answered on 28 Jul 2009
1 answer
126 views
I down loaded the reports MSi file for Q2 2009 and ran the install.

I now have a Section in my toolbok listing Telerik Preporting Q2 2009 with 3 object in it: pointer, ReportBookControl, and ReportViewer but none of the tools shown in the demo.  Nor do I have the Telerin Reporting item in the menu bar but I do have the Telerik menu iteem for the ASP.NET tools.

Is there something else I need to do to get these?
Steve
Telerik team
 answered on 28 Jul 2009
1 answer
144 views
How do I change the name of the series programmatically for display in the legend?  (Chart Object)

I have this as my needdatasource event and every time I try to hit series(0) I get index out of range errors.   I have a datatable that always returns 3 columns of label, x, y and need to name x and y to what the user selects.  (x = sales, y =volume).  I have seen a number of examples, and tried them, but to no avail.

    Private Sub Chart1_NeedDataSource(ByVal sender As Object, ByVal e As EventArgs) Handles Chart1.NeedDataSource 
        Dim chart As Telerik.Reporting.Processing.Chart = TryCast(sender, Telerik.Reporting.Processing.Chart) 
        Dim mydt As DataTable 
        mydt = GetDTNoQ() 
        Dim mycount As Int32 = CInt(mydt.Rows.Count / 8) 
        Chart1.PlotArea.XAxis.LabelStep = mycount 
        chart.DataSource = mydt 
        'Dim mySeries As Telerik.Reporting.Charting.ChartSeries = Chart1.Series.GetSeries(0) 
        'mySeries.Name = "Sales" 
    End Sub 

Joel
Top achievements
Rank 2
 answered on 27 Jul 2009
3 answers
188 views
Hi,

I changed my web project over to using a state server rather than inProc e.g.

sessionState

 

 

mode="SQLServer"

 


Once I implemented this my parametered reports failed, ok not too much of a problem I thought, I will use parameters to pass the information into the report, and use the NeedDataSource event to collect the correct data, this has worked for everything that is bound to controls, but on a lot of my reports I programmically set the Values of some of the text boxes, this cannot be done within the NeedDataSource event because at this point the textboxes are already set (I think?),

so in the past I was able to do the following

this.txtCompany.Value ='this is a test'


in the constructor, but this now does not work because this work is now done in the NeedDataSource event, so I have tried the following

Telerik.Reporting.Processing.TextBox MyCompany = (Telerik.Reporting.Processing.TextBox)txtCompany;

MyCompany.Text = 'this is a test'

 

;

of course the Telerik.Reporting.Processing.TextBox is different to Telerik.Reporting.TextBox so it does not work.

does anyone have a solution to this problem, specifically programmically assigning values to textboxes on reports in any event after the constructor, I have maybe 20 textboxes on each report so setting an event for each textbox would be slow.


thanks in adavnce.


Alex


 





Alex White
Top achievements
Rank 1
 answered on 27 Jul 2009
5 answers
199 views

Everything works okay in Q12009, however, after I upgraded to Q2, I got "World is not Supported" error, just seeking for any suggestions.

I use the following code to generate and preview the report

Dim reportType As Type = Type.[GetType](String.Format("AgentLive.{0}, AgentLive, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", reportName))  
Dim report As IReportDocument = DirectCast(Activator.CreateInstance(reportType), IReportDocument)  
Me.ReportViewer1.Report = report 

And at report code-behind
 Private Sub dbReport_NeedDataSource(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.NeedDataSource  
        Dim report As Telerik.Reporting.Processing.Report = DirectCast(sender, Telerik.Reporting.Processing.Report)  
        report.DataSource = PrepareDBRPT(dbSource)  
    End Sub 
 
 
  Private Sub detail_ItemDataBound(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles detail.ItemDataBound  
        Dim detail As Telerik.Reporting.Processing.DetailSection = DirectCast(sender, Telerik.Reporting.Processing.DetailSection)  
        Dim section As Processing.DetailSection = TryCast(sender, Processing.DetailSection)  
'Customize something  
    End Sub 
Steve
Telerik team
 answered on 27 Jul 2009
11 answers
1.0K+ views
We've been using Telerik Reporting with a product that we have been developing for about a year. We have designed 5 or 6 reports for that product over the past several months using Q3 2008 SP1. These reports are bound to business objects that we have designed to work with NHibernate.

Today after upgrading to Q1 2009 we now get this error at design time on any report bound to an object with a nullable type such as:
'int?'

Our objects have had nullable types for quite some time now and we have never had any problems. We are excited about the new Table and Crosstab controls that were introduced with Q1 2009 and are looking forward to using them, but we must be able to bind to our business objects at design time and they must include nullable data types. 
Mattias
Top achievements
Rank 1
 answered on 25 Jul 2009
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?