Print Report Builder Report from VB Form

(sigh)
Grasshopper, Confucius said, "He who learns but does not think, is
lost. He who thinks but does not learn is in great danger." "When you
know a thing, to hold that you know it, and when you do not know a
thing, to allow that you do not know it - this is knowledge."
www.brainyquote.com/quotes/authors/c/a126302.html

(eyes crossed, blank stare, utter confusion..)

Try an explicit path such as "x:\vantage\ud\VBReport.p".


--- In vantage@y..., "Shirley Graver" <shirleyg@R...> wrote:
> Lonnie,
> I setup the .p program as your email described, then referenced
it in a
> button in a VB form. When I click the button if gives me "FILE
(file path)
> vbreport.p not found".
> the script under the button is "RUNPROG
> \\raiw2k\EPIC50\VANTAGE\VBP\vbReport.p" I've used the mapped drive
letter,
> and just "RUNPROG vbReport.p". and get the same error.
>
> Oh great Lonniedrew, doejoe master, this unworthy grasshopper,
requests your
> wisdom. Wax on, Wax OFF Wax on, Wax OFF Wax on, Wax OFF Wax on,
Wax OFF
>
> Shirley Graver
> Systems Administrator
> Rubber Associates Inc.
> Cleveland/Akron, OH
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
I was wondering if anybody out there can tell me a way to print a
report builder report from a VB Screen. I am thinking I will have
to write a .r file to do it but I really do not know where to
start. Thanks for any help.

Eric
I tested the following and it worked. Save as "FileName.p". Need to
set the value for RB-Report-Name to the full report name, and RB-
Library to the path and name of the PRL file...

By the way, thanks for the credit earlier!

Good luck,
Lonnie Drew

DEF var report-library AS CHARACTER init "".
DEF VAR RB-REPORT-NAME AS CHARACTER INITIAL "".
DEF VAR RB-DB-CONNECTION AS CHARACTER INITIAL "".
DEF VAR RB-INCLUDE-RECORDS AS CHARACTER INITIAL "?".
DEF VAR RB-FILTER AS CHARACTER INITIAL "".
DEF VAR RB-MEMO-FILE AS CHARACTER INITIAL "".
DEF VAR RB-PRINT-DESTINATION AS CHARACTER INITIAL "?".
DEF VAR RB-PRINTER-NAME AS CHARACTER INITIAL "?".
DEF VAR RB-PRINTER-PORT AS CHARACTER INITIAL "".
DEF VAR RB-OUTPUT-FILE AS CHARACTER INITIAL "".
DEF VAR RB-NUMBER-COPIES AS INTEGER INITIAL 1.
DEF VAR RB-BEGIN-PAGE AS INTEGER INITIAL 0.
DEF VAR RB-END-PAGE AS INTEGER INITIAL 0.
DEF VAR RB-TEST-PATTERN AS LOGICAL INITIAL no.
DEF VAR RB-WINDOW-TITLE AS CHARACTER INITIAL "".
DEF VAR RB-DISPLAY-ERRORS AS LOGICAL INITIAL yes.
DEF VAR RB-DISPLAY-STATUS AS LOGICAL INITIAL yes.
DEF VAR RB-NO-WAIT AS LOGICAL INITIAL no.
DEF VAR RB-OTHER-PARAMETERS AS CHARACTER INITIAL "".

RB-Report-name = "TheReportName".
report-library = "c:\PRLPathAndName".
RB-Print-destination = "?".
RB-filter = "?".

RUN aderb/_printrb.p (report-library,
RB-REPORT-NAME,
RB-DB-CONNECTION,
RB-INCLUDE-RECORDS,
RB-FILTER,
RB-MEMO-FILE,
RB-PRINT-DESTINATION,
RB-PRINTER-NAME,
RB-PRINTER-PORT,
RB-OUTPUT-FILE,
RB-NUMBER-COPIES,
RB-BEGIN-PAGE,
RB-END-PAGE,
RB-TEST-PATTERN,
RB-WINDOW-TITLE,
RB-DISPLAY-ERRORS,
RB-DISPLAY-STATUS,
RB-NO-WAIT,
RB-OTHER-PARAMETERS).



