Jump to content

SMARAM

uniGUI Subscriber
  • Posts

    50
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by SMARAM

  1. 9 minutes ago, Sherzod said:

    Sorry, I do not understand the sequence of your actions.
    How and when do you change the theme? 

    1) I'm changing the file "ext\build\classic\theme-neptune\resources\theme-neptune-all_1.css" with notepad.

    2) deploy the file to server

    3) restart IIS

    4) open website on user's computer.

    5) CSS is not loaded because it's cached.

    6) Need to press Ctrl + F5 to reload CSS (I would like to not press Ctrl + F5 to reload CSS).

  2. 1 minute ago, Sherzod said:

    Hi, 

    Sorry, can you please explain what you wanted ? 

    I'm changing theme like theme-neptune-all_1.css

    I would like the appplication could automatically reload css but it's using the cached css.

     

  3. Hi, is there a way to force the cached CSS to update?

    I would like to create something that when user log on my application, the application reload the cached css without manually pressing Ctrl+F5.

    Best regards.

  4. You're creating a global instance of adoquery.

     

    All objects in unigui must belong to a session and its forms.

     

    Please do not try creating objects out of a session's context.

     

    Sent from my SM-N950F using Tapatalk

     

    Hi Farshad. Thanks for your reply.

    How do you suggest to create dinamically query?

     

    Maybe this way?

    TADOQuery *query = new TADOQuery(UniMainModule());

  5. Hi, I'm having problem with access violation that starts with on a session then all others sessions give acces violation too.

    I configure logMadExcept on my project because I could not configure EurekaLog on C++ Builder.

     

    Could someone help me with any advice.

     

    This is the error and log:

     

    Access violation at address 02778904 in module 'SMARamWeb.dll'. Read of address 000104F4

     

    PS: To make things worst, it does not happen all the time.

    02778904 SMARamWeb.dll System.Classes       12744 TComponent.Notification
    02875d3e SMARamWeb.dll Uniguiserver               TUniGUIServerModule.HandleException
    028bca81 SMARamWeb.dll Uniguiapplication          TUniGUISession.HandleException
    02894546 SMARamWeb.dll Uniguiform                 TUniBaseForm.DoCreate
    770b068a ntdll.dll                                KiUserExceptionDispatcher
    0277878d SMARamWeb.dll System.Classes       12668 TComponent.RemoveComponent
    02778551 SMARamWeb.dll System.Classes       12559 TComponent.Destroy
    02a33c7b SMARamWeb.dll Data.DB              11076 TDataSet.Destroy
    02aaee91 SMARamWeb.dll Data.Win.ADODB        3517 TCustomADODataSet.Destroy
    02ab7add SMARamWeb.dll Data.Win.ADODB        6353 TADOQuery.Destroy
    770b068a ntdll.dll                                KiUserExceptionDispatcher
    02778768 SMARamWeb.dll System.Classes       12662 TComponent.InsertComponent
    02778503 SMARamWeb.dll System.Classes       12551 TComponent.Create
    02a33aab SMARamWeb.dll Data.DB              11043 TDataSet.Create
    02aaed13 SMARamWeb.dll Data.Win.ADODB        3488 TCustomADODataSet.Create
    02ab7a63 SMARamWeb.dll Data.Win.ADODB        6345 TADOQuery.Create
    015ed027 SMARamWeb.dll FuncoesUN.cpp         3582 RegistrarLogAccesso
    01e7a0cf SMARamWeb.dll ME130500.cpp          1084 TFormItemRME.UniFormCreate
    028944f5 SMARamWeb.dll Uniguiform                 TUniBaseForm.DoCreate
    02894135 SMARamWeb.dll Uniguiform                 TUniBaseForm.Create
    02897002 SMARamWeb.dll Uniguiform                 TUniForm.Create
    01e6a863 SMARamWeb.dll ME130500.cpp            38 TFormItemRME.Create
    01f43273 SMARamWeb.dll MEP30500.cpp           799 TFormRME.DBGridMaterialDblClick
    01f43c30 SMARamWeb.dll MEP30500.cpp           851 TFormRME.BtnIncluiRMEClick
    028a18b7 SMARamWeb.dll Uniguiclasses              TUniControl.DoClick
    02850694 SMARamWeb.dll Unibutton                  TUniCustomButton.DoClick
    0284ff10 SMARamWeb.dll Unibutton                  TUniCustomButton.ClickHandler
    02886f9b SMARamWeb.dll Uniguijsinterface          TUniJSHelper.HandleEvent
    028a2f59 SMARamWeb.dll Uniguiclasses              TUniControl.HandleEventIntercept
    0287159d SMARamWeb.dll Uniguisessionmanager       TUniSessionWorkerThread.ProcessEvent
    028b536b SMARamWeb.dll Uniguiapplication          TUniGUISession.ProcessEventQueue
    028b54ac SMARamWeb.dll Uniguiapplication          TUniGUISession.ProcessEvents
    0288a21f SMARamWeb.dll Uniguijsform               TUniBaseJSForm.ShowModal
    028955fb SMARamWeb.dll Uniguiform                 TUniBaseForm.ShowModal
    01ead093 SMARamWeb.dll MenuInicial.cpp       3175 TMenuInicialForm.htmlMenuAjaxEvent
    763e5448 OLEAUT32.dll                             SysAllocStringLen
    770b80e1 ntdll.dll                                bsearch
    763e6756 OLEAUT32.dll                             VariantChangeType
    763e5448 OLEAUT32.dll                             SysAllocStringLen
    0268a456 SMARamWeb.dll Vcl.Controls         11737 TWinControl.SetBounds
    027d733a SMARamWeb.dll System               14206 @ClassDestroy
    02ab7afb SMARamWeb.dll Data.Win.ADODB        6355 TADOQuery.Destroy
    015ee0e2 SMARamWeb.dll FuncoesUN.cpp         3642 RegistrarLogAccesso
    026918c3 SMARamWeb.dll Vcl.Controls         16303 TMargins.SetControlBounds
    02685501 SMARamWeb.dll Vcl.Controls          8495 TWinControl.ArrangeControl
    026857fe SMARamWeb.dll Vcl.Controls          8541 DoPosition
    027d733a SMARamWeb.dll System               14206 @ClassDestroy
    027d6cb0 SMARamWeb.dll System               13025 TObject.Free
    026918dc SMARamWeb.dll Vcl.Controls         16305 TMargins.SetControlBounds
    02685501 SMARamWeb.dll Vcl.Controls          8495 TWinControl.ArrangeControl
    02685522 SMARamWeb.dll Vcl.Controls          8497 TWinControl.ArrangeControl
    026857fe SMARamWeb.dll Vcl.Controls          8541 DoPosition
    0276b07d SMARamWeb.dll System.Classes        5588 TStrings.IndexOf
    0276c585 SMARamWeb.dll System.Classes        6272 TStringList.IndexOf
    02886df6 SMARamWeb.dll Uniguijsinterface          TUniJSHelper.FindHandlers
    028a2d6d SMARamWeb.dll Uniguiclasses              TUniControl.DOHandleEvent
    028a2f78 SMARamWeb.dll Uniguiclasses              TUniControl.HandleEventIntercept
    0287159d SMARamWeb.dll Uniguisessionmanager       TUniSessionWorkerThread.ProcessEvent
    0287178b SMARamWeb.dll Uniguisessionmanager       TUniSessionWorkerThread.Execute
    027774a6 SMARamWeb.dll System.Classes       11769 ThreadProc
    027d8838 SMARamWeb.dll System               18806 ThreadWrapper
    76007c02 KERNEL32.DLL                             BaseThreadInitThunk
    
    

    The line where it gives the error.

    post-6268-0-70382000-1535146613_thumb.png

  6. As it was said above, it is impossible

     

    And what do you want to do in the end?

     

    I have a side menu collapsible and with menus like accordion that I made with uniHtmlFrame.

    But I would like to use unigui components in it like uniComboBox and uniDateTimePicker.

    I tried with jquery replaceWith and it does work. But when I change screen size for example, the unipanel move back to it's original position.

  7.  

    Ok, the error about the default printer is gone but now it doesn't throw an exception on client but on server, it pops this error:

    "An unhandled win32 exception occurred in w3wp.exe [4408].

    The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?"

  8. Hi, is there a way to move an uniPanel into an uniHtmlFrame?

     

    Why I'm doing that?

    I have an uniHtmlFrame that I made a side menu collapsible that has "ul", "li" and "a" tags.

    I would like to move a panel into the uniHtmlFrame that has unigui components like uniDateTimePicker, uniComboBox, etc.

     

    Is there any way to do it?

  9. In this case, there is something in your report which is not compatible with uniGUI and ISAPI.

    You can try to change your pool's identity first. Change it from ApplicationPoolIndentity to LocalSystem.

     

    If a change to LocalSystem, it returns the error when I try to print my report: "there is no default printer currently selected"

  10. Hi,

     

    First of all, you have enabled the AsyncMode. Is there any reason for this? Normally, it is disabled by default.

    Reason for above behavior is that some of your requests just don't complete. They freeze so the calling thread never returns. You must find the reason for this.

     

    The Async mode is for printing QuickReport. Is there a way to identify threads that never returns? I made a test trying to print a report with too many rows and it never returns.

     

    Is there any chance that thread number grows when you request reports?

     

    Yes. I made a test and confirmed that when you have one quickreport generating, the thread grows and never get down.

  11. Hi, I'm having trouble with my isapi application that is going down when total/active threads reaches it's max like the attached image.

     

    What does make it go high and freeze application?

     

    Is there any documentation how to configure the ThreadPoolSize?

     

    All the components that I'm using in the project;

     

    - ADOComponents

    - SQL Server 2005/2008 (depends the customer)

    - Report Tools QuickReport 5.05.1 and Rave Reports 10.0

    - TClientDataSet

     

     

     

    post-6268-0-62281300-1530829659_thumb.png

  12. Hi,

     

    Yes EAppUnigui.pas is needed. Without it Eurekalog will not work. We need to provide a CPP equivalent.

     

    I was trying to convert creating a package in delphi and adding the file into it but without success :(

     

    I opened a ticket in our support portal

     

    Thank you!

    Let me know when it's done please.

    And could you send an example project in C++ Builder too (Standalone and Isapi)?

  13. Hi,

     

    As the title says, I converted a library that Mike Heydon made to export a DataSet to old format Excel file (xls) without OLE or Excel installed.

    This library now converts an UniDBGrid to Excel.

     

    Sample of usage. 

    //  Add uses UExportExcel
    
    procedure TMainForm.UniButton1Click(Sender: TObject);
    var url, filename, reportname : String;
        exportExcel: TDataSetToExcel;
        i: integer;
    begin
    	reportname := 'ExcelReport';
    	url := UniServerModule.LocalCacheURL+name+'.xls';
    	filename := UniServerModule.NewCacheFileUrl(false, 'xls', reportname, '', url);
    
    	exportExcel := TDataSetToExcel.Create(filename);
      exportExcel.Grid := UniDBGrid1;
      exportExcel.WriteFile;
      FreeAndNil(exportExcel);
      UniSession.SendFile(filename, reportname+'.xls');
    end;
    

    Hope it helps everyone. 

    UExportExcel.zip

    • Like 5
    • Upvote 2
  14. The embarcadero post refers to another post that summarizes posible workarounds for the excel issue. I tried myself without success, but maybe can help.

     

    http://troyvssharepoint.blogspot.cl/2012/07/stumbled-upon-interesting-one-today.html

     

    Thank you!

    It works now. :D

    I didn't understand the first time you replied about the Desktop folder. Everything became clear after seeing the link above.

    Do you need any help or it's already working for you too?

  15. Hi,

    A couple of days ago i've found the same issue editing an excel workbook.

    It was related to the access grants for the user assigned to run the windows service. In my case i've found a workaround in windows 7 creating the folder c:\Windows\System32\config\systemprofile\Desktop (the write access for the SYSTEM user is inherited), If yours is a 32 bits service running under a 64bits environment check the same but with c:\windows\syswow64\config\systemprofile\Desktop.

    In my case the production server is a win2008 and it didn't work, so i was forced to run the service as administrator.

     

    References:

    https://forums.embarcadero.com/thread.jspa?threadID=252184

    https://blogs.msdn.microsoft.com/dataaccesstechnologies/2012/12/19/error-microsoft-office-excel-cannot-access-the-file-while-accessing-microsoft-office-11-0-object-library-from-ssis/

     

    Good luck.

     

    I think that the problem is with access permissions too. 

    My server is Windows 2012 R2 64 bits and the application is 32 bits. The service is already running as administrator but didn't work. 

     

    I'm trying to run this other code that found on this link:

    http://forums.unigui.com/index.php?/topic/1538-not-found-excelapplication/

    But it gives the message: Access is denied, ProgID: "Excel.Application"

    procedure TMainForm.UniFileUploadCompleted(Sender: TObject;
      AStream: TFileStream);
    var
      Excel: Variant;
      WorkSheet : Variant;
      s: string;
    begin
      try
      try
        Excel := CreateOleObject('Excel.Application');
        Excel.Visible := False;
    
        memo.Lines.Add('Trying to load: ' + AStream.FileName);
        Excel.Workbooks.Open(AStream.FileName);
        memo.Lines.Add('File loaded');
        WorkSheet := Excel.Workbooks[1].WorkSheets[1];
        s := WorkSheet.Cells[1, 1];
        memo.Lines.Add(Format('[1,1]="%s"', [s]));
      except
        on E: Exception do memo.Lines.Add('Error in Excel: ' + E.Message);
      end;
      finally
        if not VarIsEmpty(Excel) then Excel.Quit;
      end;
    
    end;
    
  16. Hi there,

     

    Could anyone help me with exporting data to MSWord?

    I have a procedure that works on desktop but doesn't work when on ISAPI. It works on unigui exe too. 

     

    CoInitialize(NULL);
    
    try
    {
    Variant vMSWord;
    Variant vWDocuments, vWDocument;
    vMSWord = Variant::CreateObject("Word.Application");
    
    String vNomeArq = "";
    try
    {
    vMSWord.OlePropertySet("Visible", true);
    vNomeArq = UniServerInstance()->StartPath + "modelo.doc";
    
    vWDocuments = vMSWord.OlePropertyGet("Documents");
    
    OleVariant vFileName = vNomeArq;
    Variant vLink = Unassigned;
    Variant vReadOnly = false;
    Variant vFormat = Unassigned;
    vWDocument  = vWDocuments.OleFunction("Open", vFileName, vLink, vReadOnly, vFormat);
    
    OleVariant vTxtOld = "<NOME>";
    OleVariant vTxtNew = "FULANO DA SILVA";
    
    vMSWord.OlePropertyGet("Selection").OleFunction("HomeKey", 6);
    vMSWord.OlePropertyGet("Selection").OlePropertyGet("Find").OleFunction("Execute", vTxtOld, false, true, false, false, false, true, false, false, vTxtNew, 2, false, false, false, false);
    
    vWDocument.OleProcedure("Save");
    vWDocuments.OleFunction("Close");
    vMSWord.OleFunction("Quit");
    }
    catch (Exception &erro)
    {
    ShowMessage("Erro: " + vNomeArq + " - " + erro.Message);
    }
    
    }
    __finally
    {
      CoUninitialize;
    }
    

     

×
×
  • Create New...