gpt4 book ai didi

德尔福快速报告 : Band order to achieve detail-child-child-child banding?

转载 作者:行者123 更新时间:2023-12-03 17:37:41 29 4
gpt4 key购买 nike

我需要在 Delphi 5 中创建一个 QuickReport,其布局如下:

+================
| Report Header
+================

+=========================================
| Detail Band (auto-stretching, repeats)
.
+=========================================
| Child band (fixed-size)
+======================================
| Child band (Auto-stretching)
.
+======================================
| Child band (fixed-size)
+======================================

+=================================
| Report Footer (auto-stretching)
.
+=================================

+==================================
| Report Footer (auto-stretching)
.
+==================================

+=============================
| Report Footer (fixed size)
+=============================

任何人都可以想出标题,详细信息,子,页脚,子详细信息,组标题,组页脚带的组合 - 以及它们之间相关的父,主,报告,查询链接,这样我就可以制作报告我需要看吗?

不要混淆我对术语的使用
  • header 带
  • 细节带
  • 子带
  • 页脚带

  • 暗示任何乐队都必须是那些实际的类型。我在概念意义上使用这些术语:
  • 整个报告开头的单个波段(报告标题)
  • 四个波段的重复组
  • 在所有细节之后出现的三个带,前两个是自动拉伸(stretch)的

  • 同样的问题,只是更长
    +===========================================
    | Suspicious Transaction Report
    | STR No.: 12345
    | Date: 11/28/1973
    |
    | Comments: as per NSL 1/13/2010
    +===========================================

    +===========================================
    | Transaction 1 of 7
    | Buy Sell
    | $100.00 $16,000.00
    | $27,000.00
    | $12,000.00
    . ...
    +===========================================
    | Customer Information
    | Name: Shelby Lake
    | Address: 11111 S NC-HWY 111
    | DOB: 6/19/1981
    | ID No.: G123-456-789
    | Occupation: waitress
    +===========================================
    | Original Transaction
    | Buy Sell
    | $100.00 $16,000.00
    | $3,000.00 $27,000.39
    | $64,132.69 $12,000.13
    . ... ...
    +===========================================
    | Third Party Information
    | Name: Yugo Chavez
    | Address: 11111 S AB
    | DOB: 9/15/1934
    | ID No.: 995-1935
    | Occupation: dictator
    +===========================================

    ...

    +===========================================
    | Transaction 7 of 7
    .
    .
    +===========================================

    +===========================================
    | Description of Suspicious Activity
    | Customer had beedy eyes, that moved
    | rapidly from left to right. He...
    . ...
    +===========================================

    +===========================================
    | Action Taken
    | We killed him, went through his
    | pickets, then started digging the...
    .
    +===========================================





    +===========================================
    |
    | Signature: _______________________
    | Bruce Wayne
    | Title: The Batman
    | Employee ID: 1337-6669
    +===========================================

    我可以制作一些模仿我制作的示例的表格:
    CREATE TABLE STRs (
    StrID int,
    Number text,
    Date datetime,
    Comments text,
    DescriptionOfSuspiciousActivity text,
    ActionTaken text,
    EmployeeName text,
    EmployeeTitle text,
    EmployeeNumber text )

    CREATE TABLE STRTransactions (
    STRTranasctionID int,
    STRID int,
    BuyAmount money)

    CREATE TABLE STRTransactionSells (
    STRTransactionID int,
    SellAmount money)

    CREATE TABLE STRTransactionPatronInfo (
    STRTransactionID int,
    Name text,
    Address text,
    DOB text,
    IDNumber text,
    Occupation text )

    CREATE TABLE STRTransactionThirdPartyInfo (
    STRTransactionID int,
    Name text,
    Address text,
    DOB text,
    IDNumber text,
    Occupation text )

    CREATE TABLE OriginalTransactions (
    STRTransactionID int,
    BuyAmount money,
    SellAmount money )

    我失败的实验

    我尝试使用以下乐队布局创建 QuackReport:
    +=====================================================+
    | PageHeader (TQRBand, BandType=rbPageHeader) |
    +=====================================================+

    +=====================================================+
    | DetailBand (TQRBand, BandType=rbDetail) |
    +===+=================================================+
    | ChildBand1 (TQRChildBnad, Parent=DetailBand) |
    ! (autostretch) !
    +===+=============================================+
    | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
    +=============================================+

    +=====================================================+
    | ChildBand3 (TQRChildBand, Parent=(none) |
    ! (autostretch) !
    +=====================================================+
    | ChildBand4 (TQRChildBand, Parent=ChildBand3 |
    ! (autostretch) !
    +=================================================+

    +=====================================================+
    | SummaryBand (TQRBand, BandType=rbSummary) |
    +=====================================================+

    注意: 缩进用于帮助识别父子关系(即带实际上不是缩进 50 像素)

    这种设计的问题在于,至少在设计时, 摘要 带出现在两个搁浅的子带之前:
    +=====================================================+
    | PageHeader (TQRBand, BandType=rbPageHeader) |
    +=====================================================+

    +=====================================================+
    | DetailBand (TQRBand, BandType=rbDetail) |
    +===+=================================================+
    | ChildBand1 (TQRChildBnad, Parent=DetailBand) |
    ! (autostretch) !
    +===+=============================================+
    | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
    +=============================================+

    +=====================================================+
    | SummaryBand (TQRBand, BandType=rbSummary) |
    +=====================================================+

    +=====================================================+
    | ChildBand3 (TQRChildBand, Parent=(none) |
    ! (autostretch) !
    +=====================================================+
    | ChildBand4 (TQRChildBand, Parent=ChildBand3 |
    ! (autostretch) !
    +=================================================+

    当报告运行时(在运行时),两个搁浅的子带甚至不打印:
    +=====================================================+
    | PageHeader (TQRBand, BandType=rbPageHeader) |
    +=====================================================+

    +=====================================================+
    | DetailBand (TQRBand, BandType=rbDetail) |
    +===+=================================================+
    | ChildBand1 (TQRChildBnad, Parent=DetailBand) |
    ! (autostretch) !
    +===+=============================================+
    | ChildBand2 (TQRChildBand, Parent=ChildBand1 |
    +=============================================+

    +=====================================================+
    | SummaryBand (TQRBand, BandType=rbSummary) |
    +=====================================================+

    验证码:quackreports

    最佳答案

    (请记住,我不再有 QuickReports 可供我使用,所以这一切都来自内存)

    好的...我以前遇到过这个问题...
    为您提供完整的编码示例将需要很长时间(我根本没有时间),但我会尝试描述我的解决方案,以便您可以与之相关。

    不要使用 TQRChildBand,而是使用所有 DetailBand。然后,您 Hook 每个乐队的 BeforePrint 事件。

    您将在 BeforePrint 事件中使用类似的内容:

    printband := FPrintSubBandA;

    使用一组普遍可用的变量(或报告表单上的私有(private)成员)来定义应该显示哪些波段,而不应该显示在报告中的给定记录......所有类型为 bool 值(注意:您可以使用一组枚举,但 bool 值更容易/更快地实现恕我直言)

    在您的 NeedData 事件中,您将推断给定记录需要哪些波段,并相应地设置这些变量(当然是 bool 值)。

    整个解决方案是一个肮脏的黑客,但必不可少,因为 QuickReports 对选择性记录上的嵌套子带的支持基本上不存在。

    如果这还不够信息,请告诉我,我会翻阅我的代码文件,看看是否能找到我这样做的一个例子。
    本质上,这个确切的问题是我改用 RaveReports 的原因。

    编辑:
    我想您很可能已经尝试在运行时设置每个子乐队的 ParentBand 值......如果您还没有,请不要浪费您的时间!这样做会导致更多异常结果(我什至尝试过访问冲突)

    关于德尔福快速报告 : Band order to achieve detail-child-child-child banding?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2064857/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com