--- In vantage@y..., "othyghost" <Eric@o...> wrote:
> I was wondering if anybody out there can tell me a way to print a
> report builder report from a VB Screen. I am thinking I will have
> to write a .r file to do it but I really do not know where to
> start. Thanks for any help.
>
> Eric
Is there a way to set the filter through this? My guess would be to
set the RB-Filter variable to what I wanted but it still looked at
the filter on the report. Thanks

Eric

--- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> I tested the following and it worked. Save as "FileName.p". Need
to
> set the value for RB-Report-Name to the full report name, and RB-
> Library to the path and name of the PRL file...
>
> By the way, thanks for the credit earlier!
>
> Good luck,
> Lonnie Drew
>
> DEF var report-library AS CHARACTER init "".
> DEF VAR RB-REPORT-NAME AS CHARACTER INITIAL "".
> DEF VAR RB-DB-CONNECTION AS CHARACTER INITIAL "".
> DEF VAR RB-INCLUDE-RECORDS AS CHARACTER INITIAL "?".
> DEF VAR RB-FILTER AS CHARACTER INITIAL "".
> DEF VAR RB-MEMO-FILE AS CHARACTER INITIAL "".
> DEF VAR RB-PRINT-DESTINATION AS CHARACTER INITIAL "?".
> DEF VAR RB-PRINTER-NAME AS CHARACTER INITIAL "?".
> DEF VAR RB-PRINTER-PORT AS CHARACTER INITIAL "".
> DEF VAR RB-OUTPUT-FILE AS CHARACTER INITIAL "".
> DEF VAR RB-NUMBER-COPIES AS INTEGER INITIAL 1.
> DEF VAR RB-BEGIN-PAGE AS INTEGER INITIAL 0.
> DEF VAR RB-END-PAGE AS INTEGER INITIAL 0.
> DEF VAR RB-TEST-PATTERN AS LOGICAL INITIAL no.
> DEF VAR RB-WINDOW-TITLE AS CHARACTER INITIAL "".
> DEF VAR RB-DISPLAY-ERRORS AS LOGICAL INITIAL yes.
> DEF VAR RB-DISPLAY-STATUS AS LOGICAL INITIAL yes.
> DEF VAR RB-NO-WAIT AS LOGICAL INITIAL no.
> DEF VAR RB-OTHER-PARAMETERS AS CHARACTER INITIAL "".
>
> RB-Report-name = "TheReportName".
> report-library = "c:\PRLPathAndName".
> RB-Print-destination = "?".
> RB-filter = "?".
>
> RUN aderb/_printrb.p (report-library,
> RB-REPORT-NAME,
> RB-DB-CONNECTION,
> RB-INCLUDE-RECORDS,
> RB-FILTER,
> RB-MEMO-FILE,
> RB-PRINT-DESTINATION,
> RB-PRINTER-NAME,
> RB-PRINTER-PORT,
> RB-OUTPUT-FILE,
> RB-NUMBER-COPIES,
> RB-BEGIN-PAGE,
> RB-END-PAGE,
> RB-TEST-PATTERN,
> RB-WINDOW-TITLE,
> RB-DISPLAY-ERRORS,
> RB-DISPLAY-STATUS,
> RB-NO-WAIT,
> RB-OTHER-PARAMETERS).
>
>
>
> --- In vantage@y..., "othyghost" <Eric@o...> wrote:
> > I was wondering if anybody out there can tell me a way to print
a
> > report builder report from a VB Screen. I am thinking I will
have
> > to write a .r file to do it but I really do not know where to
> > start. Thanks for any help.
> >
> > Eric
Lonnie,
I setup the .p program as your email described, then referenced it in a
button in a VB form. When I click the button if gives me "FILE (file path)
vbreport.p not found".
the script under the button is "RUNPROG
\\raiw2k\EPIC50\VANTAGE\VBP\vbReport.p" I've used the mapped drive letter,
and just "RUNPROG vbReport.p". and get the same error.

Oh great Lonniedrew, doejoe master, this unworthy grasshopper, requests your
wisdom. Wax on, Wax OFF Wax on, Wax OFF Wax on, Wax OFF Wax on, Wax OFF

Shirley Graver
Systems Administrator
Rubber Associates Inc.
Cleveland/Akron, OH







