Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all 3636 articles
Browse latest View live

How to set Crystal Report Field object line spacing in c# in SAP Crystal for HTML Text Interpretation

$
0
0

Hello All,

 

I want to set Crystal Report Field object line spacing in c# in SAP Crystal for HTML Text Interpretation can you provide me solution for this.

 

i am using crystal report version 10.5 and visual studio 2008..

 

and i also attach the image file which display the gujarati text with shruti font, font size 9.

 

Thank You...


CRVS2010 WPF Viewer crashes

$
0
0

Hi All,

 

I have a simple crystal report which has one Group. The report also has a parmeter which is prompted.
When I view the report in a WPF viewer and select an item on the Group Tree the viewer crashes with a

"An unhandled exception of type 'System.StackOverflowException' occurred in CrystalDecisions.CrystalReports.Engine.dll"

I am using Crytsal 13.0.4.705.

 

thanks

 

my code...

 

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource

Public Class Form1
   Private _reportdoc As ReportDocument
   Private _viewer As SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer

   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

      Dim fileName As String = "c:\users\5.0\Reports\sqlserver\X_Country.rpt"
      _viewer = Me.ReportContainer1.reportViewer
      Dim oreport = New ReportDocument
      oreport.Load(fileName, 0)

      With _viewer
         .IsEnabled = True
         .EnableToolTips = True
         .ShowOpenFileButton = False
         .ShowExportButton = True
         .ShowNextPageButton = True
         .ShowPrevPageButton = True
         .ShowPrintButton = True
         .ShowToggleSidePanelButton = True
         .ShowSearchTextButton = True
         .ToggleSidePanel = SAPBusinessObjects.WPF.Viewer.Constants.SidePanelKind.None
         .ShowRefreshButton = True
         .ShowGoToPageButton = True
         .ViewerCore.ReportSource = oreport
      End With
   End Sub
End Class

Loading crystalreportviewers12/js/crviewer/images/scripts.css takes a long time

$
0
0

Loading crystalreportviewers12/js/crviewer/images/scripts.css takes a long time

Hi

 

I am having a problem while viewing crystal reports  via the crystal report web view. The request crystalreportviewer12/js/crviewer/images/scripts.css takes a long time to respond. When I try to view an image  in the same folder, I am able to view the image without any delay.

 

I am using ASP.NET 1.1, Crystal Reports 2008 SP3 on IIS 6.0 runninig on Windows Server 2003 R2. I am struggling to fix this issue for quite a long time. Is there anyone who could advise on this?

 

Thanks.

VB 2008 crystal viewer & report from CR 2008 - crdb_oracle.dll could not be loaded

$
0
0

Hello,

 

I have CR 2008 (12.2.0.290)

VB 2008 (9.0.21022.8)

Oracle 10g

 

I am trying to build an application in VB 2008 that will automatically call and run a report that I have build in CR 2008.

In my stand alone developer my report works fine, I have used an Oracle Connection, my tnsnames has everythign it needs.

 

Here is the code that I am using.

 

http://vb.net-informations.com/crystal-report/vb.net_crystal_report_load_dynamically.htm

 

I get the "Failed to load database information.  database dll 'crdb_oracle.dll' could not be loaded."

 

What am I not doing?

 

I have tested changing the report to ODBC instead and it worked, (just really slowly) which makes that not an option as I am planning on automating about 20 with this code.

Problems with WPF Crystal Reports Viewer on Citrix Client

$
0
0

Hi everyone,

 

my customer currently uses our product on a citrix client ( as far as I know WinServer 2003). It appears that if a user tries to open an .rpt-file in the WPF Crystal Reports Viewer there is a Xerces Panic Error (unfortunatly without any more details, besides: "could not load a transcoding service"). Trying the same with an administrator account does not produce this error.

 

Are there any special folders a user using the viewer needs permissions to?

 

Do you have other ideas?

 

What I already tried was reviewing the keys in the registry beneath HKEY_CLASSES_ROOT\MIME\Database\Charset , but all were valid. (Found that this could make trouble...)

 

