Hi,
I got parameter query that runs ok in Crystal SQL Designer.
I am using this as datasource ('source.qry') in Crystal 8.5.
I expected it to ask for parameters 'year', 'Start Period' and 'End Period' when the report was run. However,
it doesn't ask for the parameters when report is run.
How can I make the user enter those parameters and pass
it to the query? Thanks.
SELECT IFS_gl_balance.gl_acct, IFS_gl_master.gl_abbrev_desc, (SELECT Sum(IFS_gl_balance1.gl_balance_amt)
FROM IFS_gl_balance as IFS_gl_balance1, IFS_fd_master as IFS_fd_master1
WHERE IFS_gl_balance1.gl_acct = IFS_gl_balance.gl_acct
AND IFS_gl_balance1.gl_year = {?year}
AND IFS_gl_balance1.gl_period < {?Start Period}
AND IFS_gl_balance1.gl_period >= {?End Period}
AND IFS_fd_master1.fd_id = IFS_gl_balance1.fd_id) AS GL_BEGBAL, (SELECT Sum(IFS_gl_balance2.gl_balance_debit)
FROM IFS_gl_balance as IFS_gl_balance2, IFS_fd_master as IFS_fd_master2
WHERE IFS_gl_balance2.gl_acct = IFS_gl_balance.gl_acct
AND IFS_gl_balance2.gl_year = {?year}
AND IFS_gl_balance2.gl_period <= {?End Period}
AND IFS_gl_balance2.gl_period >= {?End Period}
AND IFS_fd_master2.fd_id = IFS_gl_balance2.fd_id) AS GL_DEBITS, (SELECT Sum(IFS_gl_balance3.gl_balance_credit)
FROM IFS_gl_balance as IFS_gl_balance3, IFS_fd_master as IFS_fd_master3
WHERE IFS_gl_balance3.gl_acct = IFS_gl_balance.gl_acct
AND IFS_gl_balance3.gl_year = {?year}
AND IFS_gl_balance3.gl_period <= {?End Period}
AND IFS_gl_balance3.gl_period >= {?End Period}
AND IFS_fd_master3.fd_id = IFS_gl_balance3.fd_id) AS GL_CREDITS
FROM IFS_gl_master INNER JOIN (IFS_gl_balance
INNER JOIN IFS_fd_master ON IFS_gl_balance.fd_id = IFS_fd_master.fd_id)
ON (IFS_gl_master.gl_id = IFS_gl_balance.gl_acct)
AND (IFS_gl_master.fd_company = IFS_fd_master.fd_company)
WHERE (((IFS_gl_balance.gl_year)={?year})
AND ((IFS_gl_balance.gl_period)<={?End Period}))
GROUP BY IFS_gl_balance.gl_acct,
IFS_gl_master.gl_abbrev_desc
ORDER BY IFS_gl_balance.gl_acct, IFS_gl_master.gl_abbrev_desc;
I got parameter query that runs ok in Crystal SQL Designer.
I am using this as datasource ('source.qry') in Crystal 8.5.
I expected it to ask for parameters 'year', 'Start Period' and 'End Period' when the report was run. However,
it doesn't ask for the parameters when report is run.
How can I make the user enter those parameters and pass
it to the query? Thanks.
SELECT IFS_gl_balance.gl_acct, IFS_gl_master.gl_abbrev_desc, (SELECT Sum(IFS_gl_balance1.gl_balance_amt)
FROM IFS_gl_balance as IFS_gl_balance1, IFS_fd_master as IFS_fd_master1
WHERE IFS_gl_balance1.gl_acct = IFS_gl_balance.gl_acct
AND IFS_gl_balance1.gl_year = {?year}
AND IFS_gl_balance1.gl_period < {?Start Period}
AND IFS_gl_balance1.gl_period >= {?End Period}
AND IFS_fd_master1.fd_id = IFS_gl_balance1.fd_id) AS GL_BEGBAL, (SELECT Sum(IFS_gl_balance2.gl_balance_debit)
FROM IFS_gl_balance as IFS_gl_balance2, IFS_fd_master as IFS_fd_master2
WHERE IFS_gl_balance2.gl_acct = IFS_gl_balance.gl_acct
AND IFS_gl_balance2.gl_year = {?year}
AND IFS_gl_balance2.gl_period <= {?End Period}
AND IFS_gl_balance2.gl_period >= {?End Period}
AND IFS_fd_master2.fd_id = IFS_gl_balance2.fd_id) AS GL_DEBITS, (SELECT Sum(IFS_gl_balance3.gl_balance_credit)
FROM IFS_gl_balance as IFS_gl_balance3, IFS_fd_master as IFS_fd_master3
WHERE IFS_gl_balance3.gl_acct = IFS_gl_balance.gl_acct
AND IFS_gl_balance3.gl_year = {?year}
AND IFS_gl_balance3.gl_period <= {?End Period}
AND IFS_gl_balance3.gl_period >= {?End Period}
AND IFS_fd_master3.fd_id = IFS_gl_balance3.fd_id) AS GL_CREDITS
FROM IFS_gl_master INNER JOIN (IFS_gl_balance
INNER JOIN IFS_fd_master ON IFS_gl_balance.fd_id = IFS_fd_master.fd_id)
ON (IFS_gl_master.gl_id = IFS_gl_balance.gl_acct)
AND (IFS_gl_master.fd_company = IFS_fd_master.fd_company)
WHERE (((IFS_gl_balance.gl_year)={?year})
AND ((IFS_gl_balance.gl_period)<={?End Period}))
GROUP BY IFS_gl_balance.gl_acct,
IFS_gl_master.gl_abbrev_desc
ORDER BY IFS_gl_balance.gl_acct, IFS_gl_master.gl_abbrev_desc;