aight, here goes:
I'm trying to create a farily simple report that is little more than a drop ship form for our shippers to use. All I need to do is select one sales order from the database (keep it simple, initially). So, I create a parameter for the sales order in Crystal and adjust the record selection formula accordingly. When I run the report, instead of just grabbing one record from the database, Crystal grabs every stinking one. This is acceptable only if I don't need to link to any other tables. Unfortunately, I do, and this method is grabbing tons of records from the DB, when all is needed is probably ten or twelve records, tops. I've done all the optimizing I can on the selection to get it to pass through, but it simply won't do it. The formula is this:
{SO_03SOHistoryHeader.SalesOrderNumber} = RIGHT("0000000" & {?SalesOrderNumber}, 7)
That should be a constant expression, but Crystal won't pass it through.
After entering the parameter, the SQL query is as follows:
SELECT
SO_03SOHistoryHeader."SalesOrderNumber", SO_03SOHistoryHeader."OrderDate", SO_03SOHistoryHeader."CustomerNumber", SO_03SOHistoryHeader."BillToName",
SO_04SOHistoryDetail."LineIndex", SO_04SOHistoryDetail."ItemNumber", SO_04SOHistoryDetail."ItemDescription", SO_04SOHistoryDetail."OriginalOrderQuantity"
FROM
"SO_03SOHistoryHeader" SO_03SOHistoryHeader,
"SO_04SOHistoryDetail" SO_04SOHistoryDetail
WHERE
SO_03SOHistoryHeader."SalesOrderNumber" = SO_04SOHistoryDetail."SalesOrderNumber"
My guess at a solution is just to create a view from within Crystal so I will only have to run this on one record, instead of thousands.
Crystal version 8.5
Database is MAS200 provideX 3.7something