How to get value of QRcode in Frp file

Hi

I would like to save my Frp file data to DB, I can easy get value of a MemoView ,but how can i get a expression value of QRCode ?


Comments

  • gpigpi
    edited November 2017
    frp file is FR 2.5x prepared report file. Do you use FR 2.5x?
    Show how do you get MemoView value
  • edited November 2017
    We use FR 5.4.6

    Pascal code :


    var
    mv :TfrxMemoView ;
    sName:string;
    i :integer;
    begin
    for i := 0 to frxReport.ComponentCount - 1 do
    begin
    if frxReport.Components.ClassName = 'TfrxMemoView' then
    begin
    sName := frxReport.Components.Name;
    if sName <> EmptyStr then
    begin
    mv := TfrxMemoView(frxReport.FindObject(sName));
    if Assigned(mv) then
    begin
    Showmessage(mv.text) ;
    end;
    end;
    end;
    end;

    I can get all value of TfrxMemoviews after preparereport ,but I have no idea to how to get value of Qrcode .I use notepad++ to open a frp file then can found value of tfrxmemoview ,but not found value of QrCode in frp file
  • gpigpi
    edited 6:51AM
    wrote:
    to open a frp file
    Attach your "frp" file here
  • edited November 2017
    <?xml version="1.0" encoding="utf-8" standalone="no"?><preparedreport><previewpages><page0><TfrxNullBand FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="302.3624" Left="0" Top="0" Width="302.3624" l="0" t="0"><m1 u="userName:"/><m2 u="123"/><b1 Left="11.33859" Top="56.69295" Width="84" Height="84" Expression="<frxDBDataset1."MA001">+'#'+DateToStr(<Date>)" BarType="bcCodeQR" BarProperties.Encoding="qrAuto" BarProperties.QuietZone="0" BarProperties.ErrorLevels="ecL" BarProperties.PixelSize="4" BarProperties.CodePage="0" Rotation="0" ShowText="False" Text="123#2017-11-05" Zoom="1" FontScaled="True" QuietZone="0" /></TfrxNullBand></page0></previewpages><logicalpagenumbers><page n="1"/></logicalpagenumbers><outline/><report><TfrxReport DotMatrixReport="0" PreviewOptions.OutlineVisible="0" PreviewOptions.OutlineWidth="120" ReportOptions.Name=""/></report><sourcepages><TfrxReportPage PaperWidth="100" PaperHeight="100" PaperSize="256" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text=""><TfrxMemoView Name="Memo2" Left="11.33859" Top="30.23624" Width="71.81107" Height="18.89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" VAlign="vaCenter" Text="userName:"/><TfrxMemoView Name="mmoUserName" Left="90.70872" Top="30.23624" Width="166.29924677" Height="18.89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" VAlign="vaCenter" Text="[frxDBDataset1."MA001"]"/><TfrxBarcode2DView Name="brTest" Left="11.33859" Top="56.69295" Width="84" Height="84" Expression="<frxDBDataset1."MA001">+'#'+DateToStr(<Date>)" BarType="bcCodeQR" BarProperties.Encoding="qrAuto" BarProperties.QuietZone="0" BarProperties.ErrorLevels="ecL" BarProperties.PixelSize="4" BarProperties.CodePage="0" Rotation="0" ShowText="False" Text="12345678" Zoom="1" FontScaled="True" QuietZone="0"/></TfrxReportPage></sourcepages><dictionary><b1 name="Page0.brTest"/><m1 name="Page0.Memo2"/><m2 name="Page0.mmoUserName"/></dictionary><picturecache/></preparedreport>
  • gpigpi
    edited 6:51AM
    See Text="123#2017-11-05"
  • edited 6:51AM
    oh my fault,thank you gpi .

    another question, If I dont want get value from a frp file(cause need read/write hdd) , how should I to get this value in code? in OnAfterPrint event ?
  • LurkingKiwiLurkingKiwi Wellington, New Zealand
    edited 6:51AM
    akai1203 wrote: »
    oh my fault,thank you gpi .

    another question, If I dont want get value from a frp file(cause need read/write hdd) , how should I to get this value in code? in OnAfterPrint event ?

    Why do you need to read the values from the report after it's generated?
    Can you just use the source data or query which created the report?
  • gpigpi
    edited 6:51AM
    akai1203 wrote: »
    oh my fault,thank you gpi .

    another question, If I dont want get value from a frp file(cause need read/write hdd) , how should I to get this value in code? in OnAfterPrint event ?
    Pass through all frxReport1.PreviewPages.Page.AllObjects and read TfrxBarcode2DView.Text
  • edited 6:51AM
    oh my fault,thank you gpi .

    another question, If I dont want get value from a frp file(cause need read/write hdd) , how should I to get this value in code? in OnAfterPrint event ?

    Why do you need to read the values from the report after it's generated?
    Can you just use the source data or query which created the report?


    Because we did not know exactly which controls were used by the user until printing, we provided a free design program to the user
  • edited 6:51AM
    gpi wrote: »
    gpi wrote: »
    oh my fault,thank you gpi .

    another question, If I dont want get value from a frp file(cause need read/write hdd) , how should I to get this value in code? in OnAfterPrint event ?
    Pass through all frxReport1.PreviewPages.Page.AllObjects and read TfrxBarcode2DView.Text

    thank you so much gpi,problem solved!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.