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

Get Parameter value passed by Crystal Reports from main report to subreport

$
0
0

Hi,

 

I have report which has a Sub-report. The data on the main report is huge. When the user clicks on the link on each row the sub-report appears. The data for this sub-report is based on a number field (id - primary key) which is passed as parameter, but fetched from multiple tables (which are not part of the main report) using complex joins.

 

All this is working. Now let me come to the problem.

 

As the data in question is so huge the sub-report is awfully slow. I was thinking if I could catch hold of the parameter being passed to sub-report at runtime in ClickPage or DrillDownSubreport events, I could have created the dataset on the fly myself and set the datasource for the sub-report dynamically. This would improve performance multi-fold.

 

I did try 'CrystalReport11.Subreports[0].DataDefinition.ParameterFields[0].CurrentValues', but I am getting count as zero.

Also tried 'CrystalReport11.Subreports[0].ParameterFields' but getting 'Not supported within subreports.' exception.

 

We can not depend on the Crystal Report feature of firing the SQL from Crystal report for the subreport, as we need the application to work on different types of databases. Hence we need control over creating and supplying the datasource.

 

Edit: This is a Windows Forms application. The database is in a remote server accessed via internet. This is why the performance is paramount.

 

Please advise me the correct path to take.

 

-- Suresh Balasubramanian


Database connectivity

$
0
0

Hi,

I have an application written in Visual Studio 2010 which has 30 crystal reports all connecting to a sql database. In the designer all work correctly but at run time 5 of them fail to connect to the database? Can anyone point me in the right direction please?

Thanks in advance

Ray

How do you change the print direction at runtime for crystal reports mail label?

$
0
0

Hello

How do you change the print direction at runtime for crystal reports mail label using Visual Studio 2010 and Crystal Reports Cr2010?

I understand how you do that manually on the report, but cannot find the code that would do this at runtime, short of using two reports, one designed for printing across then down and the other to print down then across

 

I am trying to find the code that is equivalent of the manual procdeure of select Section / Details / Layout / Print Direction

Regards
David

CrystalReport loading the original report after modification

$
0
0

Well, this may seem very very strange, I installed CR13SP5 today and after that I modified a report but when I excute. It loads me the original one !

I did verify the rpt source and it's pointing to the right version.

FYI: there're only two OrdreTransfert.rpt files on my pc, one in debug and another in the project folder.

 

Update : I found that MainReport Shows the good version but Main Report Preview is showing the original version ! Could that be an unexpected behavior ?

 

OTC.Load(String.Format(@"{0}\EtatsEdition\OrdreTransfert.rpt",Environment.CurrentDirectory));

Failed to load database information. Error in File {XXXXX}.rpt

$
0
0

Hi i am stuck in an issue with crystal reports and code behind as c#,. My PC configuration OS =64 bit,VS2010 64 bit,Oracle 64 bit.

"Table.Location= DBname+Package+Table.Location" => Here i am getting an error which attached as screen shot.

Crystal Report - Need to print the report continuously without page break, the printer is a POS printer with continuous paper feed.

$
0
0

Hi all,

I am customizing POS solution for my client and my client is using POS printer that supports continuous paper feed.

 

I have designed the receipt using crystal report.

I have displayed Company Detail, Cashier Info in Report Header.

Cash Received and Change displayed in Report Footer.

The purchased item displayed in Details Section as there might have more than one items purchased.

 

The dimension under the page setup is Horizontal: 7.5 cm, Vertical: 10 cm.

The horizontal is measured with ruler and accurate whereas vertical is a random number.

 

I have set the top and bottom margins to 0.00 so that when I print, it will be continuous with the previous page content.

However, I cannot avoid page break if the purchased item not fully utilize one single page, the Report Footer content always displayed in one new page.

This causes the previous page left a big blank area.

 

How to fix this? Please let me know if you have a better idea to achieve this requirement.

Or is it possible to change the Vertical on runtime, but the purchased item details could be short or long (Multiple line is enabled) and I have no idea how many lines of one purchased item detail it could occupy.

 

Thanks in advanced.

Problem with labels in landscape mode

$
0
0

I'm importing a Crystal Reports Visual Studio 2005 that is working fine, but in Crystal Reports Visual Studio 2010 do not.

The report have a custom size h=10cm v=8cm in the paper, and in the report h=8cm v=10cm, and I want the report print in landscape mode to rotate 90ª and fit to the paper.

