cancel
Showing results for 
Search instead for 
Did you mean: 

why the Parameter Dialog not invoked with OpenReport RDC SDK?

Former Member
0 Kudos

Hai,

I am working in Crystal Reports XI Release 2 with Visual studio .Net 2003 (VC++).I am using RDC SDK

OpenReport function to create report.The report is generating without any fail.But the parameter dialog not invoked though the report is designed with parameter .

Here is the code snippet i used to generate

OnInitDialog()

{

CoInitialize(NULL);

IApplicationPtr m_Application;

IReportPtr m_Report;

HRESULT hr = m_Application.CreateInstance("CrystalRuntime.Application");

m_Report = m_Application->OpenReport("Sample.rpt");

m_Viewer.SetReportSource(m_Report);

m_Viewer.ViewReport();

}

It creates report in ActiveX viewer but the parameter dialog not invoked before showing in viewer.

But in my another project i have used Crystal report 8 and CRPE32 dll(8 version) API PEStartPrintJob

It invokes parameter dialog automatically before showing report in Viewer.

Thankyou,

SatheeshKumar

Edited by: SatheeshDharmaraj on Mar 18, 2009 12:29 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It seems that you are using non compatible environment.

VS 2003 is only compatible with CR 9.1 (Bundle version which comes with VS), CR XI R1 and CR10.

VS 2005 is only compatible with CR 10.2 (Bundle version which comes with VS), CR XI R2 and CR 2008.

VS 2008 is only compatible with CR 10.5 (Bundle version which comes with VS) and CR 2008 SP0 and SP1

Regards,

Shweta

Former Member
0 Kudos

Hello,

When a parameter dialog box doesn't show it is usually because the report is saved with Saved Data. A report with Saved Data will never try to connect to the database.

Have you tried refreshing the report after it's in the viewer, using the refresh button in the viewer's tool bar? Does this give you a parameter prompt?

Also, open the report in Crystal Reports and go to the File menu. Is there a check mark next to Save Data with Report? If so, uncheck it, resave the report, and try loading it again.

Crystal Reports XI R2 (v11.5) will integrate with VS2003 just fine, however it is worth noting that the RDC was never tested in .NET, so it's not fully supported. It should work, but any issues have to be duplicated in a supported environment (e.g. VB6) to confirm that it's really an issue with the RDC.

Additionally, the RDC has been retired with the release of CR2008, so you can not use the RDC if you decide to move to newer versions of Crystal Reports. The suggested migration path is to move to the Crystal Reports .NET SDK.

Sincerely,

Dan Kelleher

Former Member
0 Kudos

Thankyou for your reply

I tried refreshing the report after it's in the viewer, using the refresh button in the viewer's tool bar.

Then uncheck the Save Data with Report menu.

But problem is

Crystal Reports ActiveX Designer

-


Prompting failed with the following error message: ''.

Error source: Error code: 0x80004005

Then Login failed..

How can i solve this problem please?

Regards,

Satheesh Kumar.D

former_member183750
Active Contributor
0 Kudos

Please note:

The RDC is specifically designed around the COM technologies and is intended for use Visual Basic 6 developers; therefore, it is not recommended, nor tested, for use in a .NET application. This limits the support offering for the RDC in a .NET application; however, because COM is a supported technology in .NET the RDC is known to function as expected in a .NET application.

To support any issue encountered with the RDC in a .NET application, these issues need to be reproducible in a supported COM-based development tool (such as VB6).

Also, the RDC is a retired technology, no longer shipping in the current version of CR - CR 12.x:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d9...

this may have implications to your applications lifecycle as CR XI r2 will be out of support June 10 of this year. See the following for more details:

[original link is broken]

I'd recommend you forget about RDC in .NET and use the CR Assemblies for .NET.

Nevertheless, if you absolutely must stay with the RDC in .NET, the error suggests that you are either not using any database logon code, or the code is incorrect. To connect the report to a database, you must use the connection properties bag. More information on the connection properties bag is [here|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81]

C++ code could look something like this:

