Data Warehousing and Data integration

Schedule Crystal reports generation

More
2 years 5 months ago #23111 by Kennyc
Hi ETL-tools,

AETLE 6.4.16

We need to print many reports built by Crystal reports at a scheduled date and time and inform users via email with a file path to access the reports.

We integrated these steps by coding email action in our reporting program and run it via window task scheduler.

We would like to know these steps can be integrated in AETL?

Best regards,

Kenny

 

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #23114 by Peter.Jonson
Hi Kenny

I assume that you have bat files

In this case you can run them using extrenal application action

www.etl-tools.com/wiki/advanced-etl-proc...-application-action/

1 Create new package
2 Add extrenal application action
3 Point it to your bat file
4 Schedule package for excution

We also have embed report generator simular to cristal reports

www.etl-tools.com/wiki/advanced-etl-processor/advanced/reports/
www.etl-tools.com/wiki/advanced-etl-proc...tions/report-action/

Reports can be saved as PDF or Excel files and then emailed

www.etl-tools.com/wiki/advanced-etl-proc...s/send-email-action/

 

Peter Jonson
ETL Developer

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #23176 by Kennyc
Hi Peter,

Thanks for your suggestion.

We called Crystal Report runtime object in our program to print the reports.

Thus, we tried to apply the same approach by using Pascal and place it in Script action. And the result is fine(i.e. If this script for Crystal report action is success, go to send email to users for reference, else go to send alert email to program support team for investigation).

Please find the attached wfp file for reference.

As we have many Crystal report files to be printed by task scheduler, we need to build similiar Pascal codes for these report files when using AETL and need a programmer to do this. 

We would like to know it is possible to create a Crystal report print action(i.e. allow selecting a Crystal Report file, selecting a output file) so that we can allow other non-technical persons to implement these actions codelessly in the workflow.  

Best regards,

Kenny
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #23177 by admin
Hi Kenny.

Nothing is attached.

Please zip it and add it again

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #23178 by Kennyc
Hi Mike,

Please find the zip file for reference.

Best regards,

Kenny
Attachments:

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago - 2 years 5 months ago #23179 by admin
Hi Kenny

In think in your case must simplier option is to use variables.
See the pictures attached.







You can even store the variables the database and loop over it 

Here is updated script for your convinience

var
  CrystalRFileName: String;
  ExportFileName: String;
  CrystalRApplication, CrystalReport: Variant;

begin
  CrystalRFileName := GetVariable('<CrystalRFileName>') ;
  ExportFileName   := GetVariable('<ExportFileName>')  ;
  CrystalRApplication := Null;
  CrystalReport := Null;

  try
  CrystalRApplication := CreateOleObject('CrystalRunTime.Application');
  CrystalReport := CreateOleObject('CrystalRunTime.Report');
   //Result := CrystalRApplication.GetVersion;

  except
    CrystalRApplication := Null;
    CrystalReport := Null;
  end;

  If  VarIsNull(CrystalRApplication) = False then
    begin
    try
    //Result := CrystalRApplication.GetVersion;

    try
    CrystalReport := CrystalRApplication.OpenReport(CrystalRFileName);
    CrystalReport.ExportOptions.FormatType := 31;
    CrystalReport.ExportOptions.DiskFileName := ExportFileName;
    CrystalReport.ExportOptions.DestinationType := 1;
    CrystalReport.ExportOptions.PDFExportAllPages := True;
    CrystalReport.Export(False);
     Result := CrystalReport.ApplicationName;
    except
    CrystalReport := Null;
    end;
    finally

       //Result := CrystalRApplication.CanClose;
       Result := true;
     end;
  end;
end;

Very impressive script BTW

Mike
ETL Architect
Last edit: 2 years 5 months ago by admin.
The following user(s) said Thank You: Kennyc

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save