Telerik Forums
Reporting Forum
1 answer
196 views
Hi all,

In my group footer(s) I am displaying averages (using Avg). However, I need these averages to exclude any zero and null values in the detail lines. How do I go about doing that?

Lucien Dol
QicSoluciens
Wellington, New Zealand

(Telerik Reporting Q1 2011 v5.0.11.316)
Peter
Telerik team
 answered on 01 Apr 2011
2 answers
318 views
Hello all.

I am trying to setup a report book (programmatically) to load in three reports into a web viewer.  Each report is one page of a large 3 page report that I am trying to duplicate here.  I had to break it up because each page had different page setting (mainly the orientation).  Now I am hoping to read a table and print all three reports for each record of the table (thus producing a three page report for each record).  At some point I will pass an ID variable to each report for every record.

I started out with the following code but get an error that the reports are not declared (the OFC21, OCF21b, and OFC21c reports).

        Dim reportBook As New ReportBook()
        reportBook.Reports.Add(OFC21)
        reportBook.Reports.Add(OFC21b)
        reportBook.Reports.Add(OFC21c)

Then I tried to create the report object first and then pass it to the report book but I get the same error when I try to declare the reports.

        Dim reportBook As New ReportBook()
        Dim rOFC21 As New OCF21()
        Dim rOFC21b As New OCF21b
        Dim rOFC21c As New OCF21c

        reportBook.Reports.Add(rOFC21)
        reportBook.Reports.Add(rOFC21b)
        reportBook.Reports.Add(rOFC21c)


At this point I have no idea why it is having an issue reading the reports.  The reports were created in a class library project and the dll was brought into this one.

Funny thing is, if I drop a report book control on the page and try and add the reports through there, it sees the reports without and issues. 


Any help would be much appreciated.

Paul.

Paul Henriques
Top achievements
Rank 1
 answered on 01 Apr 2011
6 answers
221 views
Is there a way to initially display the document map when exporting to PDF.
I saw in the documentation that the report viewer has a property "DocumentMapVisible" that set this. I'm not using a report viewer, I export to PDF. When the pdf opens the document map is not initially displayed.
Squall
Top achievements
Rank 1
 answered on 01 Apr 2011
1 answer
94 views
Using the multi-column feature, I have created a labels report that displays 30 labels per page (3 across 10 down).  However, after 11 pages, the report starts displaying only 29 labels 10 in the first column, 10 in the second and 9 in the third.  From then on, it displays 29 per page for the rest of the report.  It does this for both PDF and RTF formats and if I print it directly from the report viewer.  There does not appear to be anything different about the addresses on page 12 so I am not sure why this would be happening.  Any suggestions?

thanks!
Peter
Telerik team
 answered on 01 Apr 2011