bstrt bstrReportPath("C:
Documents and Settings
Mujeeb
Desktop
VC++
RDC_VCPP_CR10
Report1.rpt";);

m_Application.CreateInstance("CrystalRuntime.Application.10";);

m_Report = m_Application-->OpenReport(bstrReportPath, vtTempCopy);

m_Report-->DiscardSavedData();

m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->DeleteAll();

m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Provider","SQLOLEDB.1";);

m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Data Source","10.10.17.30";);

m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("User ID","sa");

m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Password","excellence");

m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Database","Northwind");

m_Report>Database>Verify();

m_Viewer.SetReportSource(m_Report);

m_Viewer.ViewReport();

Now, you do not have to use the deleteAll property and simply log on to the database. Unfortunately only code I have handy for that is as described in the above doc. The code woudl be something like this in VB:

(ODBC)

report.database.tables(1).connectionProperties("DSN") = "the DSN"

report.database.tables(1).connectionProperties("user ID") = "the user ID"

report.database.tables(1).connectionProperties("database" = "the database name"

report.database.tables(1).connectionProperties("password") = "the password"

(if using OLE DB)

report.database.tables(1).connectionProperties("data source") = "the server name"

report.database.tables(1).connectionProperties("user ID") = "the user ID"

report.database.tables(1).connectionProperties("initial catalog") = "the database name"

report.database.tables(1).connectionProperties("password") = "the password"

(if using native connection)

report.database.tables(1).connectionProperties("server:) = "the server name"

report.database.tables(1).connectionProperties("user ID") = "the user ID"

report.database.tables(1).connectionProperties("password") = "the password"

I also recommend searching our notes database for more resources:

https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true

The downloads section may also contain C++ sample code, but I am not sure if there will be anything that uses the connection properties bag. E.g.; do not use deprecated methods such as

.LogOnserver, .SetNthTableLogOnInfo, etc.

Ludek

Former Member
0 Kudos

Thankyou for your reply.

I have solved the problem by following your idea.Thankyou once again.

Now i am deploying the project in client PC.It has no Crystal report XI Release 2 installed.

So i was trying to use merge modules which has Crystal11_NET_EmbeddedReporting.msm file.For this i used to do one setup for the msm file and installed in client PC.

But the Viewer is not invoked at any cause.There were no event of calling open report.

Can u give assistance how to deploy my project in Clinet PC which was developed in CR11 Release2 and VS .NET 2003(VC++) used RDC SDK ?

What are all the files have to be bundled with setup?

I followed the below link to deployment

http://resources.businessobjects.com/support/communityCS/TechnicalPapers/crxi_net_deployment.pdf

Regards,

Satheesh kumar

former_member183750
Active Contributor
0 Kudos

Can u give assistance how to deploy my project in Client PC which was developed in CR11 Release2 and VS .NET 2003(VC++) used RDC SDK ?

- you will have to use the RDC CR XI r2 merge modules and create a deployment project using InstallShield, MS Visual Installer, etc. For more details and download locations see [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsReportDesignerComponentRuntimeDistribution-Versionspre8.0.xto12.0] wiki.

Ludek

Former Member
0 Kudos

Hello Ludek,

Thankyou for your guidence on Crystal Report XI Release 2 Deployment.

I am facing Invalid TLV Record Error when OpenReport() called on deployment.

I used the follwing files to do setup(Created using Install shield 😎 for Deployment.

Crystal Reports DLL: Crqe.dll,Ufmanager.dll,Craxdrt.dll,Crviewer.dll

Other DLLS: Atl.dll (Two versions availbale Windows 2000\NT or Windows XP),Msvcp60.dll,Msvcrt.dll,Riched20.dll

Merge module files: CrystalReports11_5_RDC_License.msm, CrystalReports11_5_RDC_Reportengine.msm

CrystalReports11_5_RDC_Runtime.msm

I configured the destination path for all dll's into my application path after the installation in clinet machine. Then the msm files will be in the path C:\Program Files\Common Files\Merge Modules.

For doing this i followed Report Designer component pdf where all the file informations given.

Cases Tested:

1)Crystal report viewer version mismatch from development machine to Deployment machine,

2)DSN path mismatch from development machine to Deployment machine

I have checked the DSN path mismatch problem.But i dont know how to solve the CR Viewer mismatch problem?

Are the above two cases creates this problem else any other problem do create this one?

I have seen many related threads to this problem here.Not yet solved the problem.please help me to solve the problem.

Thankyou,

Satheesh Kumar.

Edited by: SatheeshDharmaraj on Mar 26, 2009 11:25 AM

former_member183750
Active Contributor
0 Kudos

Invalid TLV Record Error may mean that an old runtime is trying to open latter reports,(or some dll is not registered, or is missing. E.g.; you will get this error using CR 8.5 runtime trying to open CR XI reports.

Search our notes database for the error here;

https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true

Couple of ways of troubleshooting this:

1) Download the modules utility from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip

See where the dlls are loading from on the problem machine and what version they are.

2) Download the Process Monitor utility from here:

http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx

and search the log file the utility creates for any issues accessing a dll, path or registry entry.

Ludek

Former Member
0 Kudos

Ludek

Thankyou for your reply,

Still i am facing Invalid TLV Record Error while opening report.

I used the module utility and found DNSAPI.DLL and GDI32.DLL version mismatch and replaced that in problem machine.

The problem remains same.

I have few questions regarding destination path of msm files,other DLL's and also deployment.

1)Should i place the Crystal Reports DLLs(Crqe.dll,Ufmanager.dll,Craxdrt.dll,Crviewer.dll) in the path of

