06-15-2012 09:06 AM
I wonder if anybody else has run into this. I have a Crystal Report that I run from a button using ShowReport(ReportNameOrId, EntityTableName, EntityId). The report has a recordselection formula that uses a prompt paremeter. When I run the report, it ignores the EntityId parameter that I pass in and returns every record that matches the record selection formula. If I remove the record selection formula, then the report returns just records for the EntityId that is passed in. My question is, is this the way it's supposed to work, that you can't have a record selection formula AND pass an EntityId parameter?
06-18-2012 01:55 AM
06-18-2012 07:12 AM
Thanks Jack. I'll try that. I still need to prompt the user for additional parameters, but I suppose I could pop up a form with choices and build a sql statement from that. But I'll also take Mike's advice and open a ticket just in case it is a defect.
06-26-2012 07:16 AM
What I ended up doing was opening a smartpart in the dialogworkspace that has a listbox. The user selects one or multiple values and I use those to build a SQL where clause that I pass into a custom function that I created in ShowReportUtil.js. In that function, I set the value of GLOBAL_REPORTING_WSQL to the SQL clause that I passed in. It looks like this: GLOBAL_REPORTING_WSQL = (TICKET.ACCOUNTID = 'AAAAAA00000L') AND (PICKLIST.TEXT = 'Scheduled'). If the user selects multiple values, then I add OR to the PICKLIST.TEXT part of the clause - I tried IN but it didn't work.
It was pretty simple once you told me that I could change the GLOBAL_REPORTING_WSQL.
07-20-2012 06:58 AM
bottom line is there is no easy way to pass Parameters? I need to get some data to a sub report (History Date Range).....has nothing to do with the SQL Statement for the 'base' Crystal Report.......
I suppose I could write to the User Profile table and access the dates from UserDate1, UserDate2??? (the report is by user....this would be the user's desired dates.....)