on 10-04-2020 8:16 AM
One of the 3rd-party Crystal Reports automation tools listed here allows you to overcome CSV export limitations in several ways.
For example, it can automatically export to Excel (Data Only) and convert that to CSV.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can certainly write a program to export to excel and then convert the excel file to csv but that isn't the issue. The issue is that Crystal Reports doesn't produce a valid CSV file if you have use conditional suppression in the report. I am asking that a whole section be suppressed buut Crystal reports is suppressing the data fields in that section and then exporting the section. I don't want a crude workaround - I want the program to work as it should.
If anyone tells me that they WANT the current behaviour then I'd be amazed.
The current behaviour exports a line of commas for each section that you have conditionally suppressed and I can't see why anyone would want that in the output. When you tell crsytal reports to suppress a section it should do as you ask it. Again it works correctly for all other export formats - it fails in CSV files only.
Hi,
I'll try the group selection option to replace the conditional suppression on the section as that may work in some cases. However, sometimes we need to suppress the details section based on some criteria that is determined by what is in the records that preceded the detail line we want to suppress. We can't put this into the reocrd selection criteria because you can't have a selection criteria for a record based on the contents of other records. Section criteria for a record is based on the data in THAT record. This becomes particularly problematic if you are using shared variables.
We are often generating CSV files to be used as interface files to third party systems. We run these as automatic scheduled tasks once a day or once a week etc. The way we have had to do conditional suppression for CSV files in the past is to create one field which is defined as
Field1 &"," & Field2 & "," & Field3 & "," & Field4 & "," & Field5
then we output that one field instead of the original field list.
If we still export to a CSV file we no longer get a row of commas for the suppressed row - we just get a blank line (which is better but still not good as often the integration interfaces we have to export to state that blank lines in the CSV file are not acceptable). So we export as a TEXT file which then suppresses what we are asking to suppress - no blank lines. The file extension is TXT instead of CSV but at least the contents of the file are now a valid CSV file with no lines of commas and no blank lines.
We have one report with 150 columns where we have had to do this. VERY frustrating.
The thing is this is not (or should not be) a "by design" matter. It is a flaw. If you want to suppress the data fields and export a line of commas instead then you would put the conditional suppression on the fields themseves. If you put the conditional suppression on the whole section then that is clearly what you want to happen.
The final point is that all of the other export formats suppress the whole section if that's what you've asked for - it is ONLY the CSV export that has this flaw.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, there is an open request for this on the SAP Influence site. It's been there since 2017 with only a couple of votes. You can go to https://influence.sap.com/sap/ino/#/idea/203602/, log in, and vote for the idea to help increase the possibility that it will be considered for implementation.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apply the suppress condition (in reverse) to the Group Selection formula.
the Group Selection formula allows you to include logic involving summaries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.