Telerik Reporting– Quick Start (Part 2)

23
Telerik Reporting – Quick Start (Part 2) Albert Kuo 1

description

 

Transcript of Telerik Reporting– Quick Start (Part 2)

Page 1: Telerik Reporting– Quick Start (Part 2)

1

Telerik Reporting – Quick Start (Part 2)

Albert Kuo

Page 2: Telerik Reporting– Quick Start (Part 2)

2

Telerik Reporting Features Report Life Cycle Best Practice Scenario Implementation Process

◦ Create a class library◦ Create a report by Wizard◦ Create a web project and add class library as its

reference◦ Create a web page to do a simple report, include

search and export

Agenda

Page 3: Telerik Reporting– Quick Start (Part 2)

3

Report designer and wizard Export to csv, pdf, excel, tiff, and mhtml Support sub reports Support barcode Report converters(one-way): Crystal

Reports, Xtra Reports, and Active Reports.

Telerik Reporting Features

Page 4: Telerik Reporting– Quick Start (Part 2)

4

Report Life Cycle

Report Design

er

Report

Class

Datasourc

e

ReportInstanc

e

Report

Cache

OutputDocume

nt

OutputDocume

nt

OutputDocume

nt

OutputDocume

ntOutput

Document

Report processor

Report renderer

Page 5: Telerik Reporting– Quick Start (Part 2)

5

The report is designed

The report is

processed

The report is rendered

Report Life Cycle – cont.

Page 6: Telerik Reporting– Quick Start (Part 2)

6

create a class library that contains your reports

Create a web project and reference that

class library

Best Practice

You can have any number of Windows or Web viewing applications that get re-use out of the same class library.

This solution structure decouples your program logic from the report and its data.

Page 7: Telerik Reporting– Quick Start (Part 2)

7

Scenario

Page 8: Telerik Reporting– Quick Start (Part 2)

8

Create a class library

Create a report by Wizard

Create a web project and add class library

as its reference

Create a web page to do a simple report, include

search and export

Implementation Process1 2

34

Page 9: Telerik Reporting– Quick Start (Part 2)

9

Create a class library1

Page 10: Telerik Reporting– Quick Start (Part 2)

10

Create a report by Wizard2

Please check Telerik Reporting– Quick Start (Part 1).pptx for further information.

Page 11: Telerik Reporting– Quick Start (Part 2)

11

Create a web project and add class library as its reference

3

Remember to set COPY TO LOCAL to True for the three dlls.

Page 12: Telerik Reporting– Quick Start (Part 2)

12

Create a web project and add class library as its reference

3

Page 13: Telerik Reporting– Quick Start (Part 2)

13

Create / Edit ReportViewer.aspx

Edit ReportViewer.cs

Do testing

Create a web page to do a simple report, include search and export

4

Page 14: Telerik Reporting– Quick Start (Part 2)

14

Create / Edit ReportViewer.aspx

Page 15: Telerik Reporting– Quick Start (Part 2)

15

Create / Edit ReportViewer.aspx

Page 16: Telerik Reporting– Quick Start (Part 2)

16

Create / Edit ReportViewer.aspx

Page 17: Telerik Reporting– Quick Start (Part 2)

17

Edit ReportViewer.cs

Page 18: Telerik Reporting– Quick Start (Part 2)

18

Edit ReportViewer.cs

Page 19: Telerik Reporting– Quick Start (Part 2)

19

Edit ReportViewer.cs

Page 20: Telerik Reporting– Quick Start (Part 2)

20

Edit ReportViewer.cs

Injects the bytes to the Response Stream

Page 21: Telerik Reporting– Quick Start (Part 2)

21

Search function

Page 22: Telerik Reporting– Quick Start (Part 2)

22

Export function

Page 23: Telerik Reporting– Quick Start (Part 2)

23

Export function – cont.