Telerik Forums
Reporting Forum
1 answer
97 views
I have a report that is inside a class libary to seperate my code from front end. But I am at a loss how I would pass parmeters to that report from code behind it would be for the columns start date and end date I would like the end user to be able to pick from date picker and then click a view report button. I have the reportviewer showing on a aspx page, but not sure how to filter that report.
Katia
Telerik team
 answered on 18 Mar 2016
11 answers
843 views
Hi there.

I am creating a report that has a table in it. I am setting the data source for the table dynamically via the 

NeedDataSource method and I am struggling creating Row Groups.

First of all, can you confirm that this is a reasonable way to approach this problem:

My Sproc returns data similar to this:

Task #, Task Name, Qualification Method

The relationship between Tasks (# and name) to Qualification Methods is 1 to many. Meaning I have multiple Qualification methods per Task. So, what I want to do is have a single row for each task, then the next rows are the Qualification methods for a given task.

What I want it to look like is this:

Task #    Task Name
1.0           Evaluate Assembly Line Safety
                
                Qualification Methods
                Assembly Safety 101 Class
                Assembly Safety 201 Class
                Assembly Safety Certification

Task #    Task Name
2.0           Supervise Assembly Line
                
                Qualification Methods
                Supervisor Assembly Line 101 Class
                Supervisor Assembly Line 201 Class
                Harassment Class
                Supervisor Assembly Line Certification

etc.

The data comes in like this:

1.0    Evaluate Assembly Line Safety    Assembly Safety 101 Class
1.0    Evaluate Assembly Line Safety    Assembly Safety 201 Class
1.0    Evaluate Assembly Line Safety    Assembly Safety Certification
2.0    Supervise Assembly Line             Supervisor Assembly Line 101 Class
2.0    Supervise Assembly Line             Supervisor Assembly Line 101 Class
2.0    Supervise Assembly Line             Harassment Class
2.0    Supervise Assembly Line             Supervisor Assembly Line Certification

So, I thought about having a table, creating another Parent Row group to hold the Task data and then use the Detail group to hold the Qualification Methods data. I think that is a reasonable approach, but I am open to suggestions.

So, that is what I have attempted to do, but ran into some problems. When I drag a table control onto my report layout page, it automatically creates a Detail Group. I select the entire table, then select the (detailGroup) down in the Row Groups section, then right click to add a parent group. The Table Group dialog comes up and you have to create a new expression etc. I do not have any fields available to me as I do not have any data sources associated with the report. So, I just try to type in my field like this: "=Fields.Tasknumber" and another column gets created on the far left and moves the detail columns to the right. Also, no Parent Group gets created. I am not sure what it is trying to do, but could use some advice.

Thanks, Mike

Update:
After struggling with this some more, it looks like the tool is trying to create a parent group based on the detail group cells you select. I still dont quite get it, so if someone could walk me through creating a table from scratch with the appropriate parent/detail groups based on the above scenario, that would be great. I have read through all of the KB articles, documentation and related Forum posts and it seems like I almost get it...

Thanks again, Mike

Stef
Telerik team
 answered on 18 Mar 2016
1 answer
126 views

Reporting Version = Q3 2014

I created a A4 report with chinese font style (微軟正黑體), but the file size of exported XPS is around 3-4MB.

if under the circumstance of fixed font-style , how can I minimum the file size?

According to what I have found , the FontEmbedding config is for  PDF device only, any similar config for XPS device?

 

Katia
Telerik team
 answered on 18 Mar 2016
1 answer
101 views

Hi, I need help.

 

I am using c #, and I'm working on a report which I have an object table which I want to fill a DataTable by code, I tried this way but it did not work.

 

DataTable table = new DataTable("patients");
table.Columns.Add("name");
table.Columns.Add("id");
table.Rows.Add("sam", 1);
table.Rows.Add("mark", 2);
table1.DataSource = table;

prints the rows that have this datatable(2), but empty.

 

Nasko
Telerik team
 answered on 18 Mar 2016
2 answers
219 views
Hi there,

trying to make the HTML5 Report Viewer work in ASP.NET MVC4 accotding to this tutorial "http://www.telerik.com/help/reporting/mvc-report-viewer-extension-embedding.html", it works all fine,only that the report viewer icons are not showing and the styling of the viewer is also messed up. Iinstalled the FontAwsome package via NuGet. Any ideas?

zwa
Aureo
Top achievements
Rank 1
 answered on 17 Mar 2016
3 answers
213 views

I have been trying to create a financial aging report.  To do that, I have used a db2 sql with "days(date(@ARDATE as date)) - days(date(of char string for ar dates) as invoicedays".  The ARDATE is a datetime report parameter.

This statement works fine in the Execute Query option as well as the Report Designer Preview.  Unfortunately, when the report is published to our database, the invoicedays values show as zero. 

If I replace days(date(@ARDATE as date))  with days(current date), the calculation of days shows the correct values when published.

Note: The @ARDATE works with <=, >= or between in db2 sql so I think the format of data from the datepicker is '2016-03-10:hh:mm:ss'. 

Note: I can also change the parameter type to string and use csv data source as '2015-12-31, 2016-01-31,2016-02-29, etc to get the report to work.

How do I get the report to accept the @ARDATE from within the sql statement?

Stef
Telerik team
 answered on 17 Mar 2016
1 answer
121 views

Hi,

I currently use images generated via a DevExpress chart component for my reports.  The reason for this is that historically I have not been happy with the look of the charts that have been generated.  I have completed a Material Design reworking of my site and now want to get the charts to have a material design look and feel. The good thing here is that the material design is considerably more simple in appearance than the old look of charts that I had.  Side benefit is that I will then only rely on Telerik controls and can ditch some more dlls!

So I want to use the Graph component that is built into the reporting.  I have the following initial questions:

1) Is there any connection between the Graph, Kendo UI charts and ASP.NET charts?  I'm interested as the examples shown on Kendo/ASP.Net have more detail so if they are related I'd know that functionality in one might be in the other.

