Ejemplo n.º 1
0
        /// <summary>
        /// Constructor used when there's no Reporting UI
        /// </summary>
        /// <param name="AReportName"></param>
        public FastReportsWrapper(String AReportName)
        {
            try
            {
                LoadedOK    = false;
                FDataGetter = null;

                if (!LoadDll())
                {
                    return;
                }

                FReportName = AReportName;

                if (!LoadDefaultTemplate())
                {
                    return;
                }

                LoadedOK = true;
            }
            catch (Exception) // If there's no FastReports DLL, this object will do nothing.
            {
//              TLogging.Log("FastReports Wrapper Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Instance this object and it changes the behaviour of the ReportForm UI to use FastReports if the DLL is installed.
        /// </summary>
        /// <param name="PetraUtilsObject"></param>
        public FastReportsWrapper(TFrmPetraReportingUtils PetraUtilsObject)
        {
            try
            {
                LoadedOK          = false;
                FDataGetter       = null;
                FPetraUtilsObject = PetraUtilsObject;

                if (!LoadDll())
                {
                    return;
                }

                FReportName = FPetraUtilsObject.FReportName;

                if (!LoadDefaultTemplate())
                {
                    return;
                }

                FPetraUtilsObject.DelegateGenerateReportOverride = GenerateReport;
                FPetraUtilsObject.DelegateViewReportOverride     = DesignReport;
                FPetraUtilsObject.DelegateCancelReportOverride   = CancelReportGeneration;

                FPetraUtilsObject.EnableDisableSettings(false);
                FInitState = TInitState.LoadedOK;
                LoadedOK   = true;
            }
            catch (Exception) // If there's no FastReports DLL, this object will do nothing.
            {
//              TLogging.Log("FastReports Wrapper Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// FastReports uses this function to prepare the Dataset.
 /// The DataGetter function will be called for "GenerateReport" or "DesignReport".
 /// It should make calls back to RegisterData, below.
 /// </summary>
 /// <param name="DataGetter"></param>
 public void SetDataGetter(TDataGetter DataGetter)
 {
     if (LoadedOK)
     {
         FDataGetter = DataGetter;
     }
     else
     {
         ShowErrorPopup();
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor used when there's no Reporting UI
        /// </summary>
        /// <param name="AReportName"></param>
        public FastReportsWrapper(String AReportName)
        {
            try
            {
                LoadedOK    = false;
                FDataGetter = null;

                // we do not support FastReports in the Open Source fork of OpenPetra
                return;
            }
            catch (Exception e)
            {
                TLogging.Log("FastReports Wrapper (" + FReportName + ") Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Instance this object and it changes the behaviour of the ReportForm UI to use FastReports if the DLL is installed.
        /// </summary>
        /// <param name="PetraUtilsObject"></param>
        public FastReportsWrapper(TFrmPetraReportingUtils PetraUtilsObject)
        {
            try
            {
                LoadedOK          = false;
                FDataGetter       = null;
                FPetraUtilsObject = PetraUtilsObject;

                // we do not support FastReports in the Open Source fork of OpenPetra
                return;
            }
            catch (Exception e)
            {
                TLogging.Log("FastReports Wrapper (" + FReportName + ") Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Constructor used when there's no Reporting UI
        /// </summary>
        /// <param name="AReportName"></param>
        public FastReportsWrapper(String AReportName)
        {
            try
            {
                LoadedOK = false;
                FDataGetter = null;

                // we do not support FastReports in the Open Source fork of OpenPetra
                return;
            }
            catch (Exception e)
            {
                TLogging.Log("FastReports Wrapper (" + FReportName + ") Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Instance this object and it changes the behaviour of the ReportForm UI to use FastReports if the DLL is installed.
        /// </summary>
        /// <param name="PetraUtilsObject"></param>
        public FastReportsWrapper(TFrmPetraReportingUtils PetraUtilsObject)
        {
            try
            {
                LoadedOK = false;
                FDataGetter = null;
                FPetraUtilsObject = PetraUtilsObject;

                // we do not support FastReports in the Open Source fork of OpenPetra
                return;
            }
            catch (Exception e)
            {
                TLogging.Log("FastReports Wrapper (" + FReportName + ") Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// FastReports uses this function to prepare the Dataset.
 /// The DataGetter function will be called for "GenerateReport" or "DesignReport".
 /// It should make calls back to RegisterData, below.
 /// </summary>
 /// <param name="DataGetter"></param>
 public void SetDataGetter(TDataGetter DataGetter)
 {
     if (LoadedOK)
     {
         FDataGetter = DataGetter;
     }
     else
     {
         ShowErrorPopup();
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        /// Constructor used when there's no Reporting UI
        /// </summary>
        /// <param name="AReportName"></param>
        public FastReportsWrapper(String AReportName)
        {
            try
            {
                LoadedOK = false;
                FDataGetter = null;

                if (!LoadDll())
                {
                    return;
                }

                FReportName = AReportName;

                if (!LoadDefaultTemplate())
                {
                    return;
                }

                LoadedOK = true;
            }
            catch (Exception) // If there's no FastReports DLL, this object will do nothing.
            {
//              TLogging.Log("FastReports Wrapper Not loaded: " + e.Message);
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Instance this object and it changes the behaviour of the ReportForm UI to use FastReports if the DLL is installed.
        /// </summary>
        /// <param name="PetraUtilsObject"></param>
        public FastReportsWrapper(TFrmPetraReportingUtils PetraUtilsObject)
        {
            try
            {
                LoadedOK = false;
                FDataGetter = null;
                FPetraUtilsObject = PetraUtilsObject;

                if (!LoadDll())
                {
                    return;
                }

                FReportName = FPetraUtilsObject.FReportName;

                if (!LoadDefaultTemplate())
                {
                    return;
                }

                FPetraUtilsObject.DelegateGenerateReportOverride = GenerateReport;
                FPetraUtilsObject.DelegateViewReportOverride = DesignReport;
                FPetraUtilsObject.DelegateCancelReportOverride = CancelReportGeneration;

                FPetraUtilsObject.EnableDisableSettings(false);
                FInitState = TInitState.LoadedOK;
                LoadedOK = true;
            }
            catch (Exception) // If there's no FastReports DLL, this object will do nothing.
            {
//              TLogging.Log("FastReports Wrapper Not loaded: " + e.Message);
            }
        }