This is a migrated thread and some comments may be shown as answers.

Parameter box disappears on preview...

9 Answers 144 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fabcom
Top achievements
Rank 2
Fabcom asked on 03 Nov 2009, 06:34 PM
The parameter box disappears when I have a dropdown parameter after pressing preview and data is not retrieved. It disappears even when there are other parameters in the box (all input types). It works with multi-select, but I cannot use that with the reports I'm trying to generate. The datasource is currently a LINQ object. It also happens with data I grab using the built in wizard.

Help!

namespace Reporting 
    using System; 
    using System.ComponentModel; 
    using System.Drawing; 
    using System.Windows.Forms; 
    using Telerik.Reporting; 
    using Telerik.Reporting.Drawing; 
    using IRWLReporting_Rules; 
 
    /// <summary> 
    /// Summary description for Report1. 
    /// </summary> 
    public partial class ActivityRegistrationReport : Telerik.Reporting.Report 
    { 
        public ActivityRegistrationReport() 
        { 
            /// <summary> 
            /// Required for telerik Reporting designer support 
            /// </summary> 
            InitializeComponent(); 
 
            try 
            { 
                this.ReportParameters["ActivityId"].UI.AvailableValues.DataSource = new Reporting_Rules().GetActivityDataForReportParamDropdown(); 
            } 
            catch (Exception ex) 
            { 
                throw ex; 
            } 
        } 
 
        private void ActivityRegistrationReport_NeedDataSource(object sender, EventArgs e) 
        { 
            Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender; 
 
            report.DataSource = new Reporting_Rules().GetActivityRegistrantsForActivityReport(Convert.ToInt32(report.Parameters["ActivityId"])); 
        } 
    } 

9 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Nov 2009, 11:41 AM
Hello Mark,

We're afraid that the provided information is insufficient for us to determine what might be the problem. You have not specified important things like, whether you're using Web or Win application and if the latter - what is the browser where this occurs and does it happen on all browsers?
Any additional information would be highly appreciated. Please note that the fastest way to pinpoint an issue is if you provide a runnable sample that replicates the problem you talk about.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert Schoenstein
Top achievements
Rank 1
answered on 12 Nov 2009, 11:45 PM
I'm having a similar issue. Basically, I turned the parameter visibility off and handled them on the web form, passing them in and refreshing the report on button postback. This only seems to happen with single select dropdown report parameters. My report viewer is on a web form.

1) Don't use a report book
2) in the page load add:
        if (!IsPostBack) 
        { 
            ReportViewer1.Report = new Reporting.Report1(); 
 
            ReportViewer1.RefreshReport(); 
        } 

3) Handler for generate button:
    protected void genarateReport_Click(object sender, EventArgs e) 
    { 
        ReportViewer1.Report = new Reporting.Report1(); 
 
        Telerik.Reporting.Report report = (ReportViewer1.Report as Telerik.Reporting.Report); 
 
        //Set Parameter values
        report.ReportParameters["StatusId"].Value = Status.SelectedValue == pleaseSelect ? null : Status.SelectedValue; 
        report.ReportParameters["AreaId"].Value = Area.SelectedValue == pleaseSelect ? null : Area.SelectedValue; 
 
        ReportViewer1.RefreshReport(); 
    } 
 



0
Steve
Telerik team
answered on 13 Nov 2009, 08:12 AM
Hi Robert,

"This only seems to happen with single select dropdown report parameters. My report viewer is on a web form."

Our Product Catalog demo report has a single dropdown parameter and is using the web report viewer - as you can see it renders just fine, so there must be something else causing this. Any additional information you have would be appreciated.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert Schoenstein
Top achievements
Rank 1
answered on 13 Nov 2009, 05:32 PM
I tried your demo and got an error in the response after changing the dropdown and clicking preview, which is basically what happens with my code (different error though):

