I need help on how to set 2 parameters to view a report from a certain period to another period. For e.g - Displaying a record from 01/01/06 - 31/01/06
I'm using crystal 8.5 and used the following arguements in my record selection. I get an error message for the second portion of the year and period saying that a string is required here
{ARATR.TRANSTYPE}={?Transtype}
//condition for document type to bring up
and {ARATR.FISCYR}>=NumericText(Year({?StartingPeriod})) and {ARATR.FISCYR}<=NumericText(Year({?EndingPeriod}))
and {ARATR.FISCPER}>=NumericText(Month({?StartingPeriod})) and {ARATR.FISCPER}<=NumericText(Month({?EndingPeriod}))
//condition for period
both tables FISCYR and FISCPER are of string types.
I think that Numerictext returns true/false, it's used to test whether it's a valid numeric, not converting.
Try:
and {ARATR.FISCYR}>=totext(Year({?StartingPeriod}),0,"") and {ARATR.FISCYR}<=totext(Year({?EndingPeriod}),0,"")
and {ARATR.FISCPER}>=totext(Month({?StartingPeriod}),0,"") and {ARATR.FISCPER}<=totext(Month({?EndingPeriod}),0,"")
This assumes that your parameters are numerics.
If they're strings, you won't need to do anything.
Tried the solution outlined above, but it seems to be displaying a blank report instead >< The tables FISCYR and FISCPER are both string fields with lengths of [4] and [2] respectively. Due to the fact that they are strings, I also tried
and {ARATR.FISCYR}>=Year({?StartingPeriod}) and {ARATR.FISCYR}<=Year({?EndingPeriod})
and {ARATR.FISCPER}>=Month({?StartingPeriod}) and {ARATR.FISCPER}<=Month({?EndingPeriod})
Works now. Tried using a numeric instead of date. So i'll have to enter two seperate parameters to ask for the month/year. Less flexible, but gets the job done Thanks man
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.