Telerik Forums
Reporting Forum
3 answers
210 views
I am new to the Telerik suite and am just learning the ropes on creating Telerik reports.

I have a SQL Server stored procedure that outputs number of minutes (using datediff() function in SQL).  That is to be a signed integer.   My result set would look like this:
Date            Name        TotalMinutes
1/1/2011     Jim            20
1/2/2011     Jim            15
1/3/2011     Jim            30
1/4/2011     Jim            5 

I have a report setup to display the data just as it appears above. In a grouping footer I have it SUM the minutes to get a total (e.g. 70).  I created a user function that takes that value and adds 10 to it.  So, the expression for my textbox field in the footer is as follows:  = AddMinutes(Sum(Fields.TotalMinutes)), which given my example should return 80 for Jim

My user function is defined in a class file (DateFunctions.vb):

Public Shared Function AddMinutes(byval TotMinutes as Integer) as Integer
    return TotMinutes+10
End Function

I am not using any code-behind on the report itself.  I am just putting an Expression in through the GUI.  When I try to run this I get a Undefined Function error in the report.  I tried calling it as =DateFunction.AddMinutes(Sum(Fields.TotalMinutes)) and just as =AddMinutes(Sum(Fields.TotalMinutes)), but I keep getting the same error.

Please Help as I am stuck!
Steve
Telerik team
 answered on 20 Jan 2011
0 answers
103 views
Hi

i have a Telerik Report Service project that has a dfew telerik reports. i can browse to the service and all works fine.
i've added this service as a service reference to my web application.
TelerikReportServiceClient.ReportService.ReportServiceClient client = new TelerikReportServiceClient.ReportService.ReportServiceClient();
  
List<TelerikReportServiceClient.ReportService.ReportInfo> reports = client.ListAvailableReports().ToList();

 

i can run the above code and have a list of report in "reports ". the problem is that the list is meanless to me because i cannot create an instance of any of the reports.
unlike in the silverlight report service (http://blogs.telerik.com/evanhutnick/posts/10-02-11/understanding_the_telerik_reporting_wcf_service.aspx)
that has an event.

 

ServiceClient = new ReportServiceClient(ReportViewer.EnsureAbsoluteUri(new Uri("../ReportService.svc", UriKind.RelativeOrAbsolute))); 
  
            ServiceClient.ListAvailableReportsCompleted += new EventHandler<ListAvailableReportsEventArgs>(ServiceClient_ListAvailableReportsCompleted); 
  
void ServiceClient_ListAvailableReportsCompleted(object sender, ListAvailableReportsEventArgs e) 
        
            this.MyReports = e.Reports; 
    
            // Decide which report to load, or place them into a RadComboBox to let the user select different reports! 
            if (this.MyReports.Count > 0) 
            
                this.xReportViewer.Report = this.MyReports[1].FullName;                 
            
        }

Basically i need to know how to get the actual telerik reports or an instance of them that are in my reportservice project.
any help will be greatly appreciated.

Thanks
Avesh

Avesh
Top achievements
Rank 2
 asked on 20 Jan 2011
6 answers
748 views
Hi,

I have installed Reporting Q3 2009 on Windows 7 and using it in VS 2008, SQL 2005 and .Net 3.5 environment. I have created Reports class library and created a report which runs fine when I previewed it. However, when I added it to the web project, I keep getting "an item with the same key has already been added" on the line below
            RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null);
I have used ReportViewer and also tried exporting programmatically to PDF format.

Any help is greatly appreciated.

Thanks,
Bhargavi.
Preston
Top achievements
Rank 1
 answered on 20 Jan 2011
0 answers
111 views
I'm building custom modules on DNN and would like to use Telerik Reporting for reports. I'm trying to figure out how to set up and configure my development environment. I'm using VS 2008 and created a solution with two projects, as per the best practices documentation, one with my DNN website (this is a Website not a Web Application) and one for telerik reports. The custom code in the DNN website has two sepeperate namespaces (for the various custom modules) and a couple of different Linq datacontext's each under a unique namespace. I'm trying to figure out how to reference the linq datasources from the telerik reports project. If I'm going about this the wrong way please point me the right direction.

It'd be great if Telerik had some detailed documentation on using the Reporting prodcut with DNN since they've included telerik controls with the standard DNN install.

Thanks, all help is appreciated.
Tim
Top achievements
Rank 1
 asked on 20 Jan 2011
1 answer
176 views
My report has as DataSource a stored procedure that needs some parameters in order to be executed.
The parameters should be applied by the user.

