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. |
[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 |
| 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; |
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
| 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 |
sessionState
mode="SQLServer"
this.txtCompany.Value ='this is a test'
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