Thanks in advance,

Janina

Print job limit in Crystal Reports for ASP.Net environment

$
0
0

We are using Crystal Reports 2008 in a Microsoft ASP.Net environment. Every since we started developing the report module using Crystal Report engine, we have realized the Print Job limitation for Crystal reports on a web server is a huge issue that needs to be handled by writing explicit garbage collection code. Since the code has evolved over more than half a decade, we have had some success in getting rid of this issue to a huge extent. However, there have been and still are users that use our product line that complain of their reporting modules suddenly stopping working pointing a crossing of the Print Job limit imposed by Crystal.

 

Our way of handling the report document disposal issue has been a mix of the straight forward code and some ingenuity.

 

On browsers that give access to the close event of the browser (IE), we generate a server post back on browser close and dispose the report document associated to that window.

 

Also, we keep a track of every report document that is loaded in a Session array and clean the array if the count goes over ten report documents.

 

This seem to work 90% of the times but fails esp. when they are multiple people logged to our Web application, each having a Session of his own in the memory, thus making the report document session array disposal undependable.

 

 

Keeping this in mind, I have some questions that I would love hear some answers from the SAP experts on this forum.

 

1. What's the best way to overcome this issue?

2. Does the 75 print job limit refer to each session on the Web Server or concurrent sessions on the web server.

 

 

 

Regards,

Faisal

Crystal Reports 2008 with Visual Studio 2010

$
0
0

We are developing our project using VS2008, which in turn uses Crystal Reports 2008 (CR Developer 12.3.0.601), Microsofot. NET Framework 3.5 and everything works perfectly.

However, we intend to use our project with Visual Studio 2010.

Everything will work properly with this version of Crystal Reports used by VS 2010?

Regarding Microsofot. NET Framework, which versions are supported?

 

Thanks in advance

Crystal Reports 2008 with Visual Studio 2010

$
0
0

We are developing our project using Visual Studio 2008, which in turn uses Crystal Reports 2008 (CR Developer 12.3.0.601), Microsofot. NET Framework 3.5 and everything works perfectly.

However, we intend to use our project with Visual Studio 2010.

Everything will work properly with this version of Crystal Reports used by VS 2010?

Regarding Microsofot. NET Framework, which versions are supported?

 

Thanks in advance


VB2010 and Crystal 2008 error

$
0
0

Ok sap wanted me to create a simple report program and deploy to my production machine when I go to install on the production machine I get

 

unable to install or run the application. the application requires that assembly

CrystalDecisions.CrystalReports.Design Version 13.0.2000.0 be installed in the global assembly cache (GAC) first.

 

I installed the following on my 64 bit machine.. CRRuntime_64bit_13.0.2.msi

 

I still get the error... any suggestions? the machine it was developed on is a 32 bit machine, should I install the 32 bit option?

 

Jim

Programmatically Set Sort Columns in CR2010 API

$
0
0

The Crystal Report has two Sort Fields originally at design
time. However, it might have more than two Sort fields needed at run time, for
example, 5 Sort Fields. In the previous VB6 with CRAXDRT, where its
RecordSortFields.Add function will be doing the job. But in the CR2010, it
won’t be allowed doing so. Do you know which alternative way could accomplish
this job?

VS2008/CR2008 - changing the database dynamically

$
0
0

I am new to Crystal Reporting so I am still learning the ropes of it. I've been researching this problem for a couple of months and every possible solution has failed. I am using:

  • VS2008 v9.0.21022.8 RTM
  • .NET Framework v3.5 SP1
  • CR2008 v12.3.0.601 product type FULL
  • Oracle Server connections

 

I have a CR using a stored procedure that is connected via the Oracle Server - test database connection. The report works correctly in VS using the test database login info in the web.config file.

 