Both the disscussed parameters has store procedures as their datasource and are multiselectable.

The selected values of the first parameter should be combined to a string with ',' between the values,
That will be used as input to another sqlDataSource store procedure which is used in the DataSource
of a second report parameter.

I need to combine the values of the first parameter to 1 string, and to refresh the seconed datasource when the first was updated.

// First parameter: 
this.StorageSystemDataSource.ConnectionString = "...";  
this.StorageSystemDataSource.Name = "SystemDataSource";  
this.StorageSystemDataSource.SelectCommand = "dbo.GetSystemType";  
this.StorageSystemDataSource.SelectCommandType = Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure; 
    
// Second parameter: 
this.SystemNameDataSource.ConnectionString = "..."; 
this.SystemNameDataSource.Name = "SystemNameDataSource"; 
this.SystemNameDataSource.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] { 
new Telerik.Reporting.SqlDataSourceParameter("@SystemTypes", System.Data.DbType.AnsiString, "=IIF(Parameters.SystemTypeParameter.Value(0) = -1, Nothing, Join(Parameters.SystemTypeParameter.Value, \",\"))")}); 
// is that the way to combine the values????
    
this.SystemNameDataSource.ProviderName = "System.Data.SqlClient"; 
this.SystemNameDataSource.SelectCommand = "dbo.GetSystemByTypes"; 
// I need to reactivate this stored procedure on each selection changes of the first parameter values.
this.SystemNameDataSource.SelectCommandType=Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure;
Peter
Telerik team
 answered on 19 Jan 2011
3 answers
146 views
I am currently exporting reports programmatically to pdf and recently have come up with a requirement where we need to export only a single or defined range of pages and not the entire report to the output pdf file. Is there anyway programmatically to only export 1 page or a range of pages ?

Steve
Telerik team
 answered on 19 Jan 2011
0 answers
103 views
Hy, I'm making Payment slip report, I have MultiValue Parameter that starts from let's say A to C and every value have it's Id. Now I'm doing some MOD calculations with this Id's and it gives me different integer values based on selection, but the problem is when it come to C it uses it's value as final one and populates all data in the report with this value witch is no OK. I need to pass changing parameter based on Id and it's calculated value. Example: name A has Id 1 and has value 4, name B has Id 2 and value 2 etc. It should use parameter 4 for name A, Id 1, parameter 2 for name B, Id 2 and so on. Basically every name should have it's own unique calculated value on the report. Is this possible Thank you Aljosa
Aljosa
Top achievements
Rank 1
 asked on 19 Jan 2011
6 answers
365 views
Hi,

Just wondering if distinct count function has been implemented?   I need a way to do a distinct count on a group level, is there any alternative I can try?

Thanks,

Scott
Steve
Telerik team
 answered on 19 Jan 2011
5 answers
731 views

 

Hello Telerik Team,

I have a requirement to bind two data sources to a single report.I was trying some of your blogs to do that.

The method i used to display a subreport in a main report is as follows:

1>Created a report called "X" and put some fields in it and binded the datasource to that report and build it..its  working fine....As of now,I am not using any parameters.

2>I created another report called "Y" and from the tool box i dropped subreport item and
in the properties section I have selected the report source property as "x".

When i build the report "y" i get the error "Type name x-subreport does not exist in the type "Projectname"

I  tried using Need datasource event and it says the same error.dO i need to add anything to the project file.?

Please let me know.

Can you list the way step by step.
I am unable to achieve it.

Can you send me a sample to do that.

Thank you,
Smith

Steve
Telerik team
 answered on 19 Jan 2011
0 answers
113 views
Hello Telerik community!
I just downloaded the trial version of the reporting software and I am evaluating the product to see how it fits our needs.

Here is the issue #1: we have a report in a spreadsheet format, and the columns that go to the report are code-controlled. Therefore it is not possible to use the visual report designer to fully design the report. Everything must be done by code.
There can be any number of columns, even say 40 columns, and they must fit the page width. The only possible way to do it is to programatically scale the report to fit the output page width (for example 10 inches). In other words, the report is code-created by adding the columns without knowing the total sum of the column widths, and then at the end the total output is scaled to the output page width to fit it in. This is what we do in the MFC version of our software using Ruguewave/Stingray grid. Stingray grid is supporting the scaling feature and it would be nice if Telerik did the same. Is it possible? If yes, is there documentation and code sample to help me do it?

Thank you in advance for your help,
Cezar Mart
Cezar
Top achievements
Rank 1
 asked on 18 Jan 2011
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?