cancel
Showing results for 
Search instead for 
Did you mean: 

upgrade crystalreport 9 to crystal report 2011

Former Member
0 Kudos

Previous, our project used MFC(VS2008) and crystal report 9 RDC. Now, we want upgrade crystal report to 2011, however, I can not find RDC dll (such as craxdrt9.dll in crystal repot 9). I googled websites , found that RDC is not avaible now. Doest mean that I can not upgrade the current project but re-write ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank u in advance,

Sire

former_member188030
Active Contributor
0 Kudos

RDC COM SDK has been deprecated from CR 2008 and so in CR 2011.

You would need to rewrite your application using Crystal Reports .NET SDK.

See the overview tab for reference material.

- Bhushan

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Getting started and moving ahead with Crystal Reports .NET applications.

former_member183750
Active Contributor
0 Kudos

Hello Sire

To add to Bhushan's post.

The last version of CR to support the RDC was 11.5 (CR XIR2). If you are stuck with the RDC and are not able to move on to VS .NET you may be able to obtain CR XI R2 by calling sales and asking them if this is still available for purchase. Sales number: 866-681-3435.

However I would urge you to consider moving on to the SDK for VS .NET as CR XI R2 is no longer supported. E.g.; no fixes, no phone support, etc.,etc.

Also, note that features introduced in CR 2011 will not be supported in CR XI R2 and may lead to errors.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Thanks Ludek.

Since we are currently using VS2008, is't supported by CR2011?

The reason we upgrade crystal report 9 to 2011 is that the export method of IReport in CR9 would give an error(-2147190548) if SetCurrentValue before export. Otherwise, the HRESULT of export is S_OK . Here is the code for setupParameters :

    void CrystalReportsHelper::setupParameters(std::vector<std::string>& parameterValuePairs)

..............

..............

  IParameterFieldDefinitions* pIParameterFieldDefinitions = NULL;

                HRESULT hr = m_pIReport->get_ParameterFields( &pIParameterFieldDefinitions );

                if (SUCCEEDED( hr ))

                {

                    std::map<std::string,std::string>::iterator iter = parameterValueMap.begin();

                    for(; iter != parameterValueMap.end(); ++iter)

                    {

                        IParameterFieldDefinition* pIParameterFieldDefinition = NULL;

                        CComBSTR ccbstrLabel = iter->first.c_str();

                        CComVariant vtSubReport = "";

                        hr = pIParameterFieldDefinitions->GetItemByName( ccbstrLabel, vtSubReport, &pIParameterFieldDefinition );

                        //hr = pIParameterFieldDefinitions->get_Item( 1, &pIParameterFieldDefinition );

                        if (SUCCEEDED( hr ))

                        {

                            //CComVariant vtValue =atoi( iter->second.c_str());

                            _variant_t v1;

                            v1.vt = VT_BSTR;    

                            v1.bstrVal = (_bstr_t)iter->second.c_str();

                            CComVariant vtValue = CComVariant(iter->second.c_str());

                           

                            hr = pIParameterFieldDefinition->SetCurrentValue(vtValue);

                            //hr = pIParameterFieldDefinition->SetCurrentValue(v1);

                            if (SUCCEEDED( hr ))

                            {

                                LOG_GENERIC(SourceInfo, DebugUtil::DebugInfo, "Added report parameter/value: %s/%s", iter->first.c_str(), iter->second.c_str());

                            }

                            else

                            {

                                LOG_GENERIC(SourceInfo, DebugUtil::DebugError, "Invalid value: %s for parameter: %s", iter->second.c_str(), iter->first.c_str());

                                break;

                            }

                        }

For print and view methods of IReport, whether set parameters of not, they are okay!. Therefore, I confirmed that it is the export that has bugs. The source code for export is as followers:

                    setupParameters(parameterValuePairs);

                    m_pIReport->put_EnableParameterPrompting( m_bEnableParameterPrompting );

                    _mkdir( getHistoryReportPath() );

                    m_pIReport->put_DisplayProgressDialog( false );

      

                        VARIANT vtbPrompt;

                        vtbPrompt.vt = VT_BOOL;

                        vtbPrompt.boolVal = m_bDisplayPrompt;

                        HRESULT result = m_pIReport->Export( vtbPrompt );

Thanks in advance!

Former Member
0 Kudos

Thanks Bhushan.

Is VS2008 supported by CR2011?

former_member183750
Active Contributor
0 Kudos

CR 2011 has no SDK included.

- Ludek

Answers (0)