Why Crystal Reports? - Welcome to PUG Central

Download Report

Transcript Why Crystal Reports? - Welcome to PUG Central

Why Crystal Reports?

An alternative to Report Builder (And hashing our your own).

Dennis Voegler Bay Country Lawns

WHY?

• Report Builder is no longer supported in OpenEdge 10 –PRINTRB and PRNTRB2 still supported –If you are not running OE10 and using Report Builder, it will be a lot easier make the conversion.

Dennis Voegler Bay Country Lawns

What you will learn

• Advantages • Disadvantages • How to get started • Examples – Pure Crystal Reports – Run from 4GL • Questions?

Dennis Voegler Bay Country Lawns

ADVANTAGES:

• FREE 30 TRIAL VERSON!

• Unlimited Runtime licenses available!

• Server and Enterprise Linux versions • Third Party Support – User groups (BusinessObjects.com) – Books • Crystal Report 10 The Complete Reference • Crystal Report 11 The Complete Reference (Not yet released.) • Check out Amazon.com!

Dennis Voegler Bay Country Lawns

ADVANTAGES:

• Easy Report Design Allows Editing While Previewing – Change where items appear – Change filters – Change fonts – Add / drop objects – Drop DB or formula field into a text box – Supports Drill Down – Support for SUB-REPORTS – Static or Dynamic Reports Dennis Voegler Bay Country Lawns

We talked about drill down, but what is it?

• Drill down is used when information can be grouped together, such as customer transactions.

– Header Information (May or not show ) • Detailed transactions (Here is where you drill down, Hidden) – Footer information with totals (Shows on report, with Drill Down turned on).

– Example: Sales Tax Report Dennis Voegler Bay Country Lawns

ADVANTAGES:

• You can pass parameters to Crystal Reports or have the report prompt you for parameters with – Default values – Drop down list –

Caution! Strings are strings, and numbers numbers!

No direct way to import values from a report, but in a round about way, you could export values from Crystal Reports back to 4gl, as in a spread sheet.

Dennis Voegler Bay Country Lawns

ADVANTAGES:

• Export to various formats – PDF, CSV and Many more, see .dll sheet • Use Crystal or Basic syntax if {EOM.Over120} - {@Total Pay and Neg Chgs} < 0 then (if {EOM.Over90} - {EOM.Over120} - {@Total Pay and Neg Chgs} <= 0 then 0 else {EOM.Over90} - {EOM.Over120} – {@Total Pay and Neg Chgs}) else {EOM.Over90} • Viewed reports are ready to run, no re-compiling unless you want to before printing a report.

Dennis Voegler Bay Country Lawns

ADVANTAGES:

• Support for a 4GL Viewer – View report without leaving 4GL – Change printer settings – Refresh data – Support for drill down Example (Sales tax summary) Dennis Voegler Bay Country Lawns

ADVANTAGES:

• • Business View (Server and Enterprise) – Define your own field names – Allow end users to write their own reports without losing security.

• No need to know SQL (

But it helps

)

Ok. That’s fine. But what are the disadvantages ?

Dennis Voegler Bay Country Lawns

Disadvantages

• Cost (from the web as of 9/28/05) – Standard User ($195.00) – Professional Edition ($495.00) – Developer Edition ($595.00, Includes Runtime) – Crystal Reports Server ($7,500, 5 users & 1 Developer) – Crystal Reports Enterprise • Requires Connection to DB – Usually ODBC – May require SQL permissions be set Dennis Voegler Bay Country Lawns

Disadvantages

• Limited support from Progress • Runs slower than native 4GL • Limited array support • Character data must match format length • Table name restrictions (Cu-Ma converts to Cu_Ma) • Writing a 4GL filter is tricky Dennis Voegler Bay Country Lawns

Disadvantages

In 4GL you would code: RB-Filter-Value = “Refth.Trans-Date >= StartDate AND Refth.Trans date <= EndDate “ Becomes: Dennis Voegler Bay Country Lawns

Disadvantages

• Rb-Filter-VAlue = "~{Refth.Trans-date} in Date (" + STRING(YEAR(startDate),"9999") + ", " + STRING(MONTH(StartDate),"99") + ", " + STRING(DAY(StartDate),"99") + ")" + " to Date (" + STRING(YEAR(EndDate),"9999") + ", " + STRING(MONTH(EndDate),"99") + ", " + STRING(DAY(EndDate),"99") + ")" .

Dennis Voegler Bay Country Lawns

Disadvantages

• But you can COPY the SQL code from Crystal Reports and build your 4GL code based on it. Dennis Voegler Bay Country Lawns

How to get started

• Need to create an SQL connection with DBA provileges.

• Create an ODBC connection with a name that will be used i.e. For Crystal Report • Start Crystal Reports • Connect via the ODBC connection • Drag and drop fields Dennis Voegler Bay Country Lawns

How to get started

• If you going to use the

RunTime

: • You will need the install and register the viewer.

• Install the

merge modules

on the client using an install program like InstallShield.

•

The key with BOXI is Redistributables!

Dennis Voegler Bay Country Lawns

Dennis Voegler Bay Country Lawns

Print Crystal Report Viewer

• To get a copy of the Print Crystal Report.w and include files, Check the VAPUG web site. They will be posted later.

• •

Very

general questions can be emailed to: [email protected]

• The .i file was written by Youssif Shanshiry. (Many thanks to him for his help.) Dennis Voegler Bay Country Lawns

Something to look at

• P55350 How to display … via 4GL and Crystal Report Viewer ActiveX • P101495 Unable to add CR 11 ActiveX Controls • P100960 How to refresh a report automatically using 4GL… • P30894 How to display array fields… • P84955 How to modify selection criteria with the RecordSelectionFormula property • P101144 How to override the Select Expert • P7843 How to configure a secondary SQL Broker Dennis Voegler Bay Country Lawns

• QUESTIONS ?

Dennis Voegler Bay Country Lawns