Jump to content

UniUser

uniGUI Subscriber
  • Posts

    14
  • Joined

  • Last visited

Posts posted by UniUser

  1. 17 hours ago, Sherzod said:

    Hello,

    What kind of example in the screenshot?

    Hi, just ad unimdbgrid with a grouped column....

    i Would like to change the caption beetween ( ) of the grouped column.

    i attach an example of what i would like to change.

    It is possible?

    Regards

     

     

    request.png

  2. Hi i use this code,

    in ios with safari works good, the only issue is to remember to disable "block pop-ups" in the safari settings.

     

    uses IDCoder, IDCoderMime;

     

     

    var

      MStream:TBytesStream;

      NomeFile:string;

      PdfAnsi:AnsiString;

      Encoder: TIdEncoderMIME;

      Str:String;

    begin

        QTemp.Close;

        QTemp.SQL.Clear;

        QTemp.SQL.Add('select f.file_Stream,f.name,v.DocNumber,v.DocDate from v_Blob_Fatture Where f.stream_id='''+idBlob+'''');

        QTemp.Open;

        MStream:=TBytesStream.Create;

        TBlobField(Qtemp.FieldByName('File_Stream')).SaveToStream(MStream);

        NomeFile:='Fattura '+QTemp.FieldByName('DocNumber').AsString+' del '+StringReplace(QTemp.FieldByName('DocDate').AsString,'/','_',[rfReplaceAll])+'.pdf';

        if (upiPhone in UniSession.UniPlatform) or (upiPad in UniSession.UniPlatform) then Begin

          PdfAnsi:= TIdEncoderMIME.EncodeBytes(TIdBytes(MStream.Bytes));

          Str:='var base64EncodedPdf="'+PdfAnsi+'";';

          Str:=Str+'window.open("data:application/pdf;base64," +base64EncodedPdf);';

          UniSession.AddJS(Str);

        End else Begin

          UniSession.SendStream(MStream,NomeFile);

        End;

        MStream.Free;

        QTemp.Close;

      End;

    end;

  3. Solved...i have used UniSession.AddJS with this code sample:

     

    window.open("data:application/pdf;base64, " +base64EncodedPDF);

     

    Where base64EncodedPDF is the pdf stream converted with Indy using TIdEncoderMIME.

     

    On IOS works good.

     

    Regards

  4. Hello,

    we have an issue with pdf on IOS with Safari.

    If the pdf file is present on the server we can show it without problem using this code in a TUniLabel :

     

    href="path+fileName.pdf" target=\"_blank\"

     

    It is possible to show the pdf in a new page directly from a TmemoryStream without saving the file (all the files are stored as blob in a sql server db)

     

    We use sendstream and work on all browsers but due to IOS download restrictions in this case the procedure does not work.

     

    Any suggestion, alternative, workaround?

     

    Thank you in advance!

  5. Hi,

     

    Can you try this approach for now ?!:

     

    1. UniDBGrid -> ClientEvents -> ExtEvents -> Ext.toolbar.Paging [pagingBar] -> function pagingBar.beforechange:

    function pagingBar.beforechange(sender, page, eOpts)
    {
        ajaxRequest(sender, '_post', []);
    }

    2. UniDBGrid -> OnAjaxEvent:

    procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string;
      Params: TUniStrings);
    begin
      if EventName = '_post' then
        if (UniDBGrid1.DataSource.DataSet.State in [dsEdit]) then
          UniDBGrid1.DataSource.DataSet.Post;
    end;

    Best regards,

     

    Hello, it seems to work good.

    Thank you for your support.

    Best regards,

  6. Hello, i have commercial version of Unigui (1.0.0.1394).

     

    I have a unidbgrid where i can only modify a quantity field (clickstoedit=1, RowEditor=False)

    All works ok but sometimes when i modify the quantity cell on the grid and i change page (without posting the value with enter), the value is not saved in the clientdataset.

    If for example i click a button all works ok and the value is saved.

     

    How can i force post when change page?

     

    Thank for your answer.

     

     

  7. Hi, have a UniDBGrid with a ClientDataset filtered (field quantity<>0)

    When i change the quantity in the grid and i put the value 0 from a value <> 0 (and so the row disappear from the unidgrid)

    sometimes i get the error "Unexpected Row number".

     

    How can i solve the problem?

     

    Thank you for your information

×
×
  • Create New...