The problem is that I can't do it, I have tried all the posibilites I think is possible, changing paper sizes by default in the printer, and changing landscape and portrait mode in the report, but always print bad.

I think the printer is not the problem because I use 2 different printers (TEC B-SA4G and Godex EZ-1100 Plus) and both have the same problem with the new report and both work fine with the old one.

Any ideas?

Crystal reports for visual studio express 2012 for web ?

$
0
0

Hi,

 

I was hoping to use Visual Studio Express 2012 for Web IDE edition to create a webpage that handles processing crystal reports from a Coldfusion website.

 

I have installed the files from http://scn.sap.com/docs/DOC-35074

 

I have created a new webform, however there is no Crystal reports node on the Designer\Tools menu.

 

Is it possible to do this using the Visual Studio Express 2012 for Web IDE?


Crystal report CrystalDecisions.Shared conflict with 13.0.2000.0 and 11.5.3700.0 version

$
0
0

Hi,

  I have visual studio 2010 and installed crystal report 13 on my pc in order to run the crystal report on visual studio.  however, I already have crystal report 11 on my pc, so, I uninstalled it.  but when I load the crystal report web page, it display a message is crystaldecisions.shared is conflict with 13.0.2000.0 and 11.5.3700.0,

  they are located in C:\Windows\assembly  path, I tried to uninstall the CrystalDecisions.Shared 11.5.3700.0, but display "access is denied", so could you help me how to solve this problem please ?

 

 

Thanks

Kelvin

CrystalDecisions.Windows.Forms.dll 64-bit application support

$
0
0

We're using the following libraries in our application:

 

CrystalDecisions.Windows.Forms.dll

CrystalDecisions.Shared.dll

CrystalDecisions.CrystalReports.Engine.dll

The latest versions 12.0.2

 

We're migrating our application to 64-bit app but the dlls listed don't seem to be supporting 64-bit application.

Interesting thing is, that version 10.5.37 of the files does support 64-bit applications and we can sort of run in 64-bit mode with this version. I also found an article somewhere on SAP web, which states what I just wrote, but I cannot find it anymore. Of course we don't want to be stuck with legacy version of dlls, so my questions are:

1. Why did SAP change this?

2. Can we get the latest dlls with 64-bit support?

3. Any other solution to this?

 

Thanks

HOW TO RETURN CRYSTAL REPORT LICENECE ??

$
0
0

HOW TO RETURN CRYSTAL REPORT LICENCE?? I BUYIED IN INDIA BUT IT IS NOT ACCEPETD BY MY CLIENT.

WPF .NET 4.0 Blank Report but Export Fine and Data There...

$
0
0

Before you bark at me I have spent the last hour looking for solutions on this forum, however most of the issues are related to IE9 or ASP.  -- Does not help as this is a .Net WPF Application with the WPF Viewer.

 

Development Environment:

VS 2010 Professional

CR for VS2010 SP 4

Windows 7

 

 

Deployment

.Net 4.0 Framework (Not Client)

Windows XP

CR 32 bit 13.4 Runtime

 

Issue: Reports run fine on development machine data shows up as expected.

 

On the Deployment machine, with the WPF Viewer the headers and footers etc show on preview but no data is visible.  When you export to Excel or PDF the data is clearly visible and look as expected.

 

there are no issues with permissions to data or login to database as the data would not be there on export if it was

No Error messages are being reported

 

Happens for all reports at the moment on deployed machine.

 

The reports are not complex,  one crosstab table and standard display data..(two groups and on detail section)

 

Can anyone please point me in the right direction to resolve!!

Background color problem in embedded field in crystal reports

$
0
0

I have following format in crystal reports

text1

text2

text3

 

i placed these all 3 fields in text field in crystal reports for proper alignment when they grow vertically,

my problem is that i need to change background color for text2 field,

how can i achieve this

 

i m using crystal reports for .net 2005

How to design multi-lang report ?

$
0
0

Hi Friends ,

 

I have designed some  sample report with minimum Fields , As per my requirement , I need to change Text Label alone in Multi-Lang Depends Up on Country Code Parameter , I am using VS2010 and Sap Crystal Report Version 13 .

 

Is it possible to change Language Depends up on country code ?

 

For Ex CN - Chinese , FR- France .

Crystal Reports 2011 Upgrade Programming Question

$
0
0

     My team now hosts many websites with .rpt files and we use
