This is one of the Crystal myths I have come across.
We have two different page headers to display based on a boolean parameter. It works perfectly until we tried to export the report to Excel (Data Only) format. One of the parameter choice will cause the corresponding header not to be exported to that format. However, it works with the opposite parameter selection.
After many different tests, I found it is not to do with the parameter choice but just the position of the header section. As we have to create two page header sections to achieve this, it will always be the one at bottom section gets exported.
With some Internet search, I have eliminate the following common causes of issues to export to Excel (Data Only) format:
1. different fields width and height
2. different alignment with the Detail fields
3. uncheck Simplify page header option in the Excel(Data Only) format export options
At the end, I tried from a mew blank report just had single same field in each header. Use the same boolean parameter to show/hide one and another. It still did not work.
Concluded it is a bug and now, I have to think of a work around.
So I have tried to place these two headers together in one page header and use Supress formula on fields to do show/hide. Found if placing them in parallel, it still will not work until to place them at one line i.e., overlap each other. However, the fields exported to Excel (Data Only) are having spaces in between as the difference between these two headers.
So we had to just use one header and show and hide the extra coulmn(s) which will leave space if it is not show and hopefully, someone else can find the better solution on this.
No comments:
Post a Comment