Copyright: Copyright ©


class_TModifiedReport
TModifiedReport Component

properties	exceptions

Author

  Bill White

  3117 Raymond Drive

  Atlanta, GA 30340

  (404)457-5348

  Compuserve Address:  73612.3477

Unit

  Rpt2

Version Info

This is version 1.0 of the TModified Report.

Declaration

TModifiedReport = class(TReport);

Description

The TModifiedReport allows you to "link" a reportsmith connection to an alias, a database, or a hard-coded path,  thus allowing you to run reports on data files in different directories without having to create multiple reports.  The TModifiedReport component also allows you to hook to a TReportManager component, which provides a level of abstraction for the location of your reports.  E.g. normally you have to specify the contains your reports in the ReportDir property, to be able to run a report.  This isn't very flexible because there is never any guarantee that your users are going to have their system set up just like yours.  Consider this example:  you are designing a system for your users and your users have the option of running a report.  So when you are designing the system, you set the ReportDir property of all your TReport components to 'c:\app\reports'.  When you go to install your system, your users decide that they want your program on the D-drive.  Now you have to go back to your office, change the ReportDir property for of ALL of the TReport components, re-compile it, and then go back over to your users office.  This is even worse if you are releasing software for general consumption.  Very fustrating indeed!  In essence, the TModifiedReport-TReportManager connection is just like the TTable-TDatabase connection;  your TTable components do not have to know anything about where the physical data tables are, just as your TModifiedReport components do not have to know anything about where your reports are physically located.

As mentioned earlier, the TModified report component inherits all of the funtionality of the TReport component.  This means that you can specify a ReportDir and ReportName and the TModifiedReport component will behave just like the regular TReport component.  However, you will probably want to use the full power of the component.  To do this, you will want to specify to which ReportSmith connection you want to "link".  You do this by changing the value of the ConnectionName property.  After that, you will want to either specify a hard-coded path, database, or alias with which the ReportSmith connection will be "linked".  To specify a hard-coded path, change the value of the NewPath property.  To specify a database or alias change the value of the DatabaseName property.  Finally, you can specify a ReportManager by settting the ReportManager property.

Because the TModifiedReport component is a descendant of the TReport component, it inherits all the methods and properties of the TReport component.  I.e. you would set all the other properties how you normally set them and then call the Run method.


prop_TModifiedReportConnectionName
ConnectionName property

Applies To

TModifiedReport

Declaration

property ConnectionName: String;

Description

The ConnectionName property allows you to specifies the connection with which you want to "link".


prop_TModifiedReportNewPath
NewPath property

Applies To

TModifiedReport

Declaration

property NewPath: String;

Description

The NewPath property allows you to specify a hard-coded path with which to connect the  ReportSmith connection that you specified in the ConnectionName property.


prop_TModifiedReportDatabaseName
DatabaseName property

Applies To

TModifiedReport

Declaration

property Database: TSymbolStr;

Description

The Database property allows you to specify a database or alias with which to connect the ReportSmith connection that you specified in the ConnectionName property.


TModifiedReport_PropertiesPopup

Properties

ConnectionName

DatabaseName

NewPath

ReportManager


prop_TModifiedReportReportManager
ReportManager Property

Applies To

TModifiedReport

Declaration

property ReportManager: String;

Description

The ReportManager property provides a level of abstraction for the location of your reports.  E.g. normally you would have to specify the ReportDir property to be able to run a report.  This isn't very flexible because there is never any guarantee that your users are going to have their system setup just like yours.  Consider this example:  you are designing a system for your users and your users have the option of running a report.  So when you are designing the system, you set the ReportDir property of all your TReport components to c:\app\reports.  When you go to install your system, your users decide that they want your program on the D-drive.  Now you have to go back to your work, change the ReportDir property for of ALL of the TReport components, re-compile it, and then go back over to your users office.  Very fustrating indeed!  In essence, the TModifiedReport-TReportManager connection is just the TTable-TDatabase connection;  just as your TTable components do not have to know anything about where the physical data tables are, your TModifiedReport components do not have to know anything about where your reports are physically located.


exception_TModifiedReportECannotReadRSFile
ECannotReadRSFile Exception

Applies To

TModifiedReport

Declaration

ECannotReadRSFile = class(Exception);

Description

The ECannotReadRSFile exception will be raised when the TModifiedReport cannot read from the 'rptsmith.con' file in the windows directory.  This file is usually created when you install ReportSmith; it contains information about the various connections that you have defined in ReportSmith.


Exception_TModifiedReportECannotWriteRSFile
ECannotWriteRSFile Exception

Applies To

TModifiedReport

Declaration

ECannotWriteRSFile = class(Exception);

Description

The ECannotReadRSFile exception will be raised when the TModifiedReport cannot write to the 'rptsmith.con' file in the windows directory.  This file is usually created when you install ReportSmith; it contains information about the various connections that you have defined in ReportSmith.


TModifiedReport_ExceptionsPopup

Exceptions

ECannotReadRSFile

ECannotWriteRSFile

EInvalidConnectionDir

 	ENoSuchReportManager

ENoReportNameSpecified


Exception_TModifiedReportENoSuchReportManager
ENoSuchReportManager Exception

Applies To

TModifiedReport

Declaration

ENoSuchReportManager = class(Exception);

Description

The ENoSuchReportManager exception will be raised when the ReportManager, specified in the ReportManger property, can not be found.  If, however, the ReportManager property is left blank, no exception will be raised.


Exception_TModifiedReportEInvalidConnectionDir
EInvalidConnectionDir Exception

Applies To

TModifiedReport

Declaration

EInvalidConnectionDir = class(Exception);

Description

The EInvalidConnectionDir exception will be raised when the TModifiedReport tries to change a ReportSmith connection's directory to a blank string.


Exception_TModifiedReportENoReportNameSpecified
ENoReportNameSpecified Exception

Applies To

TModifiedReport

Declaration

ENoReportNameSpecified = class(Exception);

Description

The ENoReportName exception will be raised if you do not specify a value for the ReportName property.