| |

VerySource

 Forgot password?
 Register
Search
View: 914|Reply: 3

Ask a ReportBuilder report, please help masters.

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-15 20:20:01
| Show all posts |Read mode
I want to generate reports dynamically, that is, different users get different report content (some users may get more information), so I put the following controls on my interface:

    // tblItem: TADOTable;
    // dsItem: TDataSource;
    // plItem: TppDBPipeline;
    ppDataDictionary1: TppDataDictionary;
    ppDesigner1: TppDesigner;
    ppReport1: TppReport;

    dbField: TADODataSet;
    dsField: TDataSource;
    plField: TppDBPipeline;

    dbTable: TADODataSet;
    dsTable: TDataSource;
    plTable: TppDBPipeline;

In the code, I want to obtain different database information through the CommandText property of two TADODataSet controls, as follows:
    dbTable.Close;
    strSQL: = 'select * from rb_table where table_name = `` VIEW_ReportBasic_Month' '';
    dbTable.CommandText: = strSQL;
    dbTable.Open;
    dbField.Close;
    strSQL: = 'select * from rb_field where table_name = `` VIEW_ReportBasic_Month' '';
    dbField.CommandText: = strSQL;
    dbField.Open;
    ppDataDictionary1.Open;
  ppDesigner1.ShowModal; // Report designer display

But this way, I opened ppDesigner1, but I can't design the report, because there is no Data page except Design and Review, I don't know how to solve it, please help me, thank you!
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-23 08:27:02
| Show all posts
The problem is mainly due to the fact that several units have not been added. In this example interface, you can see.
interface

{By removing the 'x' which begins each of these compiler directives,
  you can enable different functionality within the end-user reporting
  solution.

  DADE-the data tab where queries can be created by the end-user

  BDE-BDE support for the Query Tools

  ADO-ADO support for the Query Tools

  IBExpress-Interbase Express support for the Query Tools

  RAP-the calc tab, where calculations can be coded at run-time
         (RAP is included with ReportBuilder Enterprise)

  CrossTab-adds the CrossTab component to the component palette in the
             report designer.

  CheckBox-adds a checkbox component to the component palette in the
         report designer.

  TeeChart-adds a teechart component to the report designer component
         palette. You must have TeeChart installed. More information
         is available in ..\RBuilder\TeeChart\ReadMe.doc

  UseDesignPath-determines whether the path used by the Database
         object on this form is replaced in the OnCreate event handler of
         this form with the current path.}

{$ DEFINE DADE} {remove the 'x' to enable DADE}
{$ DEFINE BDE} {remove the 'x' to enable Borland Database Engine (BDE)}
{x $ DEFINE ADO} {remove the 'x' to enable ADO}
{x $ DEFINE IBExpress} {remove the 'x' to enable Interbase Express}
{$ DEFINE CrossTab} {remove the 'x' to enable CrossTab}
{x $ DEFINE RAP} {remove the 'x' to enable RAP}
{x $ DEFINE CheckBox} {remove the 'x' to enable CheckBox}
{x $ DEFINE TeeChart} {remove the 'x' to enable standard TeeChart}
{x $ DEFINE UseDesignPath} {remove the 'x' to use the design-time settings of Database object on this form}

uses

{$ IFDEF DADE}
  daIDE,
{$ ENDIF}

{$ IFDEF BDE}
  daDBBDE,
{$ ENDIF}

{$ IFDEF ADO}
  daADO,
{$ ENDIF}

{$ IFDEF IBExpress}
  daIBExpress,
{$ ENDIF}

{$ IFDEF CrossTab}
  ppCTDsgn,
{$ ENDIF}

{$ IFDEF RAP}
  raIDE,
{$ ENDIF}

{$ IFDEF CheckBox}
  myChkBox,
{$ ENDIF}

{$ IFDEF TeeChart}
  ppChrtUI,
{$ ENDIF}

Add these few. That's it.

(Note: it has been tested and has a data page. If you still don't understand, please look at the examples.)
Reply

Use magic Report

0

Threads

18

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-24 15:36:01
| Show all posts
Agree upstairs
Reply

Use magic Report

0

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-2-22 13:15:01
| Show all posts
lolonoisPositive solution. . .
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list