Changing a TCrpe Report Alias at Runtime

Crystal Reports

  Previous topic Next topic  

The following code is an example of how to change the alias a report is using at run-time when using Crystal’s Delphi/Kylix/C++Builder TCrpe component:

// show report with alias it was designed with

crpe1.DiscardSavedData;

crpe1.show;

 

// set a different alias

crpe1.closejob;

crpe1.Connect.servername := 'worktest';

 

// show the report with the new alias

crpe1.DiscardSavedData;

crpe1.show;