Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Creating reports – PB Docs 100 – PowerBuilder Library

Creating reports – PB Docs 100

Creating reports

You can use DataWindow objects to create standard business
reports such as financial statements, sales order reports, employee
lists, or inventory reports.

To create a production report, you:

  • Determine the type of report
    you want to produce
  • Build a DataWindow object to display data for the
    report
  • Place the DataWindow object in a DataWindow control
    on a window or form
  • Write code to perform the processing required to
    populate the DataWindow control and print the contents as a report

note.gif Calling InfoMaker from an application If your users have installed InfoMaker (the Sybase reporting
product), you can invoke InfoMaker from an application. This way
you can let your users create and save their own reports. To do
this in PowerBuilder, use the Run function. For information about
invoking InfoMaker, see the InfoMaker
User’s
Guide

.

Planning and building the DataWindow object

To design the report, you create a DataWindow object. You
select the data source and presentation style and then:

  • Sort the data
  • Create groups in the DataWindow object to organize
    the data in the report and force page breaks when the group values
    change
  • Enhance the DataWindow object to look like a report
    (for example, you might want to add a title, column headers, and
    a computed field to number the pages)

note.gif Using fonts Printer fonts are usually shorter and fatter than screen fonts,
so text might not print in the report exactly as it displays in
the DataWindow painter. You can pad the text fields to compensate
for this discrepancy. You should test the report format with a small
amount of data before you print a large report.

Printing the report

After you build the DataWindow object and fill in print specifications,
you can place it in a DataWindow control on a window or form, as
described in “Putting a DataWindow
object into a control”
.

To allow users to print the report, your application needs
code that performs the printing logic. For example, you can place
a button on the window or form, then write code that is run when
the user clicks the button.

To print the contents of a single DataWindow control or DataStore,
call the Print method. For example, this PowerBuilder statement
prints the report in the DataWindow control dw_Sales:

For information about the Print method, see
the DataWindow Reference.
For information about
using nested reports to print multiple DataWindows, see “Using nested reports”.

Separate DataWindow controls in a single print
job

For PowerBuilder applications only If the window has multiple DataWindow controls, you can use
multiple PrintDataWindow method calls in a script to print the contents
of all the DataWindow controls in one print job.

These statements print the contents of three DataWindow controls
in a single print job:

For information about PowerBuilder system
functions for printing, see the PowerScript Reference.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x