RB Procedure help needed

Don't add it to your procedure. Go into report builder create a calculated
field. IIF(DMRActn.totlots < 15, True, false) then go to your data line
activate conditional printing then point to your "Trigger" to print when
"True".

Shirley Graver
Rubber Associates

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Todd Gilbert
Sent: Wednesday, October 26, 2005 11:58 AM
To: vantage@yahoogroups.com
Subject: [Vantage] RB Procedure help needed

With the help of Mike Podlin, I've been linking a number of VB Form
buttons to related reports from Report Builder. This requires that a
procedure be created that contains the filtering parameters needed for
the report (as opposed to using the filters within RB). The problem I
have with one is that I need to filter based on a pre-pass aggregate and
I haven't the foggiest how to do this through the procedure.



Here's the scenario:



I've created a calculated field called 'Lots' which is defined as
IIF(DMRActn.ActionType = 'R',0,1).

Then I've created an aggregate field called 'TotLots' which is defined
as Total(Lots(), No-reset, Every, Final Pass).

Then I have a filter DMRActn.TotLots < 15.



Any idea how to add this to the ReportFilter line in the following
procedure?...



{vbp\vb.i}

DEF VAR ReportLibrary AS CHARACTER INITIAL "S:/REPORTS_2005.PRL".

DEF VAR ReportName AS CHARACTER INITIAL "VQP".

DEF VAR ReportFilter AS CHARACTER INITIAL "".

DEF VAR ReportMethod AS CHARACTER INITIAL "".

DEF VAR ReportCopies AS INTEGER INITIAL 1.

DEF VAR ReportMessage AS CHARACTER INITIAL "This report takes approx. 2
minutes to run.".

FIND RcvDtl WHERE ROWID(RcvDtl) = GetCurrentRowID() no-lock.

ASSIGN ReportFilter = "PartTran.VendorNum=" + STRING(RcvDtl.VendorNum) +
" and PartTran.PartNum='" + STRING(RcvDtl.PartNum) + "' and
(PartTran.TranType = 'INS-STK' or PartTran.TranType = 'DMR-STK' or
PartTran.TranType = 'DMR-REJ')".

RUN VBP\VBFormRpt.R(ReportLibrary, ReportName, ReportFilter,
ReportMethod, ReportCopies, ReportMessage).



Any help would be much appreciated!



Thanks,

Todd Gilbert

5.10.135





[Non-text portions of this message have been removed]



Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links



_____

YAHOO! GROUPS LINKS

* Visit your group "vantage <http://groups.yahoo.com/group/vantage> "
on the web.

* To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com
<mailto:vantage-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

_____


Tracking #: 0A5826840BAE3E4AA700BC7C9E0ECE8F2D74BA28


[Non-text portions of this message have been removed]
With the help of Mike Podlin, I've been linking a number of VB Form
buttons to related reports from Report Builder. This requires that a
procedure be created that contains the filtering parameters needed for
the report (as opposed to using the filters within RB). The problem I
have with one is that I need to filter based on a pre-pass aggregate and
I haven't the foggiest how to do this through the procedure.



Here's the scenario:



I've created a calculated field called 'Lots' which is defined as
IIF(DMRActn.ActionType = 'R',0,1).

Then I've created an aggregate field called 'TotLots' which is defined
as Total(Lots(), No-reset, Every, Final Pass).

Then I have a filter DMRActn.TotLots < 15.



Any idea how to add this to the ReportFilter line in the following
procedure?...



{vbp\vb.i}

DEF VAR ReportLibrary AS CHARACTER INITIAL "S:/REPORTS_2005.PRL".

DEF VAR ReportName AS CHARACTER INITIAL "VQP".

DEF VAR ReportFilter AS CHARACTER INITIAL "".

DEF VAR ReportMethod AS CHARACTER INITIAL "".

DEF VAR ReportCopies AS INTEGER INITIAL 1.

DEF VAR ReportMessage AS CHARACTER INITIAL "This report takes approx. 2
minutes to run.".

FIND RcvDtl WHERE ROWID(RcvDtl) = GetCurrentRowID() no-lock.

ASSIGN ReportFilter = "PartTran.VendorNum=" + STRING(RcvDtl.VendorNum) +
" and PartTran.PartNum='" + STRING(RcvDtl.PartNum) + "' and
(PartTran.TranType = 'INS-STK' or PartTran.TranType = 'DMR-STK' or
PartTran.TranType = 'DMR-REJ')".

RUN VBP\VBFormRpt.R(ReportLibrary, ReportName, ReportFilter,
ReportMethod, ReportCopies, ReportMessage).



Any help would be much appreciated!



Thanks,

Todd Gilbert

5.10.135





[Non-text portions of this message have been removed]