2) Styles.  I'm now using style sheets for reports and it would be nice to use them on the graphs.  So for example I am using Calibri as my principle font on reporting and would like any titles, legends, data labels etc to use that.  Is this possible?

3) Is it possible to have better legend placement for the pie chart - the existing one doesn't seem great when dealing with small data slices.  I suppose that is the perpetual issue with pie charts though.  

4) Could I request that some better demos/samples be made available.  The docs are fairly basic with not much in the way of data relating to advanced customization of the charts.

Regards

Jon

Stef
Telerik team
 answered on 16 Mar 2016
1 answer
382 views

in the official demo Dashboard.trdx report file, it defines two datasources:

1. yearDataSource

2. mainDataSource

 

I am trying to render the report as pdf with the ability to update the data source from the code (runtime), like this:

 

static void SaveReport(Telerik.Reporting.Report report, string fileName)
        {
            ReportProcessor reportProcessor = new ReportProcessor();

            Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.ReportDocument = report;
            
            RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);

            using (FileStream fs = new FileStream(fileName, FileMode.Create))
            {
                fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            }
        }

 

 

it only allows me to set the report.DataSource, not sure how to update all the data sources (yearDataSource & mainDataSource).

 

Can I just pass a dataset with 2 tables (named "yearDataSource" & "mainDataSource")?

 

Stef
Telerik team
 answered on 16 Mar 2016
4 answers
385 views

Hi Team,

I am new in Telerik and i dont know , how to create a report in which we can use variable and fuction .I want to create a daily ,weekly and montly collection report .Suppose i have a date , country and amount fields.

Now i want to create a report in which i have to show daily ,Weekly and Montly collecion against country wise.    

 

Plaese suggest me.

Thanks,

Narender

Stef
Telerik team
 answered on 16 Mar 2016
8 answers
632 views
Hi

I have seem this thread from early 2009:

http://www.telerik.com/community/forums/reporting/telerik-reporting/print-parameters-on-report.aspx 

It indicates that it is not possible to trap the parameters and show them in a report at runtime. To relate this to my situation, I have a report which is being used as the basis of billing for services. Billing is conducted for different date ranges so I have start and end date parameters in my report. Finance have asked me to include these dates in the report so clients can see the billing period. Unless I have misinterpreted the response in the attached thread and if nothing has changed in the interim, am I right in saying there is no way I can capture these two parameters and include them in my report?

thx

Michael
Andrew Angell
Top achievements
Rank 2
 answered on 16 Mar 2016
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?