Jump to content

mierlp

uniGUI Subscriber
  • Posts

    572
  • Joined

  • Last visited

  • Days Won

    35

Posts posted by mierlp

  1. Hi

     

    For some reason i got this message but can't figure out where and how

    to found out where/which form/font or wherever  this should be.

     

    Running the apps in VCL mode it's not a problem but when i use

    my browser then the message appears, see attachment.

     

    Regards Peter

    post-510-0-39914900-1362607885_thumb.png

  2. hi

     

     

    For some reason i get this message :

     

    Object O2D6 not found in session list. It could be a timeout, refresh page and try again.

     

     

    I have a mainform, which contains a mainmenu. From within the mainmenu there al call

    to a form (FormCertificate.show). This form also contains a mainmenu with a menu option 'close'

    and it closes the form.

     

    Only when clicking the menu optie i got this message. When i hit the close button on the

    form, the form will close and no error message.

     

    Regards

    post-510-0-68166900-1362346743_thumb.png

  3. hi

     

     

    THE STORY

     

    I'm try to create a web application from our native Delphi Win32 applications. Our apps is mainly used on festival and whe

    use 7 different therminal transfer printer and lot's of usb barcode scanners. For printing wristbands we use Fastreport.

     

    When a guest comes to the guest/press counter he has a invitations which contains a barcode. A employee uses a usb barcode

    scanner which is connected to the local usb port and scans the barcode and based on the barcode the record will be found.

     

    At this point the must be printed a wristband, based on a fastreport. The system knows where to print a wristband because all

    printers containing different colours wristbands and there will be printers created like Red, Yellow, Pink, Blue etc.

     

    There are two ways we can provide printing:

    1. One or more printers connected to the local usb port of a client pc

    2. setup a print server (mostly done)

     

    THE QUESTION

    Web applications is a bit new to me and mainly the printing area. Based on the above situation is it possible to

    directly print from a client pc on a printer. Printing within a Windows client application uses the local installed

    printers. Web applications  are running on a webserver, and the client is using a browser(html) which doesn't

    seems to now much about printing.

     

     

    Regards Peter

  4. Hi,

     

    Is there a way to position a panel (horizontal and vertical) on the center of the screen.

    I can'nt get by information panel (see attachment with red square) centered.

     

    Settings

    ServerModule.MainFormDisplayMode           = mfPage

    MainForm.WindowsState                                = wsMaximized

    BorderStyle                                                     = bsSingle


    Panel.Allign                                                     = None

    Panel.Alignment                                              = taCenter

     

     

     

    post-510-0-18005700-1362187204_thumb.png

  5. Hi John

     

    The example in my post  is works becaus because i use it a lot in my applications

    It show all the records which contains the entered characters ...if you search

    for the the works: Excel end when you enter : cel if finds all the records

    with this combination. It's how you use the wildcards..

     

    The example is based on MySql so it's possible there can be a other

    behavoir if u use a other database.

     

    Regards Peter

  6. Hi,

     

    I had a call at FastReport about a problem and also ask the support for uniGui.

    FastReport answered to look at FastReport Enterprise because it has server/client

    components and can be used with Apache, IIS

     

    Before installing this trail version the question...has anyone here already

    tried this solution and is it working in combination with uniGui or is there

    a other way the user can create his own report.

     

    regards Peter

  7. Your select statement was already correct but mist some '', see below

     

    Select * from Product Where Name LIKE ''' + '%' +UniEdit_Search.Text + '%'' Order By Name

  8. Hi,

     

    Wich database are you using and why not using a query component (or a filter option), both depending on the type of database
    The example below is based on a query component and the use of MySQL

     

    Normaly i do the following :

    • put a combobox, edit component and a button on the form, the combobx because the user may choose
      on wich 'field' he may search...FirstName, LastName, Address etc
    • in the editbox he enters the search info
    • the button to cancel the search and show all records

    The code below contains some Dutch (because i'm dutch)text but like messages

     

    The code for the Edit.KeyDown

     

     

    procedure TFormProdukt.UniEdit_SearchKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
      var
      SQLstring : string;
    begin
      if (key=vk_return) then begin
         // naam(0)
         if UniComboBox_SearchItem.ItemIndex=0 then begin
            SQLstring:='Select * from City Where Name LIKE ''' + '%' +UniEdit_Search.Text + '%'' Order By Name';
         end;
         // Start filter
         dmMain.Produkt.SQL.Clear;
         dmMain.Produkt.SQL.Add(SQLstring);
         dmMain.Produkt.Open;
         if dmMain.Produkt.RecordCount=0 then begin
            ShowMessage('<br/>Er zijn GEEN gegevens gevonden welke' + '<br/><br/>' + 'voldoen aan het opgegeven zoek criteria.'+ '<br/>');
            SearchFilterCancel;
         end;
         if dmMain.Produkt.RecordCount>0 then begin
            UniStatusBar.Panels[1].Text:='Filter = ACTIEF';
            UniStatusBar.Panels[2].Text:='Aantal = '+intToStr(dmMain.Produkt.RecordCount);
         end;
      end;
      if (key=VK_Up) then begin
         dmMain.Produkt.Prior;
      end;
      if (key=VK_Down) then begin
         dmMain.Produkt.Next;
      end;
    end;

     

    The code for showing all records

     

     

    procedure TFormProdukt.SearchFilterCancel;
    begin
      // Tekst van het filter aanpassen
      UniStatusBar.Panels[1].Text:='Filter = UIT';
      UniStatusBar.Panels[2].Text:='';
      dmMain.Produkt.SQL.Clear;
      dmMain.Produkt.SQL.Add('Select * from City Order By Name' );
      dmMain.Produkt.Open;
      if UniEdit_Search.Focused then
         UniEdit_Search.Clear
      else
         UniEdit_Search.Text:='Zoeken naar...';
         UniComboBox_searchItem.itemIndex:=0;
    end;

     

    The same code for using a Filter option based on DBISAM. This code was used in a Win32 applications so the components you see a

    based on Raize. You can use the code also based on uniGui and the only difference is the user of table.filter

     

     

    procedure TFormTask.RzButtonEdit_searchKeyDown(Sender: TObject;
      var Key: Word; Shift: TShiftState);
    var
      SQLstring : string;
    begin
      if (key=vk_return) then begin
         // Subject
         if RzComboBox_item.ItemIndex=0 then begin
            dmTables.Task.Filter:='LOWER(Subject) like LOWER('+QuotedStr('%'+RzButtonEdit_Search.Text+'%') +')';
         end;
         // Subject(1)
         if RzComboBox_item.ItemIndex=1 then begin
            dmTables.Task.Filter:='LOWER(Description) like LOWER('+QuotedStr('%'+RzButtonEdit_Search.Text+'%') +')';
         end;
         dmTables.Task.Filtered:=true;
         if dmTables.Task.RecordCount=0 then begin
            Application.MessageBox('Er zijn geen gegevens gevonden welke'+#10+'voldoen aan het opgegeven zoek criteria !', 'Informatie', MB_OK+MB_ICONASTERISK+MB_DEFBUTTON1+MB_APPLMODAL);
            FilterOpheffen;
         end;
         if dmTables.Task.RecordCount>0 then begin
            cFilter:='Aangepast';
            FilterAAN;
            RzStatusPanel_Aantal.Caption:='Aantal = '+intToStr(dmTables.Task.RecordCount);
         end;
      end;
      if (key=VK_Up) then begin
         dmTables.Task.Prior;
      end;
      if (key=VK_Down) then begin
         dmTables.Task.Next;
      end;
    end;

  9. Hi

     

    Question 1 : sorry i don't have the solution

    Question 2 : i don't have the code but i think it has to do with the MainForm.OnActivate or MainForm.OnCreate.
                        Normally i create a main menu with the option : LogIn, Log Out
                        So the use can select what he needs. When choosing Log In then a login screen appears and
                        after a successfull login the 'Log In' option will be disabled till he logs out

     

    Regards Peter

  10. Noby any suggestion....?

     

    When i assign it by code like below in the UniGUIServerModuleBeforeInit it works..but i

     

     

    UniServerModule.ServerLimits.SessionRestrict:=srOnePerIP;
     

     

    When using it as a variabel it' doesn't work...and all other server settings which i assign by variable

    are working...the settings are readed from a config.ini.

     

    Settings which i change and working are :

     

      UniServerModule.Port
      UniServerModule.AllowMultiIP 
      UniServerModule.LoadingMessage 
      UniServerModule.ServerLimits.MaxConnections
      UniServerModule.ServerLimits.MaxSessions 
      UniServerModule.ServerLimits.SessionRestrict
      UniServerModule.ServerMessages.InvalidSessionMessage
      UniServerModule.ServerMessages.TerminateMessage
      UniServerModule.SessionTimeOut 
      UniServerModule.Title 
      UniServerModule.UnavailableErrMsg
     

     

    regards Peter

  11. SOLVED

     

    I needed to use :

     

     

     

    procedure UniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
    var  
       IniFile : TIniFile;begin
       //Assign here my variables like
       ServerPort           :=IniFile.ReadString('SERVER', 'Port', 'Default');   
       ServerAllowMultiIP   :=IniFile.ReadString('SERVER', 'AllowMultiIP', 'Default');   
       ServerLoadingMessage :=IniFile.ReadString('SERVER', 'LoadingMessage', 'Default');
    end; 

     

     

    You may NOT call a other procedure in this BeforeInit to assign variables like this...(then you got a error)

     

    procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
    begin
       // Call here a other procedure to assing the variables   
       AssigVariables
    ;end;
     

     

     

     

    Regards Peter

     

     

  12. hi

     

    i would like to load uniServerModule setting from a .ini file like the message for

    a invalid session.

     

    Is load the .ini file settings at uniServerModule.OnCreate but

    the custom message will not be displayed only the defautl messages

  13. Hi,

     

    I load some values for the serverModule from a .ini file...so also SesstionRestrict with this code (nothing fancy)

     

    UniServerModule.ServerLimits.SessionRestrict:=Inifile.ReadString('SERVER', 
    'SessionRestrict', 'srNone');
     

    i got the following compile error:

     

    [DCC Error] MainModule.pas(91): E2010 Incompatible types: 'TUniSessionRestrict' and 'string'

     

    Also when i first assign the value to a variabel (let's say for the example TEST) i got the same error :

     

    UniServerModule.ServerLimits.SessionRestrict:=TEST;
     

     

    What type is the SessionRestrict value (not a string and integer) ?

     

    Regards Peter

  14. hi


    Just an idea...can't be bundle our experiance of uniGui in creating a "best pratice guide" for

    uniGui instead of re-invent the wheel over and over. We are already sharing information,

    got tips and tricks from eachother...but it sometimes it's not easy to find or you just need

    a guideline.


    Subject can be....or whatever you like/need:

    • Starting you first uniGui applications in 5 steps (or something like that)
    • Best pratice for 'ServerModule settings
    • Best pratice for 'ISAPI'
    • Best pratice for Printing'
    • Best pratice for 'Exporting to Excel. Html'
    • Best pratice for 'Third party components'

     


    I volunteer to collect your information, samples, code, including you credits to bundel them

    into a pdf which we can share on the forum.

     

    Regards Peter

    • Like 1
    • Upvote 1
×
×
  • Create New...