Jump to content

Harry Rogers

uniGUI Subscriber
  • Posts

    237
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Harry Rogers

  1. Solved

    Not to worry,setting background color as part of the same style sheet entry - found it in the Sencha docs - I have ended up with this :

    Many thanks for your help - all the best

     

     UniDBGrid1.JSInterface.JSCallGlobal(
          'Ext.util.CSS.createStyleSheet',
          ['#' + UniDBGrid1.JSName +
          '_id .x-grid-row-selected .x-grid-cell-inner { border-style: solid;  border-width: 1px; background-color: white;}',
          UniDBGrid1.JSName + '_css]);
  2. The TMS cloudpack has a barcode component that is easy to use.

    It's basically a wrapper around the barcodes4.me Restful API.  - which is free  [ http://www.barcodes4.me/apidocumentation ]

     

    - But you can use the Tunimage component as it stands and simply populate its url property like so

     

    you don't even need to encode the url

     

      http://www.barcodes4.me/barcode/qr/google.png?value=http://www.google.com

     

    works just fine! (can't find a way to stop this editor compressing the full url )

     

    the above will result in your form displaying the QR code for 'http://google.com'

  3. Current Delphi / RAD studio come with two Embarcadero frameworks - VCL and FireMonkey these allow you to build Windows (VCL) and  'cross platform' (FireMonkey) applications. Additionally you get a version of Intraweb (a third party extension) which allows you to build web apps - it's been around a longtime and some do build impressive stuff with it but it has never found that much traction - It's original architecture predates latest methods in Web development, though has worked hard to update in recent years.

    UniGUI is another third party tool for Delphi / RAD studio. It is without doubt the most productive environment you will find for producing Web Apps for someone that knows Delphi and quite possibly outside that arena also. Whilst it might look like an expensive club to get into you will get results that are hard to realise in other tools without knowing a lot of different technologies. It is a genuine paradigm shift in ease of production!

    • Upvote 2
  4. This is how  I have it set up.

     

    The user-visible form has a button, its click creates a filename and invokes the execute method of the SME Export which is on the MainModule.

     
    procedure TfrmSQLRes.btn2ExcelClick(Sender: TObject);
     var fname : string;
    begin
     fname := makeFilename('.XLS');  // construct an appropriate filename
                                     // NB this is the initial unigui-server copy before sending to users machine
     unimainmodule.SMExportToXLS1.filename := fname;
     unimainmodule.SMExportToXLS1.Execute;
    end;
     
    The properties of the export component are
    object SMExportToXLS1: TSMExportToXLS
        AnimatedStatus = False
        DataFormats.DateOrder = doDMY
        DataFormats.DateSeparator = '/'
        DataFormats.TimeSeparator = ':'
        DataFormats.FourDigitYear = True
        DataFormats.LeadingZerosInDate = True
        DataFormats.ThousandSeparator = ','
        DataFormats.DecimalSeparator = '.'
        DataFormats.CurrencyString = #163
        DataFormats.BooleanTrue = 'True'
        DataFormats.BooleanFalse = 'False'
        DataFormats.UseRegionalSettings = False
        KeyGenerator = 'Some String thast describes your app'
        Options = [soUseFieldNameAsCaption, soColLines, soRowLines, soAutoCloseStatistic]
        TitleStatus = 'Exporting...'
        Statistic.CurrentRowHeight = 0
        OnAfterExecute = SMExportToXLS1AfterExecute
        Columns = <>
        Bands = <>
        DefaultFont.Charset = DEFAULT_CHARSET
        DefaultFont.Color = clWindowText
        DefaultFont.Height = -11
        DefaultFont.Name = 'Arial'
        DefaultFont.Style = []
        DataSet = QRYGen                <<<<<<<  This is the TDataSet we wish to export
        ColumnSource = csDataSet
        FileName = 'c:\exfiles\exp1.xls'    << from memory I think it did not like an initial blank entry?
        AddTitle = True
        CharacterSet = csUnicode
        DetailSources = <>
        ExportStyle.Style = esNormal
        ExportStyle.OddColor = clBlack
        ExportStyle.EvenColor = clBlack
        UserName = 'Harry'
        Left = 168
        Top = 72
      end
     
     
    To allow the user to save the result to their own machine use the afterexecute method:
     
    procedure TUniMainModule.SMExportToXLS1AfterExecute(Sender: TObject);
    begin
     //offer the user the smExportToXLS1 Result
     UniSession.SendFile(smExportToXLS1.filename);
    end;
     
     
    All the best
  5. I get the event fired with ver 1.0.0.1376 on XE8 32bit

    I've captured the time of day at each onTimeOut for various Sesion timeouts and extend values.

    and it looks like the extend value is not used

     

    Session  Extend    Actual 

    Timeout   value      interval

    10,000    60,000   15,000

    20,000    60,000   22,000

    30,000    60,000   30,000

    60,000    70,000   60,000

  6. The latest update to my AVG business edition (ver 16.143.2.51391) has started to block a UniGui App with 'General Behavior detection' as the reason.

    Excluding the location of the implicated exe from scanning solves the issue - Heuristic scanning can be a bit over zealous.

    Luckily I have not had to convince a client's skeptical IT department with this as yet! - it's bound to happen sooner or later.

  7. Hi

     

    You can use the SessionTimeout event of MainModule.

     

    where bExtend in this example is a Boolean controlled by what ever logic you need to allow or disallow the timeout.

     

    procedure TUniMainModule.UniGUIMainModuleSessionTimeout(ASession: TObject;
      var ExtendTimeOut: Integer);
    begin
     if bExtend then
      extendTimeout := 60000; //or whatever period you need before rechecking if a timeout is appropriate
    end;
  8. I think the confusion is around what constitutes a 'webpage'.

    In UniGui you can have a pretty much unlimited number of forms (subject to server resources).

    These can be created/populated/manipulated/destroyed and displayed by server events, client side processing and user actions - From a users perspective these are effectively different webpages.

  9. I run some lightweight processes from the servermodule -  I call external processes with a few parameters derived from the servermodule with a timer. So far this has not presented any issues. One Ttable derivative on the server module filtered at intervals using a timer on the servermodule - no other processes/sessions access it.

  10. Hi

    You could perhaps use a different mechanism to place the files in a known location (i.e. somewhere the Server can get at them).

    e.g.

    FTP  (such as ICS from http://www.overbyte.beor Indy)

    Websockets  (See http://www.esegece.com/websockets/for a great library), 

    Dropbox Google etc,  TMS components amongst others

    Tonido (http://www.tonido.com/) allows you to map to space on your own internet based server as if it's a windows drive

     

    obviously it's all depending on your particular situation.

  11. I also use the SMExport suite. I've not had any issues with it.

    My export routine is pretty much as above

    the dataset in my case is an Advantage Tdataset descendant.

     

    If you add a designtime TXLSExport to  a datamodule and set its properties can you run the execute method (right click on the component) in the ide? 

×
×
  • Create New...