on 01-12-2018 12:56 PM
Hi
After updating to SP22, formulas not working for excel export anymore.
I have a report that loads without viewer and print data to an excel file (Just data in xlsx). I have one "Show String" formula on a field.
The simple code i use:
Dim crReportDocument As New crExportToExcel
crReportDocument.SetDataSource(dwGaugeView)
crReportDocument.ExportToDisk(ExportFormatType.ExcelWorkbook, SaveFileDialog1.FileName)
And the formula for the Textfield StatusID:
if {Gauges.StatusID} = "-6" then
Formula = "Calibrate"
end if
This formula has worked fine until SP22. The field does not format the string. And the result is now "-6" in the excel file.
I have tried to make a new report, typed the formula in VB and Crystal. Tried to save the file in both xlsx and XLs, but the result is the same, no string formatting
Can I do it in any other way to get export to print the correct string value?
What DB driver are you using, ODBC or OLE dB? Try the other one, could be the Client is now converting the field type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for your answer!
The object is an ordinary field that i draged from the field Explorer and then format in the "FormatEditor". I click the "Show String" button and write the formula. The databasefield is string so the "-6" is text not a number. I succeded with an ugly workaround, i use a table and copys my data to it and formats the field in that way and use the table as datasource . But thats not the way i want to do it especially when it has been working for the last 2 years. 😞
Mikael.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In Design mode, look at where the "-6" is showing up on the report. Is the object on the report the field or the formula?
Is {Guages.StatusID} as string field or a number field in the database? If it's a number, try comparing it to -6 without the quotes.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.