Jump to content

zilav

uniGUI Subscriber
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by zilav

  1. At least put something like Sleep(100) in while loop. But it is indeed a bad practice.

    I recommend to put the code you want to execute after a dialog in a separate function/method and call it within callback, that way you'll still get access to all the properties of a parent form/frame without cluttering the callback code itself.

  2. 3.Web client just apply on server side to create frp file and exec terminal application with this file path

    I don't recommend to execute anything from within a web process, that can fail under a heavy load.

    Instead create a separate service that will monitor designated directory for changes or scan it every few seconds, catch up appearance of report files and handle them.

    Even better create a web service to accept report files, and unigui will send generated reports there.

    And even more better just to have a printing web service that will accept only parameters for printing and generate/print reports itself, while unigui will be only connecting to it and sending required params. That's the ideal solution.

  3. I have FormatSettings.DecimalSeparator = ',' but UniDBGrid insists on displaying float field values using dot '.' to separate decimals. What should I put into UniDBGrid.WebOptions.DefaultFloatFormat to make it use comma? Obvious values like '0,0' doesn't change anything.

  4. Create a new calculated field, put link to the file there in OnCalcFields

    DataSet.FieldByName('download').AsString := '<a href="' + UniMainModule.GetUrlFileServer+'/?'+UniMainModule.getParameterCurrentFile + '">Download</a>'

    User will see an ordinary link in this cell which he can click.

  5. "window.open" is blocked in a lot of browsers, it is very unreliable in the modern web from my experience of dealing with users and their systems. That's why I prefer to show them a link which they click to open a new tab, this always works regardless of browser and device.

    • Like 1
  6. Generate HTML code and write it into a temporary file inside ServerModule.LocalCache folder so UniGui will clear it out when session closes. Make sure to generate unique name if user are going to print several times during session. Then show user a link to the file with "target=_blank" parameter so it would open in a new browser tab. After that user can print html page himself, or you can insert javascript code inside generated html to call printing dialog automatically.

    • Upvote 1
  7. I suggest you to use some js component that supports viewing text with line numbers and has method to focus on specific line, or scroll it into the view. You can code that yourself, but I'm pretty sure this is already available so no point in reinventing the wheel.

  8. If you enclose your text in cells using similar style

    <span style="word-wrap: break-word; white-space: pre-line;">some text</span>
    

    the browser itself will calculate the height. At least it works for DBGrid, nevert tried with StringGrid. However you can edit cells directly in dbgrid, so TClientDataSet + UniDBGrid might be a better option for you instead of StringGrid.

×
×
  • Create New...