1 answer
406 views
I'm getting the following error in all Telerik reports in a .NET 4.0 web app I have recently taken over from somebody else who has resigned. Thus far I've had success by installing required MSI files and removed hard-coded versions in web.config files and adding references to the DLL files. But this approach hasn't worked for Telerik ReportViewer. Am I missing something? I've installed Reporting Q3 2010 and added references to Telerik.Reporting.dll and Telerik.ReportViewer.WebForms.dll and also ticked quite a few related namespaces below these references in the properties for the solution, but am getting nowhere. I have never used Telerik before but like what I see so far, apart from these errors :-(

Here's the error (and thanks):

 

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'telerik:ReportViewer'.

Source Error:

Line 3:  </asp:Content>
Line 4:  <asp:Content ID="Content2" ContentPlaceHolderID="cphReport" runat="server">
Line 5: <telerik:ReportViewer ID="ReportViewer1" runat="server" Report="ReportsLib.SummaryByActivity, ReportsLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Line 6:          Skin="Office2007" Width="100%" Height="700px" DocumentMapVisible="False" 
Line 7:          ShowZoomSelect="True">

Source File: /MyReport.aspx    Line: 5


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Marc Fearby
Top achievements
Rank 1
 answered on 31 Mar 2011
1 answer
239 views
I am using Reporting Q2 2010. In this release, is it possible to detect which rows of a table are rendered as the first row and the last row of each rendered page of a rendered report?
So, e.g., if I have a table of five rows of which the first three rows are rendered on the first page of the rendered report and the last two rows are rendered on the second page of the rendered report - then is it possible to detect that the first and fourth row are rendered as the first row and the third row is rendered as the last row on their respective rendered pages?
Peter
Telerik team
 answered on 31 Mar 2011
1 answer
152 views

Hello.

I am using Telerik Reporting Q1 2011 version.

When I drop the crosstab control on the design surface of the report, the crosstab wizard does not open/display at all. How do I get it to open.

Thank you.
Francis

Peter
Telerik team
 answered on 31 Mar 2011
2 answers
119 views
Hi I'm working on a webproject and using telerik reporting to display custom reports.

I have the following Solution Structure..

-Solution
 + Web Project (Web)
 + Class Library (Reports)

I have designen a report that takes dynamic parameters and builds multivalue parameters from what has prev been selected.

So in the report i have a first parameter Page, page is not a multivalue. When a page is selected say you select ID 5, the second parameter takes the selected value and calls and stored procedure with the first parameters value as a parameter passed to the sp. Here everything is ok. However when it comes to the second parameter which is a multivalue. I have choosen so that the third parameter takes the selected values of the second and calls an sp with the values. To get the values i am using a userfunction like below
public static string FormatArray(object[] array)
       {
           StringBuilder sb = new StringBuilder();
           foreach (object o in array)
           {
               if (sb.Length > 1)
               {
                   sb.Append(", ");
               }
               sb.Append(o.ToString());
           }
           return sb.ToString();
       }

In the Report Preview & Html Preview this works perfect and everything is displayed and bound as it should be..

However when migrating this report to my web solution I have the following setup.

Enheter.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Enheter.ascx.cs" Inherits="Web.controls.Reports.Enheter" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=5.0.11.316, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
    Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<telerik:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="700px"
   >
</telerik:ReportViewer>



Backend

 
Report myReport = new Rapporter.K2.Report1();
 
                myReport.ReportParameters["nkod"].Value = nkod;
                myReport.ReportParameters["sysID"].Value = BaseLogic.GlobalSystemID.intSystemID;
                using (CoreEntities db = new CoreEntities(clsBaseLogic.SqlConnEntityString))
                {
                    myReport.ReportParameters["strEnhet"].Value = db.tblTree_item.SingleOrDefault(k => k.intTreeItemID == nkod).strTreeItem;
                    myReport.ReportParameters["strPeriod"].Value = db.tblCore_Period.SingleOrDefault(k => k.intPeriodID == BaseLogic.intPeriodID).strDescription;
 
                }
                ReportBook book = new ReportBook();
                book.Reports.Add(myReport);
                ReportViewer1.Report = book;


This is just because I want to set some parameters before making the report..


Everything shows up as it should but when trying to select a value inside my second parameter , the third parameter who uses my userfunction displays the following error.

The expression contains undefined function call FormatArray().
 
at Telerik.Reporting.Expressions.FunctionNode.Eval(Object row, Object context)
at Telerik.Reporting.Processing.Data.MultidimensionalQueryProvider.Evaluate(Object value, Object data)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.GetEvaluatedParameters()
at Telerik.Reporting.Processing.Data.SqlQueryProvider.GetCommandParameters(Boolean evaluateParameters)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection)
at Telerik.Reporting.Processing.Data.SqlDataEnumerable.d__0.MoveNext()
at Telerik.Reporting.Processing.Data.ResultSet.SeedData(IEnumerable`1 rawData)
at Telerik.Reporting.Processing.Data.ResultSet.Fill(IEnumerable`1 data)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.Execute(MultidimensionalQuery query)
at Telerik.Reporting.Processing.ParametersManager`1.GetAvailableValuesData(ReportParameterAvailableValues availableValuesDef, ExpressionNode valueExpression, MultidimensionalQueryProvider& provider)
at Telerik.Reporting.Processing.ParametersManager`1.CalculateParameterValues(T parameter, ReportParameter parameterDef, IDictionary`2 parameterValues)
at Telerik.Reporting.Processing.ParametersManager`1.Calculate(T parameter, IDictionary`2 parameterValues)
at Telerik.Reporting.Processing.ParametersManager`1.CalculateChildren(T parameter, IDictionary`2 parameterValues)
at Telerik.Reporting.Processing.ParametersManager`1.Calculate(T parameter, IDictionary`2 parameterValues)
at Telerik.Reporting.Processing.ParametersManager`1.CalculateChildren(T parameter, IDictionary`2 parameterValues)
at Telerik.Reporting.Processing.ParametersManager`1.Calculate(T parameter, IDictionary`2 parameterValues)
at Telerik.Reporting.Processing.ParametersManager`1.GetParameters(IDictionary`2 parameterValues)
at Telerik.ReportViewer.WebForms.ParametersPage.OnLoadComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

the third parameter datasource is an sp with the following parameters inserted -> = FormatArray(Parameters.survFieldsGroup.Value)
Parameters.survFieldsGroup being the second parameter.

It seems the report doesnt know where the userfunction is when it has been migrated to the reportbook.

How can i fix this?

Anders
Peter
Telerik team
 answered on 31 Mar 2011
2 answers
281 views
Hi

We're creating a reporting application that uses a shared external style sheet across a number of reports.

I'd like to create a report that lists all the styles in the stylesheet - I thought I'd try something like this in the report constructor (pseudo code only):

Add the stylesheet file to the reports
Use the collection of styles as an object data source
Create a conditional formatting rule that uses a named style for each row.

I can't find a way to enumerate the styles that are added by external style sheet - this is my code in the report constructor:

ess = new ExternalStyleSheet(path);
ExternalStyleSheets.Add(ess);
 
foreach (StyleRule style in StyleSheet)
{
    //do something with styles;
}

no styles are found by the foreach loop...

Am I doing something wrong? Can my approach work?

thanks
Andy
Andy
Top achievements
Rank 1
 answered on 31 Mar 2011
1 answer
1.5K+ views
Hi,

What is the property that needs to be set in order to position a pie chart near the left of the plot area?  Right now my pie chart is positioned in the centre of the plot area and is sometime overlapped by the legend.

So basically I want to move the pie chart image itself to the left inside the plot area allowing for more room to display the legend.

Thanks for any help.
Peter
Telerik team
 answered on 31 Mar 2011
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?