WPQuickPrint problem

  • Hi. I need a application that have a TQuickRep, that contens a TQRBand type PageFooter. In this band i put a TWPQuickPrint and before preview or print the quick report populated this component (wpquickprint) like:

    // frReceit is TQuickRep
    // dmSM.ConfigDES_RODDOC is TField
    // Rodape if TWPQuickPrint

    wl_Stream.Position := 0;
    dmSM.ConfigDES_RODDOC.SaveToStream(wl_Stream);
    wl_Stream.Seek(0,0);
    frReceit.Rodape.LoadFromStream(wl_Stream);

    frReceit.Preview;

    But i need define the frReceit.Rodape size after load from stream. How can i do this ?
    Thanks
    Alessandro

  • Hi. Julian. I try what you sugest but dont work. I do this test and the before and after the properties frReceit.Rodape.RTFText.GetAllTextHeight, frReceit.Rodape.Height and frReceit.Rodape.Size.Height is exactly the same. You can show-me how can i do to, after loadfromstream, know the height to change the quickreport band . Anythink like AutoStresh of TQRMemo.

    Thanks
    Alessandro

    ShowMessage('before-'+
    IntToStr(frReceit.Rodape.RTFText.GetAllTextHeight)+' - '+
    IntToStr(frReceit.Rodape.Height)+' - '+
    IntToStr(trunc(frReceit.Rodape.Size.Height)));
    frReceit.Rodape.Visible := true;
    wl_Stream.Position := 0;
    dmSM.ConfigDES_RODDOC.SaveToStream(wl_Stream);
    wl_Stream.Seek(0,0);
    frReceit.Rodape.LoadFromStream(wl_Stream);
    frReceit.Rodape.RTFText.ReformatAll;
    ShowMessage('after-'+
    IntToStr(frReceit.Rodape.RTFText.GetAllTextHeight)+' - '+
    IntToStr(frReceit.Rodape.Height)+' - '+
    IntToStr(trunc(frReceit.Rodape.Size.Height)));

  • Thanks Julian. I follow your last suggest.
    I do this and work: