cancel
Showing results for 
Search instead for 
Did you mean: 

i need that renamed parameter name instead of actual parameter name

Former Member
0 Kudos

Hi,

I m calling Crystal report from VB6.0......

That Crystal Report designed in CR 8.5 version.... by using SQL stored procedure with one sp parameter....

( in design mode, i changed the parameter name as {?PARAM1} in field panel.)

Now i m calling the CR report from vb6.0, this vb6.0 using oracle as a backend...

while calling the report from vb(oracle) through crystal adapter codings land i initialised that crystal is as a 11.0 version by

using some codes ike (Connection made by ODBC)

.....

Dim oCrystalApp As CRAXDDRT.application

Public oRpt As CRAXDDRT.Report

Dim oSection As CRAXDDRT.Section

.....

oCrystalApp.LogOnServer "pdsodbc.dll", sRepDSN, "", msDataBaseUserID, msPassword

....

...

it shows the actual(real) parameter name of that StoredProcedure.

But i need that changed(renamed) parameter name..? can u help me... please

Thanks

Selva...

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Moved to Legacy SDK forum

Not clear what you are using but don't use craxddrt.dll, use craxdrt.dll.

If you are using CR XI then change the DB driver name to crdb_odbc.dll.

Thank you

Don

Former Member
0 Kudos

Hi,

Thanks for your kindness... and earlier Reply...

Can u please Read and guide me:-

1) Actually i have created a CrystalReport using Sql storedProcedure:

CR Name : Sample.rpt

SP name : p_getPatNames(pasid as long)

CR version : 8.5

In that Sample.rpt,

--> CR-Field Explore panel shows the Database Fields, Parameter fields and all.....

--> In ParameterFields area,

--> i Changed (Rename) the Parameter name( pasid ) into PARAM1....

2) Then I called that CR report(sample.rpt) from Visual Basic6.0(by using Sql as a BackEnd),

-


> Using One CRAdapter Vbform

-


> This form Cosists of

-


> CrystalActiveXReportViewer Library 11.0,

-


> Crystal ActiveX Report Designer Runtime Library 11.0

-


> Crystal Report ViewerControl

-


> and i Declared all the Dlls and added all the required codings like

Dim oCrystalApp As CRAXDRT.application

Public oRpt As CRAXDRT.Report

Dim oSection As CRAXDRT.Section

Dim oSubreport As CRAXDRT.SubreportObject

Dim oRptSub As CRAXDRT.Report

Dim oTable As CRAXDRT.DatabaseTable

Dim oField As CRAXDRT.SQLExpressionFieldDefinition

Dim oParameterField As CRAXDRT.ParameterFieldDefinition

Set oCrystalApp = ErrEx.CreateObject("CrystalRuntime.Application")

Set oRpt = oCrystalApp.OpenReport(msRptFile, 1)

oCrystalApp.LogOnServer "pdsodbc.dll", sRepDSN, "", msDataBaseUserID, msPassword

For Each oTable In oRpt.database.Tables

sTable=oTable.Location

if not ORACLE

oTable.SetLogOnInfo sRepDSN, "", msDataBaseUserID, msPassword

oTable.Location = "dbo." + sTable

If ORACLE

oTable.SetLogOnInfo sRepDSN, "", msDataBaseUserID, msPassword

oTable.Location = sTable

next

and then i written all the required codings

--> At Run time, it asks me the parameter name, after i enetered parameter values, its working fine.(No Issues)....

3) Now i m calling the same CR Report(Sample.rpt-Designed by SQL) from the same VB6.0 application.....

a) This time My VB6.0 application Using Oracle 11g as backe end...

b) While i callin the report, a Input Parameter Window came and asks parameter value with the Parametername as "pasid" instead of Renmaed aprametername"PARAM1"...

This is my problem. I need that renamed parameter name(PARAM1) instead of actual sp parametername(pasid), Because i used that renamed aparametername(PARAM1) in the subreport of that report.

After entering the parameter value , the main report workings fine, but the main report did not supply that parameter value intto subreport parameters.

Why this CR XI assigns the parameter value into actual parameter of that StoredProcedure instead of that Renamed Parameter name PARAM1.

..........................?

Please Help

Edited by: avles.kumar.r on Mar 18, 2011 3:16 PM

0 Kudos

Once again, DON'T use:

oCrystalApp.LogOnServer "pdsodbc.dll", sRepDSN, "", msDataBaseUserID, msPassword

change the name from p2sodbc.dll to crdb_odbc.dll. CR Xi is not aware of the legacy dll's.

Set the logon for the subreport also, then it should be able to use the new name.

It an Alias, possibly that is what you need to do.

Thank you

Don

Former Member
0 Kudos

Don,

Very thanks for your reply. But it is not working. i used to change the dlls that what u said.. still it not shows the renamed parameter name.

Actually i forgot to written one line in my previous question.

Please Note down below:

-


I have written a stored procedure(name : p_PatGetNames(pasid as long) in oracle and sql with the same name and it has only one parameter (parameter name also same in oracle and sql...)

I have installed CR8.5 only in my system

But i created a report (sample.rpt) using the SQL stored procedure only. ( i was not created the report using Oracle sp)....

I have ever created all the crystal reports Using SQL sp only(not by oracle storedprocedure ever) ...

I ll call the reports through VB application at run time ....

If i want to run any oracle report, i just changed the database set location of any report to Oracle through Vb application.. its working fine...(I designed all the Crystal reports in CR 8.5 only).Because i have all the sp and table names are same in SQL and ORACLE.

ques:

-


1) My VB application shows the report without any issues when VB runs on sql and Crystalreport should be set located by sql only. (No issues)

2) My VB application gets the problem to showing the report when VB runs on either ORACLE or SQL and Crystalreport should be set located by ORACLE at run time. (This is my issue)

This problem occurs when i using CR11 only not in CR8.5

Can u please help me Don Williams...

By

Selva

0 Kudos

CR XI uses crdb_ drivers, CR 8.5 uses P2S drivers. You can't use CR 8.5 driver names in a CR XI application.

Change it in code and then close the post, no other option.

Don

Former Member
0 Kudos

Thanks Don Williams, I got the answer... Thanks for your patience and guidence,. It was very helpful to me, Very thanks to everyone.....

With Warm Regards

Selvakumar.R

Answers (0)