Next, I added the report to the VS application using the production database connection. However, the CR still wants to connect to the test database even though the web.config file login information is for the production database. I don't want to create a CR for each connection but unless I can find a solution that will dynamically change the stored procedure connection, I will have no choice. Hopefully, there is a solution. Here is the latest code I am using to change the database connection dynamically:

 

  Public Sub setCrptLogon(ByVal psCRptFileName As String)
  Dim z As EventArgs = Nothing

    myReportDocument.Load("\\CrystalReports\Birthday_Cards.rpt")  'psCRptFileName


    Dim connCrRpt As New ConnectionInfo()

    connCrRpt.ServerName = System.Web.Configuration.WebConfigurationManager.AppSettings.Item("ncir_server")
    connCrRpt.DatabaseName = System.Web.Configuration.WebConfigurationManager.AppSettings.Item("ncir_server")
    connCrRpt.UserID = System.Web.Configuration.WebConfigurationManager.AppSettings.Item("ncir_user")
    connCrRpt.Password = System.Web.Configuration.WebConfigurationManager.AppSettings.Item("ncir_password")

 

    Dim crtables As Tables = myReportDocument.Database.Tables
    Dim crtable As Table

 

        For Each crtable In crtables 'myReportDocument.Database.Tables
            Dim logOnInfo As TableLogOnInfo = crtable.LogOnInfo
            logOnInfo.ConnectionInfo = connCrRpt
            crtable.ApplyLogOnInfo(logOnInfo)
        Next

 

    RaiseEvent GetCrystalReportParameters(strStProcName, z)
    uc_CReports.ptyCR_Viewer.ReportSource = myReportDocument
  End Sub

 

When I step through the Sub, the only table in crtables is the stored procedure for the report which is correct. However, I can't change the database information for it dynamically. Any suggestions?

 

Thanks!

PGURI - What is that?

$
0
0

A dynamic cascading ParameterField has following 2 Attributes:

 

IsDCP = True
PGURI =  crobj://{1EB4A34F-C80E-4B84-A9EC-669E921D43BD}

 

How can I find out, what PGURI mean and where find I the mentioned object in the report (I think crobj mean Crystal Reports OBJect)

Crystal Reports v. 13.0.5. Out of Memory

$
0
0

Hi,

 

We are looking to upgrade to Visual Studio 2012 from Visual Studio 2008 and were hoping to also upgrade to the new version of Crystal Reports.

 

We use a webservice to generate CR's on demand. However, initial tests have shown that our webservices-server will run out of memory after roughly 800 CR's. We had a similar problem when trying to upgrade to Visual Studio 2010 and as such cancelled that upgrade all together.

 

I have checked our testing code and it all seems to dispose things whereever possible including a GC.Collect() after the report has been generated and sent back over the line.

 

Is there any additional calls that we need to do in order to clear out the memory, or is this simply the same memory leak as in 2010. If the latter, is there anything we can do to prevent this? We generate a large amount of reports and having to reset the webserver daily is not a desireable situation.

 

Thanks in advance.

 

Regards,

Chris de Bruijn

VerifyDatabase throws exception as "No Error". DB Oracle, SubReports problem

$
0
0

Hi,

I am working in migrating from CR11 to CR13 . I have created UFL (User function lib) in .Net.

Now some reports which have subreports in them dont work fine in case of ORACLE database. Things are working fine in case of SQL database in background.

Some more details are,

RPT file is developed with SQL.

This report works fine with SQL database.

Report has three subreports.

In case of ORACLE if there are no subreports then report is displayed properly.

 

I am using below code for Replace connection,

 

CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument reportClientDocument;

reportClientDocument = new CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper();

 

reportClientDocument = rptDoc.ReportClientDocument;

reportClientDocument.DatabaseController.LogonEx(strDSN, strDatabaseName, strUserID, strPassword);

 

//Create the logon propertybag for the connection we wish to use

CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag objlogonDetails = new CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag();

 

 

//Create the QE (query engine) propertybag with the provider details and logon property bag.

CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag objMainPropertyBag = new CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag();

 

if (m_bSqlServer)

{

                    objMainPropertyBag.Add("Database DLL", "crdb_odbc.dll");

                    objMainPropertyBag.Add("QE_DatabaseName", strDatabaseName);

                    objMainPropertyBag.Add("QE_SQLDB", "True");

}

else

{

                    objMainPropertyBag.Add("Server", strDSN);

                    //objMainPropertyBag.Add("Database DLL", "crdb_oracle.dll");

                    objMainPropertyBag.Add("Database DLL", "crdb_ado.dll");

                    objMainPropertyBag.Add("QE_DatabaseName", strDatabaseName);

                    objMainPropertyBag.Add("QE_SQLDB", "False");

}

 

objMainPropertyBag.Add("QE_DatabaseType", "ODBC (RDO)");

objMainPropertyBag.Add("QE_LogonProperties", objlogonDetails);

objMainPropertyBag.Add("QE_ServerDescription", strDSN);

               

objMainPropertyBag.Add("SSO Enabled", "False");

objlogonDetails.Add("UseDSNProperties", true);

 

if (m_bSqlServer)

{

                    objlogonDetails.Add("PreQEDatabaseName", strDatabaseName);

                    objlogonDetails.Add("PreQEServerName", strDSN);

                    objlogonDetails.Add("Trusted_Connection", "False");                  

 

}

else

{

 

                    objlogonDetails.Add("DSN", strDSN);

                    objlogonDetails.Add("PreQEServerName", strDSN);

                    objlogonDetails.Add("Trusted_Connection", false);               

                     objMainPropertyBag.Add("Owner", strUserID);               

}

 

CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo objNewConnInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();

CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo objOldConnInfo;

CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfos objOldConnInfos;

 

 

objOldConnInfos = reportClientDocument.DatabaseController.GetConnectionInfos();

 

 

for (int i = 0; i < objOldConnInfos.Count; i++)

{

                    objOldConnInfo = objOldConnInfos[i];

 

 

                    objNewConnInfo.Attributes = objMainPropertyBag;

                    objNewConnInfo.Password = strPassword;

                    objNewConnInfo.UserName = strUserID;

                    objNewConnInfo.Kind = CrystalDecisions.ReportAppServer.DataDefModel.CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;

                    reportClientDocument.DatabaseController.ReplaceConnection(objOldConnInfo, objNewConnInfo, null,                                    CrystalDecisions.ReportAppServer.DataDefModel.CrDBOptionsEnum.crDBOptionDoNotVerifyDB);

 

 

                    foreach (string strSubreportsName in reportClientDocument.SubreportController.GetSubreportNames())

                    {

                        CrystalDecisions.ReportAppServer.Controllers.ISCRSubreportClientDocument oSubReportClientDocument =                                              reportClientDocument.SubreportController.GetSubreport(strSubreportsName);

                        oSubReportClientDocument.DatabaseController.LogonEx(strDSN, strDatabaseName, strUserID, strPassword);

                        oSubReportClientDocument.DatabaseController.ReplaceConnection(objOldConnInfo, objNewConnInfo, null,                                              CrystalDecisions.ReportAppServer.DataDefModel.CrDBOptionsEnum.crDBOptionDoNotVerifyDB);

                    }

}

 

//For each table in main report

foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table oTableOld in reportClientDocument.Database.Tables)

{

                    CrystalDecisions.ReportAppServer.DataDefModel.Table oTableNew = GetNewTable(oTableOld, objNewConnInfo, strDatabaseName);

 

                    reportClientDocument.DatabaseController.SetTableLocation(oTableOld, oTableNew);

                    oTableNew = null;

}

 

//For Subreports

foreach (string strSubreportsName in reportClientDocument.SubreportController.GetSubreportNames())

