Batch running/printing QRP reports
Batch running/printing QRP reports
Is there a way to automate the running and printing of QRP reports? I have prebuilt QRP files/reports and would like to run and print them from a command line (passing in database/user/password/printer and report parameters on the command line).
-
- Site Admin
- Posts: 430
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
Re: Batch running/printing QRP reports
Examples of running Report Builder from a command line.
Note that .CQT files combines a query and a report template.
When .CQT files are used, the query is executed, the data is fetched, and a report is
generated as specified in the report template.
The older .QRP file format just contains a report template.
REPBI62.EXE /ini "c:\my documents\myconfig.ini"
Starts Report Builder with a blank "No report" workspace. Uses file myconfig.ini for
database connectivity information.
REPBI62.EXE "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt"
Starts Report Builder, loads report formltr.cqt, then pauses and prompts the user for
database user ID and password., then executes the report and shows it in a separate
window. The user is prompted because there is not enough information supplied for
Report Builder to make the database connection on its own.
REPBI62.EXE "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt" /d island /u sysadm /a sysadm
Starts Report Builder, loads report formltr.cqt, then executes the report and shows it in
a separate window.
REPBI62.EXE /p "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt" /u sysadm /a sysadm
Starts Report Builder, loads report formltr.cqt, then prints it to the current default
printer.
REPBI62.EXE /pt "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt" "SnagIt 6" "SnagIt 6 Printer" "SnagIt6"
/d island /u sysadm /a sysadm
Starts Report Builder, loads report formltr.cqt, then prints it to the printer name,
printer driver, and printer port that are specified in the three arguments following the
report file name.
Command-line arguments include:
• /d or -d: Database name
• /u or -u: User name
• /a or -a: Database password
• /p or -p: Printer name
• /pt or -pt: Print-to name
• /h or -h or /? or -? or /help or -help: Presents a help screen showing
argument usage.
• /ini : Configuration file name. Indicates which copy of the configuration
file ( e.g. SQL.INI) should be used for database connectivity
information. Optional.
Most arguments are not case-sensitive, but "p" and "pt" are case-sensitive. You can
place a blank between the argument tag and the value, but it is not required. For
example, "/disland" and "/d island" will both work. If the report uses a database
query, and you do not supply all the arguments necessary to connect to the database, a
connection dialog will pop up when the report begins and the user will need to
complete the database name, user name, and/or password.
Note that .CQT files combines a query and a report template.
When .CQT files are used, the query is executed, the data is fetched, and a report is
generated as specified in the report template.
The older .QRP file format just contains a report template.
REPBI62.EXE /ini "c:\my documents\myconfig.ini"
Starts Report Builder with a blank "No report" workspace. Uses file myconfig.ini for
database connectivity information.
REPBI62.EXE "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt"
Starts Report Builder, loads report formltr.cqt, then pauses and prompts the user for
database user ID and password., then executes the report and shows it in a separate
window. The user is prompted because there is not enough information supplied for
Report Builder to make the database connection on its own.
REPBI62.EXE "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt" /d island /u sysadm /a sysadm
Starts Report Builder, loads report formltr.cqt, then executes the report and shows it in
a separate window.
REPBI62.EXE /p "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt" /u sysadm /a sysadm
Starts Report Builder, loads report formltr.cqt, then prints it to the current default
printer.
REPBI62.EXE /pt "c:\Program Files\Gupta\Team Developer6.2\samples\formltr.cqt" "SnagIt 6" "SnagIt 6 Printer" "SnagIt6"
/d island /u sysadm /a sysadm
Starts Report Builder, loads report formltr.cqt, then prints it to the printer name,
printer driver, and printer port that are specified in the three arguments following the
report file name.
Command-line arguments include:
• /d or -d: Database name
• /u or -u: User name
• /a or -a: Database password
• /p or -p: Printer name
• /pt or -pt: Print-to name
• /h or -h or /? or -? or /help or -help: Presents a help screen showing
argument usage.
• /ini : Configuration file name. Indicates which copy of the configuration
file ( e.g. SQL.INI) should be used for database connectivity
information. Optional.
Most arguments are not case-sensitive, but "p" and "pt" are case-sensitive. You can
place a blank between the argument tag and the value, but it is not required. For
example, "/disland" and "/d island" will both work. If the report uses a database
query, and you do not supply all the arguments necessary to connect to the database, a
connection dialog will pop up when the report begins and the user will need to
complete the database name, user name, and/or password.
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Re: Batch running/printing QRP reports
Steve,
Thank you for your detailed response. I had found the notes in the online help file for Report Builder that mentioned running it from command line, but it only mentioned the .CQT files.
Do you have a recommendation on how I can go from having the .QRP file(s) to .CQT . Would I be able to do that at runtime or do I need to convert the .QRP to a .CQT file? How would I pass a runtime parameter (like the key to the transaction that I want the report to run on)?
Thank you for your detailed response. I had found the notes in the online help file for Report Builder that mentioned running it from command line, but it only mentioned the .CQT files.
Do you have a recommendation on how I can go from having the .QRP file(s) to .CQT . Would I be able to do that at runtime or do I need to convert the .QRP to a .CQT file? How would I pass a runtime parameter (like the key to the transaction that I want the report to run on)?
-
- Site Admin
- Posts: 430
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
Re: Batch running/printing QRP reports
To convert an existing .QRP to a .CQT,
You can then pass as many params as you like to the qrp
- File menu --> New menu
- Create a new .CQT by defining a query. i.e. 'Report' menu --> 'Define Query' menu
- Save As menu --> xxxx.CQT
- Edit menu --> Import Template menu
You can then pass as many params as you like to the qrp
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Who is online
Users browsing this forum: [Ccbot] and 0 guests