on 10-16-2008 2:34 PM
Hi there
Im working at a Software-Developing company in Switzerland. We develop datebase-software for public administration. To make our reports we use Crystal Reports (9.2.2.63).
I have a problem with the COM-Function "PutCharStringDelimiter":
void PutCharFieldDelimiter (_bstr_t ppCharFieldDelimiter );
I tried to change the String Delimiter to several characters (#, @, etc) but the function does not seem to have any effect on the delimiter.
The function compiles and executes correctly (no error) but has no effect to the delimiter.
My goal is to set de StringDelimiter to another Character than ".
Many thanks in advance
Sorry for bad english.
Greets
Silvan Winkler
GWZ Informatics
Hi, Silvan;
Version 9 has not been supported for some time now. Can you show the entire code you are using?
The format should be along the lines of:
u2018Set the character to separate fields
Report.ExportOptions.CharFieldDelimiter = "@"
Also, ensure you have patched your version of Crystal Reports 9. Service Pack 7 can be found here:
https://smpdl.sap-ag.de/~sapidp/012002523100005987402008E/cr90win_en_sp7.exe
Best Regards,
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan
Many thanks for your competent answer.
Unfortunatly, the problem still remains.
As u told me, I patched my Version of CR with the newest Service Pack 7.
Furthermore i replaced my codeline:
pExportOptions->PutCharFieldDelimiter(GD5ComBase::Gd4StrToBstr("#"));
with:
pExportOptions->CharFieldDelimiter = "#";
The code compiles and executes correctly. Nevertheless, it has no affect on the delimiter.
Here is the whole code snippet:
BOOL GBACrystalComEngine::OnExportWithCrDriver(GD4String sFileName)
{
OutLog(LogInfo, LL_B, "OnExportWithCrDriver", "sFileName %s", FSTR sFileName, FEND);
BOOL bOK = TRUE;
IExportOptionsPtr pExportOptions;
try
{
pExportOptions = m_pReport->GetExportOptions();
}
catch(_com_error& error)
{
bOK = CryComInternGetErrorCode("Get export options", error);
}
try
{
if (m_lDevice == DEVICE_FILE)
{
pExportOptions->PutFormatType(crEFTTabSeparatedText);
pExportOptions->PutDestinationType(crEDTDiskFile);
pExportOptions->CharFieldDelimiter = "#";
//pExportOptions->PutCharFieldDelimiter(GD5ComBase::Gd4StrToBstr("#"));
}
else if (m_lDevice == DEVICE_PRINTER)
{
pExportOptions->PutFormatType(crEFTCrystalReport);
pExportOptions->PutDestinationType(crEDTDiskFile);
}
else
{
OutMsgTxt(MsgError, "GS-208");
bOK = FALSE;
}
}
catch(_com_error& error)
{
bOK = CryComInternGetErrorCode("Set destination", error);
}
...
thanks in advice for further help
Greets
Silvan
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.