Crystal Reports 10 Report Application Server (RAS), aka Crystal Reports Enterprise 10 Embedded
under Windows Server 2003.

     We plan to upgrade to SAP Crystal Reports 2011 under Windows Server 2008 R2.

     Applications now use ASP Classic code like the following to display reports
from within their applications using the obsolete RDC programing interface.

http://cnn304.gov.ab.ca/ctopc/crystal.asp

     My question is - what is the equivalent VB.NET (ASP.NET 4.0) code to
display the same report file (CrystalRASTest.rpt) using Crystal Reorts 2011?

crystal.asp
<%
' This report is called from:
' http://cnn304.gov.ab.ca/ctopc/crystal.asp
'=====================================================================

reportname = "CrystalRASTest.rpt"
%>

<!-- #include file="CrystalRequiredSteps.asp" -->
<!-- #include file="CrystalReportsViewer.asp" -->


CrystalRequiredSteps.asp
<%
'===================================================================================
'Create the Report Application Object and Report Client Document
'===================================================================================
'
' The Crystal Reports object is scoped as a session variable.

' CREATE THE APPLICATION OBJECT                                                                    

Dim ClientDoc, ObjFactory, RptAppSession
Set ObjFactory = CreateObject("CrystalReports10.ObjectFactory.1")

'Create the ReportAppSession which allows communication to the Report Application Server
Set RptAppSession = ObjFactory.CreateObject("CrystalReports.ReportAppSession")
If Err.Number <> 0 Then
Response.Write "Failed to create CrystalReports.ReportAppSession."
Response.Write "Error message: " & Err.Description
Err.Clear
End If

' Initialize the Report Application Session
RptAppSession.Initialize
If Err.Number <> 0 Then
Response.Write "Failed to initialize ReportAppSession."
Response.Write "Error message: " & Err.Description
Err.Clear
End If                                                        
                                                                     
' CREATE THE REPORT OBJECT                                                                                                 
'The Report object is created by calling the ReportClientDocuments object's OpenReport method.

