on 09-08-2009 7:11 AM
Hi
I am using craxddrt.dll for design at run time. I want to set license at run time through code using vc++.
I have the CR 11.5 Developer Version (30 days Trial Version)
IReportPtr m_crReport;
m_crReport->Application->SetLicenseKeyCode("xxxxxxxx");
but this is not working....
When i debug then error through is "m_crReport->Application CXX0063: Error: overloaded operator -> not supported"
Thanks.
Narender kumar
Hi Narender,
The Craxddrt is a licensed Report Designer and therefore requires a keycode that allows RCAPI to be used. I don't believe the trial includes this. Can you post the keycode and I'll check it.
I tried it an it does work for me using C++ in Visual Studio 6.
Also be aware that as of CR 2008 the embeddable Designer Control is no longer licensed for anyone to use. It is shipped but is used in the .NET IDE only for creating reports in a .NET application.
You may want to move to RAS which you can then build your own report designer or use Eclipse which has a Java based report designer built in you can use.
Thank you
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
But When I install using msm module. Then i can design report at run time (craxddrt.dll).
But problem occur when i use this key code through coding (Setlicensekeycode("xxxxxx"))
you are saying that this is working on your side then this is evalution key code ..plz suggest me where i am wrong..
"CP80Z-G27WYH8-0006VH1-AP81"
Thanks.
Narender kumar
Edited by: Narender kumar khod on Sep 10, 2009 2:01 PM
Edited by: Narender kumar khod on Sep 10, 2009 2:05 PM
Hi Narender,
I tested your keycode and it works for me also. As Jonathan noted You are setting the keycode off the report object, you need to set it off the app object. Here's the code I'm using:
// Get the name and path of the report file selected from the
// Open dialog box.
bstrt FileName(FileDlg.GetPathName().AllocSysString());
// Create the Application Object.
theApp.m_Application.CreateInstance("CrystalDesignRuntime.Application.11");
//Set RCAPI licensing
bstrt m_crKeyCode = "CP80Z-G27WYH8-0006VH1-AP81";
try {
theApp.m_Application->SetLicenseKeycode(m_crKeyCode);
} catch (_com_error& e) {
IErrorInfo* pErrorInfo = e.ErrorInfo();
HRESULT hr = e.Error();
if (pErrorInfo)
{
BSTR bsDesc = NULL;
pErrorInfo->GetDescription( &bsDesc );
bstrt sDesc( bsDesc, false );
MessageBox(sDesc.operator LPCTSTR(), "", MB_OK );
pErrorInfo->Release();
}
}
theApp.m_Report = theApp.m_Application->NewReport();
Thanks again
Don
Hi Don,
Thanks for your response. I was trying to code on your lines but unfoutunately couldnot figure out what theApp, m_Report and m_Application are. Can you please tell me the respective classes of these objects.
Also, I am facing a issue ....When I invoke the designer at run-time in the Crystal application, there
is a help icon at the top (besides the other icons), which when clicked
results into an error - *cannot find the help file*?
Thanks in advance,
Narender
Edited by: Narender kumar khod on Sep 11, 2009 2:01 PM
They're just the object names.... Use mine or simply change them to your names.
/////////////////////////////////////////////////////////////////////////////
// The one and only CCrystalReportTestApp object
CCrystalReportTestApp theApp;
class CCrystalReportTestApp : public CWinApp
{
public:
CCrystalReportTestApp();
IApplicationPtr m_Application;
IReportPtr m_Report;
// Enable the help button
m_Designer.SetEnableHelp(true);
// Set the help context ID
m_Designer.SetWindowContextHelpId(9999);
To configure the registry Key do the following... You may have to adjust to location or key to match your Crystal keys.
1. On the taskbar click "Start" and select "Run"
2. Type "regedit" in the Open textbox to invoke the registry editor
3. Find the key HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.5\Report Designer Component
4. Enter a new value with the name "CRDesignerCtlHelpPath"
5. Enter this value data for this new entry:
C:\Program Files\Crystal Decisions\Crystal Reports 9.5\Developer Files\Help\En\CrystalDevHelp.chm
And of course the usual warning about making changes to the registry.
Thanks again
Don
Edited by: Don Williams on Sep 11, 2009 8:46 AM
Hi, Narender;
The problem is the way you are accessing the Application object off of the Report object. Instead, create an instance of the Application object by itself.
From one of our documents:
Dim Application as New CRAXDRT.Application
Dim Report As CRAXDRT.Report
Application.SetLicenseKeycode (u201CXXXXX-XXXXXXX-XXXXXXX-XXXXu201D)
Set Report = Application.NewReport
Regards,
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.