Jump to content

markokas

uniGUI Subscriber
  • Posts

    86
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by markokas

  1. Teamviewer  tries to restablish the connection when there is a connection issue. Ext JS returns with a timeout error.

     

    The UniGUI  version is: 0.93.1.1000

    the log file has many of:

    tracksw: 00002474: 23:46:38 [CommandGet]:EUniSessionException : invalid session

     

    Is maybe some options to make reconnection in UniGUI?

     

    br,mk.

  2. OK. It seems to be a bad internet connection indeed. uniGUI needs a stable connection to work properly.

     

    It is very interesting in the same time ("waiting requests") TeamViewer works normally ....also ping's are OK ....?

     

    br,mk.

  3. Perhaps your requests are timed out. Try increasing value of AjaxTimeout property.

     

    I did, it is no difference,

     

    It is interesting that that happens ony in connection from abroad client .... if client is from our country is no problem .....

    but if I test ping from abroad .. it seems quit stable .....

     

    it works stable 3 or 5 minute .... then requests hangs ..

     

    maybe could be some problem on port communication, I am using standalone server .. it is possible somehow to test if the communication is problem on the server port, or should be better that use ISAPI on 80 port?

     

     

    br,mk.

  4. Your case is not related to bad connection. Somehow your request hangs and doesn't finish. It probably either goes into a deadlock or hangs for an unknown reason.

     

    Please list all 3rd party libs you use in your app.

     

    It is just:

     

     

    TADoQuery

    TClientDataset

     

     

    In applications for reporting (not use frequently) FastReports are used ..

     

    br,mk.

  5. Dear all,

     

     

    It happens that requests somehow hangs .... I think that it happens if the internet connection is poor between client and UniGUI server.

    After while the client get "server not response, try latter" ....

     

    After commit ... then requests are processed and decreased to zero. How is possible to solve this issue?

    Is it some timeout to change time of requests, or something else?

     

     

    best regards,

    mk.

  6. Is there any difference with performance between Unigui Standalone exe server and Unigui dll mode(with apache)?

    I mean Unigui dll mode(with apache) maybe faster than Unigui Standalone exe server ?

     

     

    thx.

     

     

    I think that is not.

     

    But if you have several applications .. you will also need different ports.

    Maybe is also not so secure vs. ISS (dll)

     

    br,

    Marko

  7. Dear all,

     

    Is it possible to change color of series in the UniChart component in WebMode?

     

    I have tried:

     

    Unichart.SeriesList[0].Color:=clgray;

     

    Also if I changed in design time it looks like that is no effect to WebMode.

     

    Any ideas?

     

    br,mk.

  8. What Farshad said is correct.

     

    I did another application based on that demo and I use markermanager.js (http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markermanager/src/markermanager.js) to manage the markers.

     

    1) Add the link to CustomFiles in ServerManager.

     

    2) In the html frame->extevents->onafterupdatehtml something like this (added mgr = ...)

     

    function Onafterupdatehtml(sender)

    {

    var latlng = new google.maps.LatLng(0,0);

     

    var myOptions = {

    zoom: 4,

    minZoom: 4,

    maxZoom: 20,

    center: latlng,

    mapTypeId: google.maps.MapTypeId.ROADMAP

    };

     

    var map = new google.maps.Map(document.getElementById("uni_map_canvas"), myOptions);

    googleMap = map;

     

    /*google.maps.event.addListener(map, 'zoom_changed',

    function() {

    MainForm.UniTrackBar1.setValue(this.getZoom());

    });*/

     

    mgr = new MarkerManager(googleMap);

     

    google.maps.event.addListener(mgr, 'loaded',

    function(e) {

    ajaxRequest(UniFrame1.UniHF,

    'loaded',

    []);

    });

     

    google.maps.event.addListener(map, 'click',

    function(e) {

    ajaxRequest(UniFrame1.UniHF,

    'mapClick',

    ['lat='+e.latLng.lat(), 'lng='+e.latLng.lng()]);

    });

     

    }

     

    3) Add marks like this:

     

    procedure TUniFrame1.CreateMapMarks;

    var

    path,c1,c2,lat,lng,info: string;

    cmd1,cmd2: TStringList;

    i: integer;

    begin

    if WebMode then

    begin

     

    try

    path := AppPath + 'files\';

     

    cmd1 := TStringList.Create;

    cmd1.LoadFromFile( path + 'CreateMapMarks1.js' );

    cmd1.Add('');

    c1 := cmd1.Text;

     

    cmd2 := TStringList.Create;

    cmd2.LoadFromFile( path + 'CreateMapMarks2.js' );

    cmd2.Add('');

    c2 := cmd2.Text;

     

    with UniMainModule do

    begin

    i := 0;

    ADOTabPoste.First;

    while not ADOTabPoste.Eof do

    begin

    inc(i);

     

    lat := ADOTabPosteLatitude.Value;

    lng := ADOTabPosteLongitude.Value;

    info := ADOTabPosteIdentificador.Value;

     

    c1 := c1 +

    Format( c2,[

    lat,

    lng,

    'false',

    info,

    IntToStr(i),

    lat,

    lng

    ]

    );

     

     

    ADOTabPoste.Next;

    end;

    ADOTabPoste.First;

    end;

     

    c1 := 'if (typeof googleMap=="object") {'

    + c1 +

     

    'mgr.refresh(); };';

     

    UniSession.AddJS(

    c1

    );

     

    finally

    cmd1.Free;

    cmd2.Free;

    end;

    end;

    end;

     

    where the two external javascript files are:

     

    createmapmark1.js

    // Origins, anchor positions and coordinates of the marker

    // increase in the X direction to the right and in

    // the Y direction down.

    var image = new google.maps.MarkerImage('imagens/light2.png',

    // This marker is 20 pixels wide by 32 pixels tall.

    new google.maps.Size(26, 32),

    // The origin for this image is 0,0.

    new google.maps.Point(0,0),

    // The anchor for this image is the base of the flagpole at 0,32.

    new google.maps.Point(0, 32));

    var shadow = new google.maps.MarkerImage('imagens/light2.png',

    // The shadow image is larger in the horizontal dimension

    // while the position and offset are the same as for the main image.

    new google.maps.Size(26, 32),

    new google.maps.Point(0,0),

    new google.maps.Point(0, 32));

    // Shapes define the clickable region of the icon.

    // The type defines an HTML <area> element 'poly' which

    // traces out a polygon as a series of X,Y points. The final

    // coordinate closes the poly by connecting to the first

    // coordinate.

    var shape = {

    coord: [1, 1, 1, 32, 26, 32, 26 , 1],

    type: 'poly'

    };

     

    createmapmark2.js

    var myLatLng = new google.maps.LatLng(%s, %s);

    var marker = new google.maps.Marker({

    position: myLatLng,

    //map: googleMap,

    shadow: shadow,

    icon: image,

    shape: shape,

    draggable: %s,

    title: '%s',

    zIndex: %s

    });

     

    google.maps.event.addListener( marker, 'click', function(e){googleMap.setCenter(new google.maps.LatLng(%s, %s)); googleMap.setZoom( ((googleMap.getZoom()==20)?20:googleMap.getZoom()+2) );

    ajaxRequest(UniFrameCadPostes.UniHF,

    'mapClick',

    ['lat='+e.latLng.lat(), 'lng='+e.latLng.lng()]); } );

     

    mgr.addMarker(marker,4);

     

    4) And you can call some google functions like this:

     

    procedure TUniFrameCadPostes.ClearMarkers;

    begin

    if WebMode then

    UniSession.AddJS('if (typeof googleMap=="object") { mgr.clearMarkers(); mgr.refresh(); };');

    end;

     

     

    Did help?

     

    Bye!

     

    Bruno

     

    Thank you Bruno for insight,

    very helpful,

     

    Probaly I can use also Openlayers in this way ...

     

    br,mk.

  9. Hi all,

     

    Is it possible to access UniGUI apps as standalone server throught port 80 on IIS.

     

    For example I have two UniGUI standalone web server applications, one works on port 8081 and other on 8082.

    I can access first one like http://www.example.com:8081/ and other one as http://www.example.com:8082/

     

    I would like to access application on port 80 (other ports in many companies are closed), as http://www.example.com/ap_8081/ or http://www.example.com/ap_8082/

    Is it possible something like that to make on IIS, or some other workaround?

     

    I know that I can make ISAPI but I need standalone applications...

     

    Any ideas?

     

    best regards,

     

    Marko Kastelic

  10. Have you tried our GoogleMaps demo under \demos folder?

     

     

    I did, but I need also other functionalities.

    I check also component from patmap and still are missed functionalities, like re-position of marker.

     

    It would be nice possibility to call all properties or functions inside HTMLFrame ...

     

    br,mk.

  11. Well, this is not entirely true. Some reports may contain elements which can't be used in multi-thread environment. RichText is one of them.

     

    Can you try with a very simple or an empty report and test again?

     

    Yes I did,

     

    Now it works perfectly, I built report from start (probably something wrong, I have used old *.fr3 from my previous application).

     

    Thank you Farshad for your help,

     

    Your components are great work!

     

    br,mk.

  12. Tip:

     

    Since you have an AdoQuery you must set ServerModule->AutoCoInitialize->True

     

    I set AutoCoInitialize, but is no differenece, in logfile is

     

    maps_2009_2010: 0000116C: 11:32:48CommandGet:EUniSessionException : Invalid session or session Timeout.

     

    The pdf in localcache is created, but has only header of report - without masterdata

     

    br,mk.

  13. Try the following code:

    procedure TfrmPrintForm.PrintReport();
    begin
     frxPDFExport.FileName := 'ReportXXX_' + FormatDateTime('hhmmss.zzz', Now()) + '.pdf'; // Create a unique name for report. 
     frxPDFExport.DefaultPath := UniServerModule.LocalCachePath; // Export Path;
     frxReport.PrepareReport(); // Create Report
     frxReport.Export(frxPDFExport); // Export Report
     rptURLFrame.URL := UniServerModule.LocalCacheURL + frxPDFExport.FileName; // Displayed on UniURLFrame
    end;

     

    I test it also this way, but the problem is not solved .. Works only in VCL in web mode does not work,

    it looks like that tfrxDbDataset some how does not work in web mode ...

  14. Dear all,

     

    I developed application using UniGUI as standalone web server, using Delphi XE2, win 7 32 bit.

    To make reports I have used FastReports, but it works normally only in the VCL mode.

    On the web mode get access violation or report is not make correctly. The printer is available/installed.

    As I read the Fastreports are thread safe. Is it possible to use Fastreport in webmode?

    Maybe is possible to make report only in VCL session (so web sessions calls VCL sesion to make reports)?

    Do you have some example, workaround, or what is the best practice to make PDF report?

     

    Sample code

     

    sql:='select * from tablename';
    // open AdoQuery - Rlogpst is connected to TFrxDbDataset
    Rlogpst.Close;
    Rlogpst.sql.Text:=sql;
    Rlogpst.Open;
    // loading fastreport design from file
    report.LoadFromFile(ExtractFilepath(paramStr(0))+'porociloSIu.fr3') ;
    // assign some variables in fastreport
    report.Variables[' xx']:=0;
    report.Variables['xy']:=''''+combo1.text+'''';
    report.PrintOptions.ShowDialog := False;
    report.ShowProgress:=false;
    report.PrintOptions.ShowDialog:=false;
    report.EngineOptions.SilentMode:=True;
    // unique file name
    fn:=FormatDateTime('YYMMDD_hhmmnnss',now)+'_'+UniMainModule.ruser+'.pdf';
    // set pdf export
    pdf.FileName:= UniServerModule.LocalCachePath+fn;
    pdf.DefaultPath:=UniServerModule.LocalCachePath;
    report.PrepareReport();
    report.Export(pdf);
    // making a link to download created pdf file
    elink.Caption:='<a href="'+UniServerModule.LocalCacheURL+fn+'" target=new>Click to download: ('+fn+')</a>';
    

     

    What could be wrong, it works only in VCL session ...

     

     

    Thank you for your help in advance,

     

    Best regards,

    Marko Kastelic

×
×
  • Create New...