Adrotator CrystalReport - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Adrotator CrystalReport

Description:

Dynamic Crystal Report using dataset returned by parameterized query ... The Advert-xml-file contains: The ImageURL - ImageUrl Paradise.jpg /ImageUrl ... – PowerPoint PPT presentation

Number of Views:179
Avg rating:3.0/5.0
Slides: 19
Provided by: mche6
Category:

less

Transcript and Presenter's Notes

Title: Adrotator CrystalReport


1
Adrotator CrystalReport
  • Objective
  • Crystal Report ASP .net
  • Dynamic Crystal Report using dataset returned by
    parameterized query
  • Advertisement Banner with Adrotator

2
Crystal Report (ASP)
  • Steps to create a crystal report
  • Add a Crystalreportview to webform
  • Add a new item crystalreport and
  • Configure and design the crystalreport tabs
  • Connect the Crystalreportview to the
    Crystalreport

3
Crystal Report (ASP)
  • Add a new item? Choose Crystal Report
  • Choose Report Expert.
  • Configure as follows

4
Crystal Report
  • Data Choose OLE DB (ADO) ? Jet 4.0 _? Choose
    the Database.

5
Crystal Report Example
  • Data
  • Insert Tables-
  • Choose Category
  • Course

6
Crystal Report Example
  • Link (leave as default) click next
  • Fields Choose the fields from the 2 tables

7
CR - Group
  • Group report grouped in sections
  • Grouped by CategoryCode in ascending order

8
CR - Total
  • Total Choose Capacity and Fee, select
  • summary type Sum

9
CR Chart
  • Chart Click Data-Tab to choose chart placement
    Header or Footer.

10
Adding Formula fields
  • In Field-explorer, Rightclick Formulae Field
    choose New to add a calculated field Here we
    choose courseFee .9

11
CR Formula Fields
  • To re-enter the Report-Expert rightclick the
    empty space in detail section of report.
  • Drag the DiscountFee field onto the
    Details-section of report-designer.

12
Connecting Crystalreportviewer
  • Connecting Crystalreportviewer to Crystal report
    in the program.
  • In page_load sub
  • CrystalReportViewer1.ReportSource
    Server.MapPath("CrystalReport1.rpt")
  • If Not Page.IsPostBack Then
  • Me.CrystalReportViewer1.DataBind()
  • End If

13
Moving Web-Crystal report(CR)
  • When you move webapplications with crystal
    report. You need to reconnect the database for
    both the webapplication and crystal report
    separately. To reconnect the database for CR
  • Rightclick Database Field and
  • Choose Set Location. Create
  • new connection and
  • choose Replace.
  • (replacing the old
  • database)

14
Dynamic Crystal Report
  • To create dynamically generated CR, you need to
    connect the CR to dataset with parameterized
    query. Use Project Data dscourse -Course

15
Dynamic Crystal Report
  • Design the other CR designer Tabs as before. But
    choose all fields from dscourse.
  • Modify your webform dataadapter (dbcourse) by
    adding parameterized select statement. E.g.
  • select from course where (catcode ?)

16
Dynamic CR - SetDataSource
  • Create a dataadapter with parameterized query
  • Fill the dataset using the dataadapter
  • dbCourse.SelectCommand.Parameters(0).Value
    _ "SPORTS"
  • dbCourse.Fill(Me.DsCourse1)
  • Dynamically set the datasource of your CR
    (objreport) to the dataset e.g.
  • Dim objreport As New CrystalReport2
  • objreport.SetDataSource(Me.DsCourse1)
  • CrystalReportViewer1.ReportSource objreport

17
Adrotator
  • Advertisement banner can be accomplished using
    the control Adrotator.
  • Set the Adrotator.Advertisementfile
    XMLfile1.xml
  • The Advert-xml-file contains
  • The ImageURL -
  • ltImageUrlgtParadise.jpglt/ImageUrlgt
  • The NavigateURL to redirect page
  • ltNavigateUrlgthttp//www.paradiselost.co.uk/lt/Navi
    gateUrlgt
  • lt!-- The alternate text for the image --gt
  • ltAlternateTextgtVisit Microsoft's
    Sitelt/AlternateTextgt

18
Adrotator Example
lt?xml version"1.0" encoding"utf-8" ?gt
ltAdvertisementsgt ltAdgt lt!-- The URL for the ad
image --gt ltImageUrlgtParadise.jpglt/ImageUrlgt lt!
-- The URL the ad redirects the user to
--gt ltNavigateUrlgthttp//www.paradiselost.co.uk/lt
/NavigateUrlgt lt!-- The alternate text for the
image --gt ltAlternateTextgtVisit Microsoft's
Sitelt/AlternateTextgt lt!-- The relative number
of times this ad should appear --gt lt!--
compared to the others --gt ltImpressionsgt80lt/Impr
essionsgt lt!-- The topic of this ad (used for
filtering) --gt ltKeywordgtProductInfolt/Keywordgt lt
/Adgt ltAdgt lt/Adgt
Write a Comment
User Comments (0)
About PowerShow.com