Hi Denis.
>I defined a report populated by code in DoQuery of the Reports table.
>
>When I'm in the report wizard I can't sort on all the fields available for that cursor.
You can only sort on fields that appear in the fields collection for a report. The fields collection is populated one of two ways:
- if it's a "quick" report, the field collection is populated by the user selected fields
- if it's a FRX report, SFReports reads the FRX, looking for expressions it can match up with the "all fields" collection. It creates an object in the field collection for that report for any matches it finds.
So, I'm guessing this is an FRX report (you didn't say if that was the case) and one of two things is happening:
- You created the report, run it from SFReports so it populated the field collection the first time, then changed the report layout. Since SFReports only reads the FRX if the field collection is empty, it won't see the changes you made in the FRX. To correct that, blank the QUICKFLDS memo for the report record in the reports table.
- The FRX contains expressions that SFReports can't parse. If you have an expression like trim(CUSTOMER.COMPANY), proper(CUSTOMER.COMPANY), etc., SFReports will figure out that CUSTOMER.COMPANY is in the expression and add it to the field collection. If the expression is something like proper(COMPANY), SFReport doesn't know what table that's from, so it isn't added to the field collection. In that case, change your expressions to be fully aliased.
Doug
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only