'This "While/Wend" loop is used to determine the physical path (eg: C:\) to the
'Crystal Report file by translating the URL virtual path (eg: http://Domain/Dir)  
Path = Request.ServerVariables("PATH_TRANSLATED")                    
While (Right(Path, 1) <> "\" And Len(Path) <> 0)                     
iLen = Len(Path) - 1                                                 
Path = Left(Path, iLen)                                              
Wend      
                                                                                                                                                                                    
'Create a new ReportClientDocument object for this ReportAppSession.
Set ClientDoc = RptAppSession.CreateService("CrystalReports.ReportClientDocument")
If Err.Number <> 0 Then
Response.Write "Failed to create ReportClientDocument."
Response.Write "Error message: " & Err.Description
Err.Clear
End If  

'Open the report obejct to initialize the ReportClientDocument
clientDoc.Open Path & "\" & reportname

If Err.Number <> 0 Then
Response.Write "Failed to open report """ & ReportPath & """"
Response.Write "Error message: " & Err.Description
Err.Clear
End If 
  
'**IMPORTANT**  Even though we disable the extended error messaging of the engine
'fatal errors can cause an error dialog to be displayed on the Web Server machine.
'For this reason we reccomend that you set the "Allow Service to Interact with Desktop"
'option on the "World Wide Web Publishing" service (IIS service).  That way if your ASP
'application freezes you will be able to view the error dialog (if one is displayed).
%>

CrystalReportsViewer.asp
%
'===================================================================================
'INSTANTIATE THE VIEWER AND DISPLAY THE REPORT THROUGH THE CRYSTAL REPORTS VIEWER
'===================================================================================

Response.ExpiresAbsolute = Now() - 1
Session.CodePage  = 65001 ' UTF-8

' Create the Crystal Reports Viewer
Dim viewer
Set viewer = ObjFactory.CreateObject("CrystalReports.CrystalReportViewer") 
viewer.Name = "Crystal Reports Viewer"
viewer.IsOwnForm = true  
viewer.IsOwnPage = true

'Set the source for the viewer to the ReportClientDocument's report source
viewer.ReportSource = clientDoc.ReportSource

'Process the http request to view the report
viewer.ProcessHttpRequest Request, Response, Null

'ReportClientDocument will be automatically closed when clientDoc is released
%>


Cannot Load File C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll

$
0
0

I'm Using VS 2012 with CR for VS SP5 (2012) on my Development Machine with Win 7 64 Bit with MS Access ADO .Net Connection to Access 2007 DB File

 

Development and all is working fine and had also installed 64 bit CR on my Machine

 

On Executing the Application the following Err. is occuring

 

System.IO.FileNotFoundException was unhandled

  HResult=-2147024894

  Message=Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.

  Source=mscorlib

  FileName=file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll

  FusionLog==== Pre-bind state information ===

LOG: User = SGAI\Amit

LOG: Where-ref bind. Location = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll

LOG: Appbase =******************************************

LOG: Initial PrivatePath = NULL

Calling assembly : (Unknown).

===

LOG: This bind starts in LoadFrom load context.

WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().

LOG: No application configuration file found.

LOG: Using host configuration file:

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.

LOG: Attempting download of new URL file:///C:/Program Files (x86)/SAP BusinessObjects/Crystal Reports for .NET Framework 4.0/Common/SAP BusinessObjects Enterprise XI 4.0/win64_x64/dotnet1/crdb_adoplus.dll.

 

  StackTrace:

       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

       at System.Reflection.Assembly.LoadFrom(String assemblyFile)

       at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)

  InnerException:

 

For Conferming That 64bit CR is installed properly I just created a simple app with CR Viewer and an Blank CR which is working fine.

 

Please Help

c# passing date to crystalreportviewer not working

$
0
0

when I pass a string parameter &P1=text to Crystal Report viewer then the first prompt doesn't show, only the others and the report runs, as I want.. (see attached P1.jpg)

 

but when I send a date: &P2=01/01/12 the second parameter doesn't show, but when I click ok I am then prompted for the second parameter that I passed. (see attached P2a.jpg and P2b.jpg)

 

why are the passed dates being cleared and reprompted?

 

I use this URL:

http://127.0.0.1/MyReport/test.aspx?reportpath=test4.rpt&P2=01/01/2012

 

       private void ReportViewer()
        {
            String reportFile = Request.QueryString.Get("reportpath");

            CrystalReportViewer1.ReportSource = Server.MapPath(reportFile);
            string userID = "crystal";
            string password = "reports";

            foreach (TableLogOnInfo boTableLogonInfo in CrystalReportViewer1.LogOnInfo)
            {
                ConnectionInfo boConnectionInfo = boTableLogonInfo.ConnectionInfo;
                boConnectionInfo.UserID = userID;
                boConnectionInfo.Password = password;
            }

            // pass parameters, prompt for needed ones
            for (int i = 0; i < CrystalReportViewer1.ParameterFieldInfo.Count; i++)
                {
                    if (string.IsNullOrEmpty(Request.QueryString.Get("P" + (i + 1))))
                    {
                            //do nothing this parameter is not passed
                    }
                    else
                    {
                    ParameterField paramField = CrystalReportViewer1.ParameterFieldInfo[i];
                    ParameterDiscreteValue ParamDiscreteValue = new ParameterDiscreteValue();
                    ParamDiscreteValue.Value = Request.QueryString.Get("P" + (i + 1));
                    paramField.CurrentValues.Add(ParamDiscreteValue);
                    }
                }
        }

Alignment in Crystal Report for VS2012

$
0
0

I have a problem for alignment in Crystal Report for VS2012 C#, I am using Arabic design, always it come align to the left rather than middle or right (in the titles) ???

Crystal Reports Server Printing Error

$
0
0

I have a report that I can no longer print from our Crystal Reports server.  When I click the print icon, I get an error that says...


"An error occurred on the server. Printing will be stopped. Would you like to view the error information?"


If I click 'Yes', it opens a blank page at C:\Users\username\AppData\Local\Temp\PrintControlError.html.

 

 

when i try to test  in google chrome i am getting export to pdf dialog box but but when i export the report its giving me this error line

Failed to export using the options you specified. Please check your options and try again.


Failed to export using the options you specified. Please check your options and try again.

$
0
0

I Cant Print or Export  Crystal report with print icon

 

By exporting with pdf or by taking print with ActiveX its giving me this error

 

Failed to export using the options you specified. Please check your options and try again.

 

 

i have installed

Visual studio 2010 ultimate

SAP Crystal Report runtime engine for .NET Framwork 4 (32-bit)

SAP Crystal Report version for Visual Studio 2010

IIS 7

Viewing all 3636 articles
Browse latest View live


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