Telerik Forums
Reporting Forum
2 answers
219 views
Hi there,

Is it possible to avoid a page break to happen within DetailSection in Telerik Reports? It sometimes makes pretty funny and not very practical page breaks and for example a group footer goes to the next page. I would prefer that the new group would start completely from the next page if it does not fit to one page.

I found KeepTogether property from a group header, but it seems not to affect the sub sections (=details).

Thanks for any tips!

- Ville
Ville
Top achievements
Rank 1
 answered on 31 Jul 2009
1 answer
204 views
I am trying to create Filters at Runtime as i have some Custom Logic that needs to be developed for Our Operations Team to work.

Below ic code that i am using.
Report report = (Report)this.ReportViewer1.Report; 
        if (!Page.IsPostBack) 
        { 
            PopulateStatus(); 
        } 
 
        if (!RadDatePicker1.SelectedDate.HasValue) 
        { 
            RadDatePicker1.SelectedDate = DateTime.Today; 
        } 
         
        report.Filters.Add(new Telerik.Reporting.Data.Filter("StartTime", Telerik.Reporting.Data.FilterOperator.GreaterOrEqual, RadDatePicker1.SelectedDate.ToString())); 
         
        string temp = ComboWithCheckBoxes1.GetCommaSeparatedValues(); 
        if (!string.IsNullOrEmpty(temp)) 
        { 
            report.Filters.Add(new Telerik.Reporting.Data.Filter("BookingItemStatusId", Telerik.Reporting.Data.FilterOperator.In, temp)); 
        } 

In above Code filter at Line 12 seems to work Perfectly but the Filter set at Line 17 doesnot display any results. No results are displayed Matching Criteria,

The Filter Explressions that  i can see are

For Lin 12
{StartTime >= 29/07/2009 00:00:00} 
For Line 17
{BookingItemStatusId In 9435038e-92d3-4b89-bcef-ce37eb787936,5f6065b2-d392-4b0e-a738-f16f71f1547e,a1a8e6ea-a275-4f76-b28c-96cfe34bea11,e8fac681-1852-4b8a-adeb-328e940115ac,b5830192-a2e4-4e98-ac46-483bbcdb5a05,369b843b-48e6-479c-841e-1b2c42039be0}

Just to Let you know i have selected all Status Values. If  dont select any value results are displayed but when i select 
Janus Pedersen
Top achievements
Rank 2
 answered on 30 Jul 2009
3 answers
196 views
I followed the video tutorial on creating parameterized queries for reports but i'm having trouble replicating it for SubReports. 
The code for the subreport:
            get { return (int)sqlDataAdapter1.SelectCommand.Parameters["@WorkOrderItem"].Value; }
            set { sqlDataAdapter1.SelectCommand.Parameters["@WorkOrderItem"].Value = value; }

the code from the .aspx page:

            Reports.SubReports.WOTechnicianDetails subReport = new Reports.SubReports.WOTechnicianDetails();
            subReport.FK_WorkOrderParam1 = int.Parse(this.Id.ToString());

when I do it this way, the subreport gets the value I want, but it still only loads the default that I put in for the Sql Data Adapter under parameters.  Am I missing a place I need to refresh the report?  Any help is appreciated.

Thanks   



Sean Beaulac
Top achievements
Rank 1
 answered on 30 Jul 2009
4 answers
398 views
Hello there---

I have just begun to use the Reporting component and have been successful following the tutorials up to the dynamically binding section... I have been able to create a report that uses data from the database (by way of the TableAdapter... DataSource Wizard) and implement it within an ASP.NET web page, but now that I am trying to bind the report to a DataSet object using the code-behind, the report is no longer populating with data. No errors are thrown, it is just not populating with data. I have verified that the query string used does generate rows by going directly the SQL db and testing the query there.

I am building the DataSet in the constructor of the report and noticed in the documentation that the Preview feature will not populate the report, but even when I run the report within the context of the web app, I still do not see the data for the report. When I set the breakpoint in the constructor of the code-behind, it never hits the breakpoint, so I am not sure how to go about debugging the report itself.

Here is the code that binds the DataSet to the report.

public ProjectListWeb()  
        {  
            /// <summary> 
            /// Required for telerik Reporting designer support  
            /// </summary> 
            InitializeComponent();  
 
            //  
            // TODO: Add any constructor code after InitializeComponent call  
            //  
 
            // TODO: This line of code loads data into the 'projectDataSet.ProjectDataSetTable' table. You can move, or remove it, as needed.  
            try  
            {  
                                 
                _queryStr = @"...";  //query that returns data rows  
 
                SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings[0].ToString());                  
                SqlCommand comm = new SqlCommand(_queryStr, conn);  
                DataSet dsProjects = new DataSet();  
                SqlDataAdapter adp = new SqlDataAdapter(comm);  
                adp.Fill(dsProjects);                  
 
                this.DataSource = dsProjects;  
                this.DataMember = dsProjects.Tables[0].ToString();  
                  
 
            }  
            catch (System.Exception ex)  
            {  
                // An error has occurred while filling the data set. Please check the exception for more information.  
                System.Diagnostics.Debug.WriteLine(ex.Message);  
            }  
        } 

I have also tried just binding directly to the DataAdapter as an alternative (following the tutorial's alternative).

Any help would be great!

Thanks!

---Keith
John Shahan
Top achievements
Rank 1
 answered on 30 Jul 2009
14 answers
1.5K+ views
Since my data contains Chinese language (Asian, double-byte), the report output seems to be handled wrongly.
The font of the textbox may help?

Please help
Benson.
Steve
Telerik team
 answered on 30 Jul 2009
9 answers
140 views
Hello all,
one of the most disadvantages of Telerik Reporting solutions versus Crystal Reports is that it does not support search functionality for a specific string in the Report Tools.

so my question is there any work around for this issue, i need my users to search for a text inside a report. did anybody solved this or not yet ?

if not i have some ideas but i will need anybody from Telerik Team to help me a little.

but first, anybody answer me , is there anyone who already invented a way to search inside a telerik report viewer (mainly for windows application). i dont want to reinvent the wheel after all.

thx in advance
Maged
Top achievements
Rank 1
 answered on 30 Jul 2009
1 answer
88 views
In Telerik Reporting Q2 2009, the parameter fields that are dropdowns with checkboxes have inline styles, with overflow: hidden.  If you have more than 11 (I think) parameters in that field, you will not be able to see them.

Interestingly enough, this seems to fix it in all browsers.

.ParameterEditor {
    overflow:auto !important;
}
Steve
Telerik team
 answered on 29 Jul 2009
1 answer
126 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
71 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
389 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
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?