Can view report in designer but not in application

edited 6:04PM in FastReport 4.0
Hi,

I've designed a report and I can view it in the designer (F9) with no problems.

But when I run the report in my application (call the ShowReport method), I get a single, blank, page as the output.

Any suggestion as to what I am doing wrong?

- Niels

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:04PM
    without more info can only guess, probably forgot to load the report before calling showreport.
    typically Frxreport1.loadfromfile('path&filename.fr3');
    frxreport1.showreport;
    Please when you post tell us what build and level of fr you are using what ide and a code sample of where you are having your problem.
  • edited 6:04PM
    gordk wrote: »
    without more info can only guess, probably forgot to load the report before calling showreport.
    typically Frxreport1.loadfromfile('path&filename.fr3');
    frxreport1.showreport;
    Please when you post tell us what build and level of fr you are using what ide and a code sample of where you are having your problem.

    Sorry - it's just that there is so little code involved it is almost untrue! [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> I literally just call ShowReport on the report component... I've not loaded the report from disk, I assumed that if I designed it by double-clicking the report component in my datamodule that the report design would be stored in the component (i.e. in the dfm file), and thus could be executed directly. I don't particularly want to have to distribute a separate .fr3 file with the app. It's the latest FR, only bought a week or so ago, Enterprise version. Delphi 7 IDE.[/img]
  • gordkgordk St.Catherines On. Canada.
    edited 6:04PM
    "It's the latest FR, only bought a week or so ago"
    a statement like above tells us nothing
    stable version or daily build and build no.

    if you saved in the dfm
    are you calling the correct report component.
    ie if you designed using frxreport1 you must call frxreport1.showreport; from the same form
    not frxreport1 from another form.
    is your masterdataband connected to an frxdbdataset component?
    if so is its properties set correctly.
  • edited 6:04PM
    gordk wrote: »
    "It's the latest FR, only bought a week or so ago"
    a statement like above tells us nothing
    stable version or daily build and build no.

    if you saved in the dfm
    are you calling the correct report component.
    ie if you designed using frxreport1 you must call frxreport1.showreport; from the same form
    not frxreport1 from another form.
    is your masterdataband connected to an frxdbdataset component?
    if so is its properties set correctly.

    Thanks, I appreciate your help. I wasn't in front of the computer when I wrote the previous reply - hence the vague version info. It's version 4.7.154, stable build.

    The report is placed in a datamodule, with a public call interface for the main app to call, to display the report. Because the report is a master-detail-detail report, there are also some query parameters that need to be set, so the public interface sets those too. I've included the entire code below. Apologies for the large post - and the indentation doesn't work in quoted text so slightly harder to read.

    The report works fine when pressing F9 in the report designer (invoked by double-clicking the report in the datamodule). So, presumably this means that the settings are set correctly?
    gordk wrote: »
    unit invoicerepdm;

    interface

    uses
    SysUtils,
    Classes,
    frxClass,
    frxDBSet,
    frxIBXComponents,
    frxExportPDF;

    type
    TInvoiceReportModule = class(TDataModule)
    InvoiceReport: TfrxReport;
    frxIBXComponents1: TfrxIBXComponents;
    InvoiceReportPdfExport: TfrxPDFExport;
    private
    { Private declarations }
    procedure SetReportParams( const Value: TDateTime;
    const GalleryFilter: integer;
    const ArtistFilter: integer );
    public
    { Public declarations }
    procedure PrintPreview( const InvoiceDate: TDateTime;
    const GalleryFilter: integer = -1;
    const ArtistFilter: integer = -1 );
    procedure PrintReport( const InvoiceDate: TDateTime;
    const GalleryFilter: integer = -1;
    const ArtistFilter: integer = -1 );
    procedure PrintReportAsPDF( const InvoiceDate: TDateTime;
    const Filename: string;
    const GalleryFilter: integer = -1;
    const ArtistFilter: integer = -1 );
    end;

    var
    InvoiceReportModule: TInvoiceReportModule;

    implementation

    {$R *.dfm}

    { TInvoiceReportModule }

    procedure TInvoiceReportModule.PrintPreview( const InvoiceDate: TDateTime;
    const GalleryFilter: integer;
    const ArtistFilter: integer );
    begin
    // Configure invoice date in report
    SetReportParams( InvoiceDate, GalleryFilter, ArtistFilter );
    InvoiceReport.ShowReport;
    end;

    procedure TInvoiceReportModule.PrintReport( const InvoiceDate: TDateTime;
    const GalleryFilter: integer;
    const ArtistFilter: integer );
    begin
    // Configure invoice date in report
    SetReportParams( InvoiceDate, GalleryFilter, ArtistFilter );
    InvoiceReport.Print;
    end;

    procedure TInvoiceReportModule.PrintReportAsPDF( const InvoiceDate: TDateTime;
    const Filename: string;
    const GalleryFilter: integer;
    const ArtistFilter: integer );
    begin
    // Configure invoice date in report
    SetReportParams( InvoiceDate, GalleryFilter, ArtistFilter );
    InvoiceReportPdfExport.FileName := Filename;
    InvoiceReport.Export( InvoiceReportPdfExport );
    end;

    procedure TInvoiceReportModule.SetReportParams( const Value: TDateTime;
    const GalleryFilter: integer;
    const ArtistFilter: integer );
    begin
    // Assign invoice date to script variable
    InvoiceReport.Variables := formatdatetime( 'dd/mm/yyyy', Value );
    InvoiceReport.Variables := IntToStr( GalleryFilter );
    InvoiceReport.Variables := IntToStr( ArtistFilter );
    end;

    end.
    gordk wrote: »
    object InvoiceReportModule: TInvoiceReportModule
    OldCreateOrder = False
    Left = 995
    Top = 208
    Height = 217
    Width = 173
    object InvoiceReport: TfrxReport
    Version = '4.7.154'
    DotMatrixReport = False
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
    PreviewOptions.Zoom = 1.000000000000000000
    PreviewOptions.ZoomMode = zmWholePage
    PrintOptions.Printer = 'Default'
    PrintOptions.PrintOnSheet = 0
    ReportOptions.CreateDate = 39989.609791550900000000
    ReportOptions.LastChange = 39997.718271932900000000
    ScriptLanguage = 'PascalScript'
    ScriptText.Strings = (
    'var'
    ' InvoiceDate: string;'
    ' GalleryFilter,'

    ' ArtistFilter: integer; ' +
    ' '
    ''
    'procedure Page1OnBeforePrint(Sender: TfrxComponent);'
    'begin'
    ' // for debug purposes, provide an invoice date here'

    ' if ( InvoiceDate = '''' ) then begin ' +
    ' '
    ' InvoiceDate := ''2/5/2009'';'
    ' GalleryFilter := -1; '

    ' ArtistFilter := -1; ' +
    ' '
    ' end; '
    'end;'
    ''
    'begin'
    ''
    'end.')
    Left = 56
    Top = 16
    Datasets = <
    item
    DataSet = InvoiceReport.Galleries
    DataSetName = 'Galleries'
    end
    item
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    end
    item
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    end>
    Variables = <>
    Style = <>
    object Data: TfrxDataPage
    Height = 1000.000000000000000000
    Width = 1000.000000000000000000
    object IBXDatabase1: TfrxIBXDatabase
    DatabaseName = 'localhost:unitone'
    LoginPrompt = False
    Params.Strings = (
    'user_name=SYSDBA'
    'password=masterkey'
    'lc_ctype=ISO8859_1')
    SQLDialect = 3
    Connected = True
    pLeft = 116
    pTop = 104
    end
    object Galleries: TfrxIBXQuery
    UserName = 'Galleries'
    CloseDataSource = True
    BCDToCurrency = False
    IgnoreDupParams = False
    Params = <
    item
    Name = 'INVDATE'
    DataType = ftDateTime
    Expression = '<InvoiceDate>'
    end
    item
    Name = 'GALLERY_FILTER'
    DataType = ftInteger
    Expression = '<GalleryFilter>'
    end>
    SQL.Strings = (

    'select * from INVOICE_REPORT_GALLERIES( :INVDATE, :GALLERY_FILTE' +
    'R ) '
    ' ')
    Database = InvoiceReport.IBXDatabase1
    pLeft = 220
    pTop = 104
    Parameters = <
    item
    Name = 'INVDATE'
    DataType = ftDateTime
    Expression = '<InvoiceDate>'
    end
    item
    Name = 'GALLERY_FILTER'
    DataType = ftInteger
    Expression = '<GalleryFilter>'
    end>
    end
    object Works: TfrxIBXQuery
    UserName = 'Works'
    CloseDataSource = True
    BCDToCurrency = False
    Master = InvoiceReport.Galleries
    IgnoreDupParams = False
    Params = <
    item
    Name = 'INVDATE'
    DataType = ftDateTime
    Expression = '<InvoiceDate>'
    end
    item
    Name = 'GID'
    DataType = ftInteger
    Expression = '<Galleries."ID">'
    end
    item
    Name = 'ARTIST_FILTER'
    DataType = ftInteger
    Expression = '<ArtistFilter>'
    end>
    SQL.Strings = (

    'select * from INVOICE_REPORT_WORKS( :INVDATE, :GID, :ARTIST_FILT' +
    'ER ) '
    ' ')
    Database = InvoiceReport.IBXDatabase1
    pLeft = 312
    pTop = 104
    Parameters = <
    item
    Name = 'INVDATE'
    DataType = ftDateTime
    Expression = '<InvoiceDate>'
    end
    item
    Name = 'GID'
    DataType = ftInteger
    Expression = '<Galleries."ID">'
    end
    item
    Name = 'ARTIST_FILTER'
    DataType = ftInteger
    Expression = '<ArtistFilter>'
    end>
    end
    object History: TfrxIBXQuery
    UserName = 'History'
    CloseDataSource = True
    BCDToCurrency = False
    Master = InvoiceReport.Works
    IgnoreDupParams = False
    Params = <
    item
    Name = 'INVDATE'
    DataType = ftDateTime
    Expression = '<InvoiceDate>'
    end
    item
    Name = 'WID'
    DataType = ftInteger
    Expression = '<Works."ID">'
    end>
    SQL.Strings = (
    'select * from invoice_report_history( :INVDATE, :WID ) ')
    Database = InvoiceReport.IBXDatabase1
    pLeft = 404
    pTop = 104
    Parameters = <
    item
    Name = 'INVDATE'
    DataType = ftDateTime
    Expression = '<InvoiceDate>'
    end
    item
    Name = 'WID'
    DataType = ftInteger
    Expression = '<Works."ID">'
    end>
    end
    end
    object Page1: TfrxReportPage
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = []
    PaperWidth = 210.000000000000000000
    PaperHeight = 297.000000000000000000
    PaperSize = 9
    LeftMargin = 10.000000000000000000
    RightMargin = 10.000000000000000000
    TopMargin = 10.000000000000000000
    BottomMargin = 10.000000000000000000
    OnBeforePrint = 'Page1OnBeforePrint'
    object MasterData1: TfrxMasterData
    Height = 109.606370000000000000
    Top = 36.000000000000000000
    Width = 718.110700000000000000
    OnBeforePrint = 'MasterData1OnBeforePrint'
    DataSet = InvoiceReport.Galleries
    DataSetName = 'Galleries'
    RowCount = 0
    StartNewPage = True
    Stretched = True
    object GalleriesGALLERYNAME: TfrxMemoView
    Left = 264.567100000000000000
    Top = 18.897650000000000000
    Width = 453.543600000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'GALLERYNAME'
    DataSet = InvoiceReport.Galleries
    DataSetName = 'Galleries'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = []
    HAlign = haRight
    Memo.UTF8 = (
    '[Galleries."GALLERYNAME"]')
    ParentFont = False
    end
    object Memo2: TfrxMemoView
    Top = 45.795300000000000000
    Width = 64.252010000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Memo.UTF8 = (
    'Client:')
    end
    object Memo3: TfrxMemoView
    Top = 64.252010000000000000
    Width = 64.252010000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Memo.UTF8 = (
    'Address:')
    end
    object Memo4: TfrxMemoView
    Left = 75.590600000000000000
    Top = 45.354360000000000000
    Width = 642.520100000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'GALLERYNAME'
    DataSet = InvoiceReport.Galleries
    DataSetName = 'Galleries'
    Memo.UTF8 = (
    '[Galleries."GALLERYNAME"]')
    end
    object Memo5: TfrxMemoView
    Left = 75.590600000000000000
    Top = 64.252010000000000000
    Width = 642.520100000000000000
    Height = 18.897650000000000000
    ShowHint = False
    StretchMode = smActualHeight
    DataField = 'GALLERYADDRESS'
    DataSet = InvoiceReport.Galleries
    DataSetName = 'Galleries'
    Memo.UTF8 = (
    '[Galleries."GALLERYADDRESS"]')
    end
    object Memo6: TfrxMemoView
    Left = 75.590600000000000000
    Top = 83.149660000000000000
    Width = 188.976500000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'GALLERYPOSTCODE'
    DataSet = InvoiceReport.Galleries
    DataSetName = 'Galleries'
    Memo.UTF8 = (
    '[Galleries."GALLERYPOSTCODE"]')
    end
    object Memo1: TfrxMemoView
    Top = 3.779530000000000000
    Width = 260.787570000000000000
    Height = 34.015770000000000000
    ShowHint = False
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -29
    Font.Name = 'Trebuchet MS'
    Font.Style = []
    Memo.UTF8 = (
    'Invoicing Detail')
    ParentFont = False
    VAlign = vaBottom
    end
    object Line1: TfrxLineView
    Left = 3.779530000000000000
    Top = 41.574830000000000000
    Width = 710.551640000000000000
    ShowHint = False
    Frame.Typ = [ftTop]
    end
    object Line3: TfrxLineView
    Left = 3.779530000000000000
    Top = 105.826840000000000000
    Width = 710.551640000000000000
    ShowHint = False
    Frame.Typ = [ftTop]
    end
    object Memo12: TfrxMemoView
    Left = 472.441250000000000000
    Width = 241.889920000000000000
    Height = 18.897650000000000000
    ShowHint = False
    HAlign = haRight
    Memo.UTF8 = (
    'Period Ending [InvoiceDate]')
    end
    end
    object DetailData1: TfrxDetailData
    Height = 37.795300000000000000
    Top = 188.000000000000000000
    Width = 718.110700000000000000
    OnBeforePrint = 'DetailData1OnBeforePrint'
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    RowCount = 0
    object WorksARTISTNAME: TfrxMemoView
    Left = 22.677180000000000000
    Width = 162.519790000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'ARTISTNAME'
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = []
    Memo.UTF8 = (
    '[Works."ARTISTNAME"]')
    ParentFont = False
    end
    object WorksTITLE: TfrxMemoView
    Left = 192.756030000000000000
    Width = 389.291590000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'TITLE'
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = []
    Memo.UTF8 = (
    '[Works."TITLE"]')
    ParentFont = False
    end
    object WorksOID: TfrxMemoView
    Left = 589.606680000000000000
    Width = 128.504020000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'OID'
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = []
    Memo.UTF8 = (
    '[Works."OID"]')
    ParentFont = False
    end
    object WorksUID: TfrxMemoView
    Left = 22.677180000000000000
    Top = 18.897650000000000000
    Width = 128.504020000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'UID'
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    Memo.UTF8 = (
    '[Works."UID"]')
    end
    object WorksPACKINGDESCRIPTION: TfrxMemoView
    Left = 192.756030000000000000
    Top = 18.897650000000000000
    Width = 147.401670000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'PACKINGDESCRIPTION'
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    Memo.UTF8 = (
    '[Works."PACKINGDESCRIPTION"]')
    end
    object WorksPKG_HEIGHT: TfrxMemoView
    Left = 359.055350000000000000
    Top = 18.897650000000000000
    Width = 188.976500000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataSet = InvoiceReport.Works
    DataSetName = 'Works'
    Memo.UTF8 = (

    'HWD: [Works."PKG_HEIGHT"] x [Works."PKG_WIDTH"] x [Works."PKG_DE' +
    'PTH"] m')
    end
    end
    object GroupHeader1: TfrxGroupHeader
    Height = 22.677180000000000000
    Top = 244.000000000000000000
    Width = 718.110700000000000000
    Condition = 'History."LINE_ID"'
    KeepTogether = True
    object Memo7: TfrxMemoView
    Left = 75.590600000000000000
    Width = 94.488250000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Memo.UTF8 = (
    'FROM')
    end
    object Memo8: TfrxMemoView
    Left = 188.976500000000000000
    Width = 94.488250000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Memo.UTF8 = (
    'TO')
    end
    object Memo9: TfrxMemoView
    Left = 302.362400000000000000
    Width = 94.488250000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Memo.UTF8 = (
    'DAYS')
    end
    object Memo10: TfrxMemoView
    Left = 415.748300000000000000
    Width = 94.488250000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Memo.UTF8 = (
    'VOLUME')
    end
    object Memo11: TfrxMemoView
    Left = 623.622450000000000000
    Width = 90.708720000000000000
    Height = 18.897650000000000000
    ShowHint = False
    HAlign = haRight
    Memo.UTF8 = (
    'COST')
    end
    object Line2: TfrxLineView
    Left = 75.590600000000000000
    Top = 18.897650000000000000
    Width = 642.520100000000000000
    ShowHint = False
    Frame.Typ = [ftTop]
    end
    end
    object SubdetailData1: TfrxSubdetailData
    Height = 18.897650000000000000
    Top = 288.000000000000000000
    Width = 718.110700000000000000
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    RowCount = 0
    object HistoryIN_DATE: TfrxMemoView
    Left = 75.590600000000000000
    Width = 109.606370000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'ACT_IN_DATE'
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    Memo.UTF8 = (
    '[History."ACT_IN_DATE"]')
    end
    object HistoryOUT_DATE: TfrxMemoView
    Left = 188.976500000000000000
    Width = 109.606370000000000000
    Height = 18.897650000000000000
    OnBeforePrint = 'HistoryOUT_DATEOnBeforePrint'
    ShowHint = False
    DataField = 'ACT_OUT_DATE'
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    Memo.UTF8 = (
    '[History."ACT_OUT_DATE"]')
    end
    object HistoryDURATION: TfrxMemoView
    Left = 302.362400000000000000
    Width = 94.488250000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'DURATION'
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    Memo.UTF8 = (
    '[History."DURATION"]')
    end
    object HistoryVOLUME: TfrxMemoView
    Left = 415.748300000000000000
    Width = 113.385900000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'VOLUME'
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    Memo.UTF8 = (
    '[History."VOLUME"]')
    end
    object HistoryCOST: TfrxMemoView
    Left = 623.622450000000000000
    Width = 90.708720000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DataField = 'COST'
    DataSet = InvoiceReport.History
    DataSetName = 'History'
    DisplayFormat.FormatStr = '%2.2m'
    DisplayFormat.Kind = fkNumeric
    HAlign = haRight
    Memo.UTF8 = (
    '[History."COST"]')
    end
    end
    object GroupHeader2: TfrxGroupHeader
    Height = 3.779530000000000000
    Top = 164.000000000000000000
    Width = 718.110700000000000000
    Condition = 'Works."ARTISTNAME"'
    end
    object GroupFooter1: TfrxGroupFooter
    Top = 328.000000000000000000
    Width = 718.110700000000000000
    end
    object GroupFooter2: TfrxGroupFooter
    Height = 41.574830000000000000
    Top = 348.000000000000000000
    Width = 718.110700000000000000
    object SysMemo1: TfrxSysMemoView
    Left = 623.622450000000000000
    Top = 8.000000000000000000
    Width = 90.708720000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DisplayFormat.FormatStr = '%2.2m'
    DisplayFormat.Kind = fkNumeric
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = [fsBold]
    HAlign = haRight
    Memo.UTF8 = (
    '[SUM(<History."COST">,SubdetailData1)]')
    ParentFont = False
    end
    object Memo13: TfrxMemoView
    Left = 192.756030000000000000
    Top = 8.000000000000000000
    Width = 389.291590000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = [fsBold]
    Memo.UTF8 = (
    'Subtotal for [Works."ARTISTNAME"]')
    ParentFont = False
    end
    object Line4: TfrxLineView
    Left = 604.724800000000000000
    Top = 34.015770000000000000
    Width = 109.606370000000000000
    ShowHint = False
    Frame.Typ = [ftTop]
    end
    end
    object GroupHeader3: TfrxGroupHeader
    Top = 16.000000000000000000
    Width = 718.110700000000000000
    Condition = 'Galleries."ID"'
    StartNewPage = True
    end
    object GroupFooter3: TfrxGroupFooter
    Height = 37.795300000000000000
    Top = 408.000000000000000000
    Width = 718.110700000000000000
    object SysMemo2: TfrxSysMemoView
    Left = 604.724800000000000000
    Top = 7.559060000000000000
    Width = 109.606370000000000000
    Height = 18.897650000000000000
    ShowHint = False
    DisplayFormat.FormatStr = '%2.2m'
    DisplayFormat.Kind = fkNumeric
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = [fsBold]
    HAlign = haRight
    Memo.UTF8 = (
    '[SUM(<History."COST">,SubdetailData1)]')
    ParentFont = False
    end
    object Memo14: TfrxMemoView
    Left = 75.590600000000000000
    Top = 7.559060000000000000
    Width = 393.071120000000000000
    Height = 18.897650000000000000
    ShowHint = False
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Trebuchet MS'
    Font.Style = [fsBold]
    Memo.UTF8 = (
    'Total for [Galleries."GALLERYNAME"]')
    ParentFont = False
    end
    object Line5: TfrxLineView
    Left = 75.590600000000000000
    Top = 3.779530000000000000
    Width = 638.740570000000000000
    ShowHint = False
    Frame.Typ = [ftTop]
    end
    object Line6: TfrxLineView
    Left = 75.590600000000000000
    Top = 30.236240000000000000
    Width = 638.740570000000000000
    ShowHint = False
    Frame.Typ = [ftTop]
    end
    end
    end
    end
    object frxIBXComponents1: TfrxIBXComponents
    Left = 56
    Top = 112
    end
    object InvoiceReportPdfExport: TfrxPDFExport
    ShowDialog = False
    UseFileCache = True
    DefaultPath = '.\'
    ShowProgress = True
    OverwritePrompt = True
    OpenAfterExport = True
    PrintOptimized = False
    Outline = False
    Background = False
    HTMLTags = True
    Author = 'Unit One OS'
    Subject = 'FastReport PDF export'
    Creator = 'Unit One OS'
    ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
    HideToolbar = False
    HideMenubar = False
    HideWindowUI = False
    FitWindow = False
    CenterWindow = False
    PrintScaling = False
    Left = 56
    Top = 64
    end
    end
  • gordkgordk St.Catherines On. Canada.
    edited 6:04PM
    i'll take a look at your code tomorrow when i have some time watch where you set your parameters and make sure the the ibx datamodule is running. also make sure your parameters return valid data.

  • edited 6:04PM
    gordk wrote: »
    i'll take a look at your code tomorrow when i have some time watch where you set your parameters and make sure the the ibx datamodule is running. also make sure your parameters return valid data.

    Thanks very much - no need now. I've managed to make it work. I think the main issue was the writing of the InvoiceDate variable value as a string. For some reason, this yields the correct result when done in the script but not when done from the calling application.

    I did notice another slight issue. If a field (in this case my "Period Ending ..." text field in the top right corner) is formatted as text (i.e. no formatting) and the date is displayed as 'mm/dd/yyyy', then instead of getting the date displayed, the field shows the result of dividing mm by dd and yyyy! Easily fixed by formatting the field as a date but unexpected nontheless.

    Thanks for your help

    -Niels
  • gordkgordk St.Catherines On. Canada.
    edited 6:04PM
    watch when passing string values from app into a categorized variable, it must have extra delimiters or the expression parser will kick in and try to evaluate and fire the ogv event if it can't.
    a string value in the variable must look like 'strvalue'
    for your text memo turn off allow expressions.
    btw when you have a long sample zip and post it in the binaries news group.
    with a brief message either here or in the fr4 newsgroup.

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.