C:\program files\common files\Crystal Decisions\1.0\Bin or any path we defined?

2)I refered the path of Craxdrt.dll in stdafx.h file of my project where i developed as below

#import "C:\program files\common files\Crystal Decisions\3.0\Bin\Craxdrt.dll" for development.But this particular dll

is placed in different path in client machine as C:\program files\common files\Crystal Decisions\1.0\Bin as any other path?Does this case bring the problem here?

3)Assume like the client machine not having installed of Visual studio 6,MS VS .NET 2003,2005,2008 and nothing related to

CR and Visual studio .NET.Then

where should i place the CR DLL's amd msm files? i mean the destination path of file while doing setup?

4)How can i find whether the report files are corrupted?

The Ufmanager.dll and Crqe.dll are not registered?The errors are "C:\Program Files\Common Files\Crystal Decisions\1.0 \Bin\ufmanager.dll was loaded, but the DllRegisterServer entry point was not found.This file can not be registered" and

"LoadLibrary("C:\Program Files\Common Files\Crystal Decisions\1.0\Bin\crqe.dll") failed - The specified module could not be found" respectively.

Please clarify the doubts and give me any other solutions if there.

Thankyou very much,

Satheeshkumar.

former_member183750
Active Contributor
0 Kudos

Before I answer any more questions, I want you to go to the CR designer, Help About and tell me what version of CR you are actually using?

I ahve no idea why we are talking about C:\program files\common files\Crystal Decisions\1.0\Bin???

Where / why is this path comming from? It's got nothing to do with CR XI of any version...

Ludek

Former Member
0 Kudos

CRXI release 2 Version 11.0.0.1282 is in my CR Designer About Help.

I have given the path C:\Program Files\Common Files\Crystal Decisions\1.0\Bin and it was there in my deployment system already having all the CR DLL's in the version of 9.1.1.467.Hope they were all came with .NET 2003 itself.

So only i asked you wheather i need to put the deployment dll's(11.0.0.1282) in the same path given above.And also i was thinking to put all CR DLL's in my own path for example "D:\Eps Forms" where my exe located due to requirement.

Now i solved the problem when i used the install shield 8 to do setup file.Earlier I was using MS installer where the msm file not register properly.So i couldn't get the files registered properly and also created the path C:\Program Files\Common Files\Business Objects\3.0\bin and crystalreportviewers11 with distributed files.And also i imported the craxdrt.dll in development machine as #import "C:\Program Files\Common Files\Business Objects\3.0\bin\craxdrt.dll" no_namespace .Now it refered correctly.

The problem is solved.I come to know that the proper registration of msm file should create the path C:\Program Files\Common Files\Business Objects\3.0\bin and distribute the files as well.

Thanks a lot Ludek.

Thanks to all members here.

Edited by: SatheeshDharmaraj on Apr 1, 2009 12:40 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry posted false info.

Edited by: Amit Singh on Mar 18, 2009 4:57 PM