Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Criteria to appear to AccpacReport 1

Status
Not open for further replies.

Boris10

IS-IT--Management
Jan 26, 2012
97
KE
Hi everyone,

I am trying to figure out how to print macro criteria on AccpacReport. I am talking about a custom Crystal Report being generated by a macro containing selection criteria. For example: from date and to date. Would anyone have any idea how to display the selected criteria on an AccpacReport.

Thank you
 
Create a new formula and add RecordSelection from Functions, Print State.
 
Thank you Ettienne! record selection does give a full string of selection criteria. The below Crystal code is an example of my record selection:

Code:
{Customer_Product.CUSTOMER} IN "" TO  "ZZZZZZZ" AND {Customer_Product.ORDDATE} IN 20130321 TO 20130321

My question is now, how do i separate the Customer and OrdDate selection. The only way i can think of now is by cutting up the "Record Selection" formula. Is there an inbuilt function to do that or simpler way to get around this problem.

Thank you!
 
Get creative with the Split() function.

stringVar array Criteria := Split (RecordSelection, " AND " );

if instr(Criteria[2],"=") = 0 then
stringVar array DateRange := Split (Criteria[2], " IN " )
else
stringVar array DateRange := Split (Criteria[2], " = " );

stringVar Text := totext(pwformatdate(tonumber(left(DateRange[2],8)))) + " to " + totext(pwformatdate(tonumber(right(DateRange[2],8))));

Text
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top