Jump to content

bahry

uniGUI Subscriber
  • Posts

    156
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by bahry

  1. Hi Farshad,

    same thing here update from 1.0.0.1425 to 1.10.0.1463 and this problem effect even 3rd party components "TUniSFBitBtn" is there any solution?

    in this component we didn't use UniImageList the image comes from the Icon font .

     

    Regards

    Bahry

  2. Hi to All,

    When I deploy my Application as an ISAPI the Image is broken.

    this error am facing in the login screen, and I placed the images under files folder.

    on formcreate

    UniImage1.Picture.LoadFromFile(UniServerModule.FilesFolderPath+'\Back.jpg');

    First Error comes from chrome JPEG Error #53 

    and in the developertools of chrome I have an error 

    Back.jpg Failed to load resource: the server responded with a status of 404 (Not Found)

     

    I changed to png image and I got the file not found error.

    Is there a specific folder I have to place the Images when deploy to ISAPI.

     

    post-1063-0-56884900-1495637749_thumb.jpgpost-1063-0-56089200-1495637764_thumb.jpgpost-1063-0-99985700-1495637776_thumb.jpg

     

     

  3. Hi,

    At long last my problems solved and here is my solution if it face any of you,

     

    - First Problem in generating and showing the PDF

    In FastReport it seems there is an AV when embedding the Font in the PDF and the font is not present in the deployed machine, so the solution for it 

    in unit frxTrueTypeCollection in (function TrueTypeCollection.LoadFont( font: Tfont) : TrueTypeFont;) at line 224, we have to add the following line at the end of the function if Result = nil then Result := ttf.

    The Result will be that some fonts will be replaced with others but at least we will have the PDF file.

     

     

    - System Hangs if run as a Service or ISAPI

    The Problem seems to be from ODAC, when I changed it to UniDAC it works without problem, in spite of both components share the same code base for connection to ORACLE DB, and both works very well as a Standalone but the connection failed when run the Application as a Service or ISAPI.

    I will report this error in Devart.

     

     

    Regards

  4. Hi Farshad,

    Development Machine:
    Win 10 Enterprise , Delphi 10.2
    Deployment Machines (as a Standalone)
    MS VPS win 2012 R2 Dataceneter - Hosted in MS Cloud
    VPS Win 2012 R2 Dataceneter - Hosted in WebKeepers
     
    I Rewrite the report from scratch with the same error.
    Made new project as a Service it hangs from the beginning as if it is not reading the variables from the ini file which is placed in the exe directory.
    in the log file I have the following msg. ( [unhandled Web]:EThread : CheckSynchronize called from thread $2CE8, which is NOT the main thread : Addr: $004D057F) 
    Run the Project as ISAPI the same as a Service hangs from the beginning.
     
    Regards
     

     

    Can you specify OS and installex software on your pc?

    Sent from my SM-N900 using Tapatalk

  5. Hi Farshad,

    There is no Anti-Virus , and here is the code

    /////////////////////////////////////////////////////////////////////////////

    in the report form
     
    procedure TStmntFrm.UniSFBitBtn1Click(Sender: TObject);
    
    begin                        
     UniSFHold1.MaskShow('Please wait... Preparing Report',
     procedure(const Mask:Boolean)
     begin
     if Mask then
       begin
         sleep(1000);//your procedure
         PrepareTheReport;
         UniSFHold1.MaskHide;
       end;
     end
     );
    end;
    procedure TStmntFrm.PrepareTheReport;
    var
     dm : TfrDM;
    begin
     dm := TfrDM.Create(nil);
     try
       UniPDFFrame1.pdfURL := dm.GenReportPDF(2);
    //   UniURLFrame1.URL    := dm.GenReportPDF(2);
     finally
       dm.Free;
     end;
    end;
    
    
    And in the ReptDM Unit
    
    
    function TfrDM.GenReportPDF(const InvNum: Integer): string;
    var
     sPath  : string;
    begin
      case InvNum of
       1:begin
         end;
       2:begin                       
          frxReport1.ParentReport := UniServerModule.FilesFolderPath+'templates\MainLand.fr3';
          sPath := UniServerModule.FilesFolderPath+'templates\Stmnt.fr3';
         end;
       3:begin                       
         end;
       4:begin
         end;   
      end;
    
    
      try
        frxReport1.PrintOptions.ShowDialog := False;
        frxReport1.ShowProgress := false;
    
    
        frxReport1.EngineOptions.SilentMode := True;
        frxReport1.EngineOptions.EnableThreadSafe := True;
        frxReport1.EngineOptions.DestroyForms := False;
        frxReport1.EngineOptions.UseGlobalDataSetList := False;
    
    
        frxReport1.LoadFromFile(sPath);
        frxPDFExport1.Background := True;
        frxPDFExport1.ShowProgress := False;
        frxPDFExport1.ShowDialog := False;
        frxPDFExport1.FileName := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', Result, True);
        frxPDFExport1.DefaultPath := '';
        (*
        frxHTML5DivExport1.ShowProgress := False;
        frxHTML5DivExport1.ShowDialog := False;
        frxHTML5DivExport1.FileName := UniServerModule.NewCacheFileUrl(False, 'html', '', '', Result, True);
        frxHTML5DivExport1.DefaultPath := '';
        *)
    
    
        frxReport1.PreviewOptions.AllowEdit := False;
        frxReport1.PrepareReport;
        frxReport1.Export(frxPDFExport1);
     //   frxReport1.Export(frxHTML5DivExport1);
      finally
        CloseDS(InvNum);
      end;
    end;
    ///////////////////////////////////////////////////////////////////////////// 

    By the way this is my first time trying to deploy the Application as a Standalone .

    on the deployed machine I install FMSoft_uniGUI_Complete_runtime_1.0.0.1391.exe as an administrator 

    then copied uniSFJS under the uni-1.0.0.1391

     

    Regards

     

    Do you have some sort of anti-virus installed on your target PC?

     

    How do you generate the PDF file?

  6. Hi,

    Here is the log file it seems a permission error, in spite of the program runs under Administrator with full permission on the folder 

    any Idea?

     

    ////////////////////////////////////////

    UniGui_Test.exe: 000393E0: 10:12:48 [TUniServerModule]:Server First Init.
    UniGui_Test.exe: 000393E0: 10:12:48 [TUniServerModule]:Erasing Cache Folder...
    UniGui_Test.exe: 000393E0: 10:12:48 [TUniServerModule]:Cache Folder Erased. <0> Files deleted.
    UniGui_Test.exe: 000393E0: 10:12:48 [TUniServerModule]:Starting HTTP Server...
    UniGui_Test.exe: 000393E0: 10:12:48 [TUniServerModule]:HTTP Server Started. Port: 8077
    UniGui_Test.exe: 0000FCB8: 10:13:54 [HandleFileRequest[127.0.0.1]]:Access denied: locale.properties.
    UniGui_Test.exe: 0000FCB8: 10:13:54 [127.0.0.1]:EFOpenError : Cannot open file "C:\Projects\cache\UniGui_Test_exe\hTu1uNTg9YFF733DFC\$z$z$z\BILGQI170502101354050.pdf". The process cannot access the file because it is being used by another process : Addr: $004BE51B
    UniGui_Test.exe: 000393E0: 10:14:26 [TUniServerModule]:Shutting Down Server.
    UniGui_Test.exe: 0003964C: 10:14:27 [indy]:EIdNotConnected : Not Connected : Addr: $00702B62
    UniGui_Test.exe: 0000FCB8: 10:14:27 [indy]:EIdNotConnected : Not Connected : Addr: $00702B62
    UniGui_Test.exe: 0001FDCC: 10:14:27 [indy]:EIdNotConnected : Not Connected : Addr: $00702B62
    UniGui_Test.exe: 000150A4: 10:14:27 [indy]:EIdNotConnected : Not Connected : Addr: $00702B62
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniServerModule]:HTTP Server Stopped.
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniGUISessionManager]:Terminating Session manager.
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniGUISessionManager]:Stopping Cache Eraser...
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniGUISessionManager]:Cache Eraser Stopped.
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniGUISessionManager]:Destroying Worker Threads.
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniGUISessionManager]:Session manager terminated.
    UniGui_Test.exe: 000393E0: 10:14:27 []:Error deleting file: "C:\Projects\cache\UniGui_Test_exe\hTu1uNTg9YFF733DFC\$z$z$z\BILGQI170502101354050.pdf" [OS Error:32]
    UniGui_Test.exe: 000393E0: 10:14:27 []:Error deleting folder: "C:\Projects\cache\UniGui_Test_exe\hTu1uNTg9YFF733DFC\$z$z$z\" [OS Error:145]
    UniGui_Test.exe: 000393E0: 10:14:27 []:Error deleting folder: "C:\Projects\cache\UniGui_Test_exe\hTu1uNTg9YFF733DFC\" [OS Error:145]
    UniGui_Test.exe: 000393E0: 10:14:27 [TUniServerModule]:Server Shutdown Completed.
    UniGui_Test.exe: 000393E0: 10:14:27 []:<-------------------------------------------------------------->
    UniGui_Test.exe: 000393E0: 10:14:27 [Terminated]:Exit Code: 0
    ////////////////////////////////////////
  7. Hi,

    Am receiving this strange error while generating a PDF file while try to load the generated PDF with (UniPDFFrame or UniURLFrame) "The process cannot access the file because it is being used by another process" in the development machine every thing works smooth without any problem, but it appears in the deployed machine and I have change to other deployed machine with the same error.

    am using the latest version of FastReport with the latest version of UniGui.

     

    Regards

     

  8. Thanks a lot, 

    it works

     

    Best Regards

     

    Hi,

     

    You can try to use this approach for now:

    uses ... uniEdit; // need to add

    forDate:

    function afterrender(sender, eOpts)
    {
        $("#"+sender.inputEl.id).inputmask("99/99/9999",{placeholder:"mm/dd/yyyy"});
    }
    

    forDateTime:

    function date.afterrender(sender, eOpts)
    {
        $("#"+sender.inputEl.id).inputmask("99/99/9999",{placeholder:"mm/dd/yyyy"});
    }
    
    function time.afterrender(sender, eOpts)
    {
        $("#"+sender.inputEl.id).inputmask("99:99",{placeholder:"hh:mm"});
    }
    

    Best regards,

×
×
  • Create New...