[Non-text portions of this message have been removed]
Set RB-INCLUDE-RECORDS = "O" to override the saved report filter with
new, "S" or blank to run as saved in RB. For example...

RB-Include-Records = "O".
CompanyName = "xxxxxxxx".
JobVariable = "12345".
CloseChoice = yes.

RB-Filter = "JobHead.Company = '" + CompanyName + "' and
JobHead.JobNum = '" + JobVariable + "' and JobHead.JobClosed = " +
string(CloseChoice,"yes/no").

yields...

"JobHead.Company = 'xxxxxxxx' and JobHead.JobNum = '12345' and
JobHead.JobClosed = yes"

Lonnie

--- In vantage@y..., "othyghost" <Eric@o...> wrote:
> Is there a way to set the filter through this? My guess would be
to
> set the RB-Filter variable to what I wanted but it still looked at
> the filter on the report. Thanks
>
> Eric
>
> --- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> > I tested the following and it worked. Save as "FileName.p".
Need
> to
> > set the value for RB-Report-Name to the full report name, and RB-
> > Library to the path and name of the PRL file...
> >
> > By the way, thanks for the credit earlier!
> >
> > Good luck,
> > Lonnie Drew
> >
> > DEF var report-library AS CHARACTER init "".
> > DEF VAR RB-REPORT-NAME AS CHARACTER INITIAL "".
> > DEF VAR RB-DB-CONNECTION AS CHARACTER INITIAL "".
> > DEF VAR RB-INCLUDE-RECORDS AS CHARACTER INITIAL "?".
> > DEF VAR RB-FILTER AS CHARACTER INITIAL "".
> > DEF VAR RB-MEMO-FILE AS CHARACTER INITIAL "".
> > DEF VAR RB-PRINT-DESTINATION AS CHARACTER INITIAL "?".
> > DEF VAR RB-PRINTER-NAME AS CHARACTER INITIAL "?".
> > DEF VAR RB-PRINTER-PORT AS CHARACTER INITIAL "".
> > DEF VAR RB-OUTPUT-FILE AS CHARACTER INITIAL "".
> > DEF VAR RB-NUMBER-COPIES AS INTEGER INITIAL 1.
> > DEF VAR RB-BEGIN-PAGE AS INTEGER INITIAL 0.
> > DEF VAR RB-END-PAGE AS INTEGER INITIAL 0.
> > DEF VAR RB-TEST-PATTERN AS LOGICAL INITIAL no.
> > DEF VAR RB-WINDOW-TITLE AS CHARACTER INITIAL "".
> > DEF VAR RB-DISPLAY-ERRORS AS LOGICAL INITIAL yes.
> > DEF VAR RB-DISPLAY-STATUS AS LOGICAL INITIAL yes.
> > DEF VAR RB-NO-WAIT AS LOGICAL INITIAL no.
> > DEF VAR RB-OTHER-PARAMETERS AS CHARACTER INITIAL "".
> >
> > RB-Report-name = "TheReportName".
> > report-library = "c:\PRLPathAndName".
> > RB-Print-destination = "?".
> > RB-filter = "?".
> >
> > RUN aderb/_printrb.p (report-library,
> > RB-REPORT-NAME,
> > RB-DB-CONNECTION,
> > RB-INCLUDE-RECORDS,
> > RB-FILTER,
> > RB-MEMO-FILE,
> > RB-PRINT-DESTINATION,
> > RB-PRINTER-NAME,
> > RB-PRINTER-PORT,
> > RB-OUTPUT-FILE,
> > RB-NUMBER-COPIES,
> > RB-BEGIN-PAGE,
> > RB-END-PAGE,
> > RB-TEST-PATTERN,
> > RB-WINDOW-TITLE,
> > RB-DISPLAY-ERRORS,
> > RB-DISPLAY-STATUS,
> > RB-NO-WAIT,
> > RB-OTHER-PARAMETERS).
> >
> >
> >
> > --- In vantage@y..., "othyghost" <Eric@o...> wrote:
> > > I was wondering if anybody out there can tell me a way to print
> a
> > > report builder report from a VB Screen. I am thinking I will
> have
> > > to write a .r file to do it but I really do not know where to
> > > start. Thanks for any help.
> > >
> > > Eric