{

                    //Loop through each table in subreport database and set its new table

                    foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table objTableOld in                                    reportClientDocument.SubreportController.GetSubreportDatabase(strSubreportsName).Tables)

                    {

                        CrystalDecisions.ReportAppServer.Controllers.ISCRSubreportClientDocument oSubReportClientDocument =                                    reportClientDocument.SubreportController.GetSubreport(strSubreportsName);

                        CrystalDecisions.ReportAppServer.DataDefModel.Table objTableNew = GetNewTable(objTableOld, objNewConnInfo,                                    strDatabaseName);

 

                        reportClientDocument.SubreportController.SetTableLocation(strSubreportsName, objTableOld, objTableNew);

 

 

                        bool bVerify = oSubReportClientDocument.DatabaseController.VerifyTableConnectivity(objTableNew);

                        objTableNew = null;

                    }

}

 

 

 

 

reportClientDocument.VerifyDatabase();

 

 

 

 

 

When there are subreports in rpt file and when we use ORACLE in that case VerifyDatabase() function throws exception as "No error"

 

 

Thanks in advance.

Error Printing Report from Crystal Reports WPF Viewer in .NET 4.0 and Citrix

$
0
0

We have a .NET application (in-house built) that prints using Crystal Reports for Visual Studio 2010. It runs in a Citrix XenApp context. If we run an on-screen report, using the Crystal Reports WPF viewer control, we see the report as expected. However, if we then click the Printer icon within the CR WPF viewer, we get the following error:

 

 

    An exception occurred while getting the default printer.

    Win32 error: The system cannot find the file specified.

    System.Printing

    at System.Printing.LocalPrintServer.GetDataFromServer(String property, Boolean forceRefresh)

    at System.Printing.LocalPrintServer.get_DefaultPrintQueue()

    at SAPBusinessObjects.WPF.Viewer.PrintControl.ShowPrintDialog()

    at SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport()


Prompting for parameters opens in IE

$
0
0

Hi there

 

I hope someone is able to assist with a problem we have been having for the last 2 years:

 

Certain of our machines are XP and other Windows 7 - our application uses Crystal reports which works well on XP. On the Win 7 machines the Prompting screen for parameters now opens with IE and no longer passes parameters to the reports to run.

 

I have Crystal 2008 which I use to develope reports and all works well in the report designer but when accessed by the application on a Windows 7 machine nothing works. I do not have access to the application source code but think it is using the runtime files installed with Business Objects XI.

c:\program Files (x86)\Business Objects\Common\3.5\

 

I think it has something to do with security settings but cannot find any solutions from Microsoft

 

The only reference I have found to this problem was a discussion/message posted on this forum :

http://scn.sap.com/message/13392151#13392151 - I have tried this process as detailed without any success on various machines

 

Any help would be really appreciated.

 

Thanks

Programmatically Set Sort Columns in CR2010 API

$
0
0

The Crystal Report has two Sort Fields originally at design
time. However, it might have more than two Sort fields needed at run time, for
example, 5 Sort Fields. In the previous VB6 with CRAXDRT, where its
RecordSortFields.Add function will be doing the job. But in the CR2010, it
won’t be allowed doing so. Do you know which alternative way could accomplish
this job?

Read the Definition of dynamic Parameter-Fields via Code

$
0
0

I want to read the definition of the parameter fields. I use VB.NET/VS2010

 

The Name and some other helpfull informations i can meanwhile read and work with them. But I didn´t find the information where dynamic Paramters store the Query (example: Country => ZIPRange => City = Parameter 'CityName')

 

Where is defined the Query and how can I read it

 

Thank you very much

Problem with TWAIN scanners

$
0
0

Ever since we upgraded our application to use Crystal Reports v11, it does not recognize our TWAIN scanner drivers. I have narrowed it down to the ExportToDisk function. The scanners are all accessible in our application until that Crystal function is called.

 

Is this a known problem?

 

Is there a patch?

 

Is there a workaround?

 

Thanks,

Mike

Runtime for Crystal 2011

$
0
0

My company's software has been using runtime installations with Crystal 11 and 2008. The calls to Crystal are done in process with data handed directly to the RPT file through the C++/C# API from SAP. We are looking to add support for Crystal 2011 but from what I have read there is no runtime available. Will we still be able to follow this model? Any updates on 64 bit support?

 

 

http://scn.sap.com/thread/3257339

Viewing all 3636 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>