<html> 
<head> 
<title>Error</title> 
</head> 
<body style='overflow:hidden;'
<script type='text/javascript'
window.ErrorMessage = " 
<br /> 
<br /> 
Invalid viewstate. 
<br />  Client IP: 98.172.79.4 
<br />  Port: 60186 
<br />  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) 
<br />   
ViewState: /wEPDwUBMA9kFgJmEBYEHgdvbmNsaWNrBQxGb3JtQ2xpY2soKTseBXN0eWxlBTN3aWR0aDoxMDAlO2JvcmRlci13aWR0aDowcHg7cGFkZGluZzowcHg7bWFyZ2luOjBweDtkFgJmD2QWAmYPZBYCAgEPZBYEZg9kFgJmDw8WCB4LQ2VsbFBhZGRpbmdmHgtDZWxsU3BhY2luZ2YeBVdpZHRoGwAAAAAAAFlABwAAAB4EXyFTQgKAghhkFgJmD2QWBGYPDxYEHwQbAAAAAAAASUABAAAAHwUCgAJkZAIBD2QWAmYPDxYEHg1EZWZhdWx0VmFsdWVzMtYBAAEAAAD/////AQAAAAAAAAAEAQAAAH9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5PYmplY3QsIG1zY29ybGliLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24FAAAICAkCAAAAAQAAAAEAAAAQAgAAAAQAAAAGAwAAAAJlbg0DCx4PQXZhaWxhYmxlVmFsdWVzMqEGAAEAAAD/////AQAAAAAAAAAMAgAAAGNUZWxlcmlrLlJlcG9ydFZpZXdlci5XZWJGb3JtcywgVmVyc2lvbj0zLjIuOS4xMTA0LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWE5ZDc5ODNkZmNjMjYxYmUEAQAAALYBU3lzdGVtLkNvbGxlY3Rpb25zLkdl... 
<br/> 
Unable to validate data. 
<br/> 
"; 
</script> 
</body> 
</html> 

I will post my error as soon as I get a chance to reproduce it.
0
Robert Schoenstein
Top achievements
Rank 1
answered on 13 Nov 2009, 08:11 PM
Here is the error I get (I tried <<pages enableEventValidation="true"/> in the web.config and <%@ Page EnableEventValidation="true" %> on the page itself.

<html> 
<head> 
<title>Error</title> 
</head> 
<body style='overflow:hidden;'
<script type='text/javascript'
window.ErrorMessage = " 
<br /> 
<br /> 
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. 
<br/> 
<br/> 
   at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) 
<br /> 
   at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) 
<br /> 
   at System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) 
<br /> 
   at System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)<br />   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) 
<br /> 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)"; 
</script> 
</body> 
</html> 

No matter what I try, I get the error above.
0
Steve
Telerik team
answered on 17 Nov 2009, 08:23 AM
Hello Robert,

It is highly unlikely that this error is caused by our Reporting product and we would advise you to remove all other controls from your page and leave only the ReportViewer and try again. The stack trace does not indicate a problem in any of Telerik namespaces either, so any additional feedback would be appreciated.
If still having problems after following the suggestions above, the best approach would be to open a support ticket, zip and attach a sample that shows the problem at hand.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert Schoenstein
Top achievements
Rank 1
answered on 17 Nov 2009, 06:16 PM
I have already tried creating a blank page and placing a single report book and reporting control on it. It still has the same issue.

I recommend your products to every company I have contracted with in the last 6 years (GEO911, Televerde, Fabiano Communications, and Sitewire). All the aforementioned companies have purchased one or more of your products. My company (Tesseract Solutions Corp.) does not own any Telerik products due to possible licensing issues that come with working contract positions. Therefore I cannot submit a support ticket and I cannot give detailed code samples. The best I can do is create a test project in my spare time and post it to this thread.

I just need to know why Q3 2009 is not working for my current client (Sitewire) and Q1 2009 worked for my last client (Fabiano Communications).
0
Robert Schoenstein
Top achievements
Rank 1
answered on 19 Nov 2009, 04:08 PM
We grabbed the latest dev version (3.2.9.1113)

Here is the error we get now:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDS; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Thu, 19 Nov 2009 16:05:09 UTC


Message: Expected ';'
Line: 1
Char: 142
Code: 0
URI: http://localhost:1533/Telerik.ReportViewer.axd?instanceID=a583bc2f542b4622a41f24fd1a00af26&culture=en-US&uiculture=en-US&optype=Parameters


0
Hrisi
Telerik team
answered on 20 Nov 2009, 10:26 AM
Hello Robert,

It is not possible to understand what is the problem without more technical information about the application settings and environment, the stack trace and so on.

You can take a look at possible solutions here.

If that doesn't help, send us more information about when in the
processing the error is taking place, along with the code that is being
executed when it happens.

Kind regards,
Hrisi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Fabcom
Top achievements
Rank 2
Answers by
Steve
Telerik team
Robert Schoenstein
Top achievements
Rank 1
Hrisi
Telerik team
Share this question
or