Struggling with SAP Crystal Reports for visual studio. Reports originally written in XI version. ASP.NET site with SQL Server db. Reports work fine in designer and preview. However every report when run from debugger (IIS Express) prompts for parameters (many dynamic parameters so I know the db credentials are correct), then fail after clicking OK on the parameter prompting screen with Database logon failed. I have tried many different fixes including the CodeBuiler RAS Connection info project found on this forum. The DEV Environment is VS 2012, on Windows 8.1 64 bit, SQL Server 2012 (also tried 2008 R2). I have tried converted reports and new reports same issue. The interesting thing is this is all local development, but in the windows event log I get the failed login with a client ip of 192.168.56.1. Any advice is greatly appreciated.
Database logon failed after parameter prompting
CR for vs2008 not connecting on Windows Server 2012R2
I have an application running on Windows Server 2008R2 which I urgently need to mirror on Windows Server 2012R2.
However, my crystal reports basic runtime for vs2008 version 10.5.1.0
and crystal reports basic runtime for vs2008(64) version 10.5.0.0 brings up the report but doesn't seem to connect to the
database (it seems to be pulling in a null dataset)
What am I doing wrong? [I tried opening all incoming ports, etc, etc]
This is the web.config line:
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
[changing this crashes the application]
Setting PrintOptions.PrinterName doesn´t work with SP2
Problem setting PrintOptions.PrinterName with Crystal Reports for Visual Studio 2010 Service Pack 2 (Version 13.0.2.469)
Framework: .Net Framework 4.0
Language: C#
Crystal Reports Version: Crystal Reports for Visual Studio 2010 Service Pack 2 (Version 13.0.2.469)
Problem: After changing some properties of objects in a report the delegation of PrintOptions.PrinterName doesnu2019t work any more. That means, itu2019s not possible any more, to assign a special printer to a report, that report is then always printed on the default printer.
Sample:
//create CrystalReport CrystalReport1 rpt = new CrystalReport1(); //assign a Printer to the report //here it works, the printer is set to rpt.PrintOptions.PrinterName rpt.PrintOptions.PrinterName = "Microsoft XPS Document Writer"; //setting some properties of objects on the report //effect: the assigned printer is gone, rpt.PrintOptions.PrinterName is empty rpt.Section1.ReportObjects["txtTest"].ObjectFormat.EnableSuppress = false; //assign a Printer to the report doesn´t work any more, this line of code has no effect, //rpt.PrintOptions.PrinterName remains empty rpt.PrintOptions.PrinterName = "Microsoft XPS Document Writer";
This problem occurs since Service Pack 2 (Version 13.0.2.469), before the code was running without any problems.
IE11 doesn't scroll vertically
Hi,
We have an issue in IE11 with the Crystal Reports viewer for ASP.
Our users can not scroll to the end om the page because the scroll bar does not allow them to. The scrollbar is visible but can only be moved a view pixels (see the attachment).
I have tried SP9 to solve the issue but it won't. We use the viewer with .NET 3.5 and it is loaded in an iframe.
When I inspect the dom with the developer tools of IE the scrollbar start working when I remove "position: absolute" from the div element where the scrollbar is shown of with "overflow: auto".
How can I fix this issue?
how to run a report from WCF
hi,
I am trying to run a report from a WCF service application, and then render it in PDF Format to a caller WPF application. But I cant get it! In more detail, this is what my app should do
1. from WPF, call a web service procedure, pass a report name, report path and parameters. Report is store at the same server where Web Service is installed
2. WCF procedure loads report, set parameters, retrieve data from DB and renders it as an array of bytes
3. WPF gets the array, save it into a PDF file, then open it.
this is the code of the WCF procedure.
Function DownloadCRReport(codEnte As String, connString As String, reportDir As String, reportName As String, Parameters As Dictionary(Of String, Object)) As Byte() Implements IGesiService.DownloadCRReport
Try
Dim bytes As Byte()
Dim infile As BinaryReader
Dim fs As FileStream
Dim rep As New ReportDocument
Dim RepAddress As String
logPath = reportDir & "log\"
sb = New StringBuilder()
timestamp = Now.Year.ToString & Now.Month.ToString & Now.Day.ToString & Now.Hour.ToString & Now.Minute.ToString & Now.Second.ToString
logFileName = timestamp & "_" & reportName & ".txt"
logFile = New StreamWriter(logPath & logFileName, FileMode.CreateNew)
logFile.WriteLine("----
Date and time: " & Now.ToString & " -
")
If My.Computer.FileSystem.FileExists(reportDir & reportName & ".rpt") = False Then
Throw New Exception("file RPT non found in: " & reportDir)
End If
RepAddress = reportDir & reportName & ".rpt"
logFile.WriteLine("rep address: " & RepAddress)
rep.Load(RepAddress, OpenReportMethod.OpenReportByDefault)
logFile.WriteLine("load rep")
If rep.DataSourceConnections.Count > 0 Then
rep.DataSourceConnections.Item(0).SetLogon("usr", "pwd")
logFile.WriteLine("data source connection")
End If
For Each i In Parameters
rep.SetParameterValue(i.Key, i.Value)
logFile.WriteLine("param: " & i.Key & " - " & i.Value)
Next
Try
fs = rep.ExportToStream(ExportFormatType.PortableDocFormat)
logFile.WriteLine("export to stream")
infile = New BinaryReader(fs)
logFile.WriteLine("created binaryreader")
bytes = infile.ReadBytes(CInt(fs.Length))
logFile.WriteLine("render pdf. fine")
logFile.Close()
Return bytes
Catch ex As Exception
logFile.WriteLine("vbCrLf & ex.Message & vbCrLf & ex.InnerException.Message)
logFile.Close()
Return Nothing
End Try
Catch ex As Exception
logFile.WriteLine("vbCrLf & ex.Message & "-" & vbCrLf & ex.InnerException.Message)
logFile.Close()
Return Nothing
End Try
End Function
I detected that error occurs on rep.ExportToStream(ExportFormatType.PortableDocFormat). I should point out that the same procedure works under WPF application. In the WCF server I installed CR Runtime engine for .NET framework (13.0.9.1312) and CR version for Microsoft Visual Studio (same version). Moreover, all DB operations are stored into the report, so I should not pass any dataset, just parameters.
Anyway, just to begin, I tried to call a simple report with just two string parameters and no queries, but I alwais get error ("An exception of type 'System.NullReferenceException' occurred in MyApp... Object reference not set to an instance of an object)!
How can I make it work? thanks for help
Hi everyone i am struck in one problem in crystal report with more than one datatable or dataset
Hi i am using VS2012 ,MSSQL 2012,win 7 32 bit,sap crystal report recent version
My problem is when when i am using single datatable as the datasource for reportdocument it shows the report clearly.
When i am using more than one table or dataset it keeps on loading the report and size of the tmp file created keeps on increasing without showing .
One more hint.I am using user defined dataset and datatable .It is not from the database.
And then i am also tried by using database by creating same table in mssql 2012.But also the same problem arise .
The tmp file size increases until the c: full.
Please get me out of these .Thanks in advance.I am waiting for the reply
Install App crystal version 13.0.2000.0
I have created an application using the .NET 4.0 runtime using Visual Studio 2010. The development PC is Windows 7 Ultimate 32bit. I need to use .NET 4.0 because of features required for XML. When I attempt to deploy the application on a PC whose OS is Windows 7 64 Enterprise, the required .NET 4 runtime is installed and the Crsytal reporte runtime is also installed. The install fails with the error: Unable to install or run the application. The application requires that the assembly CrystalDecisions.ReportAppServer.CommonObjectModel Version 13.0.2000.0 be installed in the Global Assembly Cache (GAC) first. It appears the latest version for download is 13.0.1... This issue appears to be common, but yet I can find no fix for it. Help, Please.
Crystal Reports prints to default printer no matter what
We have a .NET/C# application and we upgraded from Crystal v10.2 to v13 recently.
With the v10.2 we used the .NET API. After upgrade we experience a problem: no matter how I we to set the printer name (to the selected printer by user) before printing Crystal prints to the default printer. There are strange exceptions, for example mostly I can print to my local "Microsoft XPS Document Writer", so somehow that can override the stubborn behavior (but not always!). When I try to print to my local "Send to OneNote 2010" printer or other printer however, the report is printed to our default network printer for sure.
When I debug our code with Visual Studio 2012, I can clearly see that:
1. With .NET API: the Crystal ReportDocument object's PrintOptions object's PrinterName property is an empty string, and when I try to assign the desired printer name (like "Send to OneNote 2010"), it simply ignores my try. This is even true if I try to manipulate the object in the debugger or in the Immediate Window.
2. I tried the RAS API too. I can query the RAS object (which has the type of CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument) from the .NET ReportDocument, I guess the .NET API just wraps around the RAS objects. I see that the PrinterName is empty there too. I try to manipulate it through the PrintOutputController, like:
boReportClientDocument.PrintOutputController.ModifyPrinterName("Send to OneNote 2010");
but that try fails either.
About our reports (.rpt files): we should have the "No Printer" checked in all of them (we have like 300 reports in our apps). Now it seems that some of them doesn't have that set, but in those cases changing that would cause problems with our clients. The editor we use doesn't show the "Dissociate Formatting Page size and printer" checkbox in "File/Page Setup".
Support for Visual Studio 2013
Hi there,
I just installed a new system (VMWare, Windows 7 Ultimate) with Visual Studio Professional 2013. I registered the license as a Trial Version for 90 days.
Now I try to install CRforVS_13_0_7 that I downloaded today (oct. 18 2013) from the SAP website.
When running this exe as administrator, after accepting ACL, =Choosing Setup Language English, Windows installer pops up with a message box.
This message box has the title : SAP Crystal Reports, vesion for Microsoft Visual Stuido Setup
The text of the message is :
"You must already have Visual Studio 2010 or Visual Studio 2012 installed to proceed with this installation."
It only gives me the option OK.
When clicking the OK button, the installation is cancelled.
Does anyone know of a fix for this issue because I need CR Reports for Visual Studio and we have to migrate to Visual Studio 2013.
Dynamic image not showing up with newly added records - Access 2010
I have an application that allows the user to basically build a report, which can include pictures that are pulled into the report using the Graphic Location property of the image in the RPT file. The application verifies the path of the image selected and stores that path in the database. When the report is generated, the images are printing on the report very well, with one exception. With a newly added record in the pictures table, the image is not showing on the report until I close the application completely and restart it. After restarting the app, everything prints perfectly.
The records are being added to the database using SQL. I have verified that the connection to the db is being closed and disposed of after the records are added. The report is showing the path of the correct image the first time it's generated after newly added records, so the rpt file is seeing the data correctly, just not showing the image. When I close the app and generate the report again, the pictures and everything else shows on the report perfectly every time. Is there something I can do when connecting to the RPT file before generating the report, or to the database after adding new records to solve this? I'm kind of at a loss. The problem is consistent on both my development machine and when deployed to a test machine.
I do not see the problem when using the Designer. When new picture records are added and I refresh the report preview, everything shows as expected.
VB.net 2010
Access 2010
CR v14 (v13 DLLs in VS 2010)
Report files are stored externally from the application. I am using the Viewer on a form to display the report.
Looking for any thoughts or ideas on how to solve this. Thanks in advance for any suggestions.
Terry
Report Viewer localization
Hello Community!
Concerning the content of the document http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e06b8953-a62b-2d10-38b9-ca71f747e2b1?QuickLink=index&… the russian language is supported.
Do I have to install a language pack on the client or are the language packs included in the current redistributable version of the runtime package?
Thank you for the information!
Problem in Crystal reports Alignment
Hi,
I am facing some alignment problem after upgraded my report from Crystal X1 R2 to Crystal Runtime(SP2 also SP7)
Initially I designed my report in Crystal X1 R2 to print the report in the pre-designed template. Later I upgraded my application to latest crystal Runtime. After that I am facing some alignment problem when print the report.
After up-gradation, i could see some lines are pushed down and few lines are pushed up and it is not printing properly in the pre-designed template.
I tried to do changes in the designer but it is not printing properly.
I have designed report with zero Page Margins and Paper size is A4.
I can see the correct alignment when printing it directly from Crystal designer But When i print the report pro-grammatically through crystal run-time i am facing the same alignment problem.
When analysing this, I noticed few things.
* Only I am facing the problem with zero margin
* After run time-upgradation, When previewing the report I found additional option in the Print dialog of latest crystal viewer. It is page scaling option and It is defaulted with "Scale report page to fit printer page" and disabled.
* We can export the report to various formats. In that case it is working fine for pdf or woreport document when the page scaling option is set as "Do not scale".
Please find the peace of sample code to print the report (Using sample C# application)
private void Print(object sender, EventArgs e)
{
ISCDReportClientDocument rptClientDoc;
PrintOutputController printout;
PrintReportOptions rasprint = new PrintReportOptions();
CrystalDecisions.Shared.PrintLayoutSettings PrintLayout = new CrystalDecisions.Shared.PrintLayoutSettings();
CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
report.Load(@"C:\Users\Desktop\Sampleprintout\sample.rpt"); //design simple report with various page margins
rptClientDoc = report.ReportClientDocument;
printout = rptClientDoc.PrintOutputController;
rasprint.PrinterName = "HP LaserJet 2200 Series PS";
printout.PrintReport(rasprint);
}
Note: Need to add necessary reference files from "C:\Windows\assembly".
I am still struggling to fix this one.
Please help me out.
Windows server installation problem
I've downloaded 13.0.7 runtime (msi) and installed it on a window server 2008 and my default site in IIS is configured for D:\ drive however after installing crystal reports I see that my crystal reports viewer is installed on c drive: c:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers13. Is there any way to force the installer to install in the default website which is in d:\inetpub...???
IsOptionalPrompt property value incorrect on parameter
We have the following subroutine in our vb.net app that will preview a report, but are having a problem with it not retaining all of the parameter properties, specifically, the "IsOptionalPrompt". The report has been loaded into the objReportDocument object (that has been set to the CrystalDecisions.CrystalReports.Engine.ReportDocument object model) via the LoadReport() method. The report we are working with had 4 parameters, the last two of which are optional (IsOptionalPrompt = True).
When the vb.net code is executed below, the IsOptionalPrompt = True in the objReportDocument parameter properties for these last two parameters, but when the RefreshReport() is executed, the parameter setting in the report viewer has the IsOptionalPrompt = False. As a result, it sets our variable, blnInputParmsSet = False, and does not run the report (once it exits this subroutine, we have other code to only run the report if blnInputParmsSet = True).
We need the ReportViewer parameter screen to pop up so the user can enter the parameter values for the report. The RefreshReport() method brings up the parameter screen just fine, but it appears setting the viewer.reportsource is not retaining the objreportdocument properties (for parameters). Is this correct?
If I manually add a line of code, objViewer.ParameterFieldInfo(i).IsOptionalPrompt = objReportDocument.ParameterFields(i).IsOptionalPrompt, after the For i = 0 To objViewer.ParameterFieldInfo.Count - 1, the property is correct. I can do this, but then what other properties do I need to set?
Moreover, why does the RefreshReport() clear these values?
Thank you
Sub SetReportInputParmsFromViewer()
Dim i AsInteger
'For Custom Reports
'Must Use the ReportViewer because objReportDocument will not automatically
'prompt for parameters if no parameters passed in.
objViewer.ReportSource = objReportDocument
objViewer.RefreshReport()
'Does this report have parameters?
'If so, then check to see if the parameter is required to have a value
If objViewer.ParameterFieldInfo.Count > 0 Then
For i = 0 To objViewer.ParameterFieldInfo.Count - 1
'If a value is optional, then set blnInputParmsSet to true
'If value is required, then check to see if it has a value.
'If not, set the blnInputParmsSet to false
If objViewer.ParameterFieldInfo(i).IsOptionalPrompt = FalseAnd _
objViewer.ParameterFieldInfo(i).HasCurrentValue = False Then
blnInputParmsSet = False
Exit For
End If
Next
EndSub
Dynamic pick list values missing in web viewer
We have a report that uses a dynamic pick list to allow the user to select values from a list loaded from the database. When I run the report in the designer, I get prompted with a pick list. We run this report in a web UI and on one server we get the list and on another where the list is supposed to be we get a free-form text entry field that allows me to type in anything at all.
There is zero feedback from CR about what, if anything, went wrong. No event log entries, no dialog boxes, nothing. I have absolutely no idea where to even begin looking for a solution.
The non-working server is using the 64 bit runtime engine for .Net 4, 13.0.3.612 and the working one is running 13.0.2.469. I don't see anything in the release notes suggesting that the was anything "fixed" in the newer version that would break dynamic pick lists.
Crystal Runtime 10.5 for Visual Studio 2008 - viewer/full version support
Hi - can reports developed in VS 2008 (CR basic 10.5) be run externally using a full or viewer version ? If so,is there a restriction on which versions can be used for this (2008 / 11 / 13 etc) and whether the version must be full vs viewer ?
The background is that we have an old asp.net 3.5 system that is being migrated from Windows 2008 / IIS 7 to Windows 2012 / IIS 8 - the app runs fine but it seems the 10.5 runtime is no longer supported. Recompilation using VS 2010 isn't an option so I was looking at client-side solutions if possible to run the reports outside of the .net app - preferably using a free viewer as the reports will not be re-designed.
I'm hoping this is a straightforward question but I've checked a few sites/forums and this isn't very clear. Grateful if someone can advise or point me to a site which clearly covers this.
Thanks.
tmdev
Is SAP Crystal Reports, dev version for VS2013 Available?
Is SAP Crystal Reports, dev version for VS2013 Available?
And http://scn.sap.com/docs/DOC-35074 does this one work well with vs 2013???
Thanks.
ConnectionInfo using 'COM Connectivity' in C#
I need to connect to a DLL using 'COM Connectivity" and a function to provide data for my crystal report in c#,
I have one report that gets populated via a database:
// DATABASE via ODBC-DSN
TableLogOnInfo tblLoginInfo = tbl.LogOnInfo;
tblLoginInfo.ConnectionInfo.ServerName = dsn;
blLoginInfo.ConnectionInfo.UserID = username;
tblLoginInfo.ConnectionInfo.Password = pw;
tbl.ApplyLogOnInfo(tblLoginInfo);
tbl.Location = db + "." + tbl.Name;
// this works great
I have another crystal report that is populated by COM Connectivity
// COM
TableLogOnInfo tblLoginInfo = tbl.LogOnInfo;
tblLoginInfo.ConnectionInfo.ServerName = "myclassname";
tblLoginInfo.ConnectionInfo.Type = ConnectionInfoType.CRQE;
// tbl.Location = ??
// this doesn't work. The report generated is empty/corrupted, but it gives no error
Thank you for your help,
Tammy
Deploying Crystal Reports for Visual Studio
I have created an application in Visual Studio 2010 which uses Crystal Reports. I then created a setup package with InstallShield for VS 2010. I downloaded the CRRuntime_13_0_5.msm merge module (CRforVS_mergemodules_13_0.zip) and added it to the redistributables. When I build the solution I get the error:
Error 2 -1007: Unable to copy file from 'C:\Projects\MATT_Setup\MATT_Setup\Express\Interm\MergeModules\CRNET.F007D36F_EB36_4495_A392_E3A3068B7322\CrystalDecisions.Web.Mobile.MobileV.A10A1B0D.3014.40BE.BF92.8265A3AF3BE9' to 'C:\Projects\MATT_Setup\MATT_Setup\Express\DVD-5\DiskImages\DISK1\program files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\GAC\en\CrystalDecisions.Web.Mobile.MobileViewerSys.resources.dll'. The file path is longer than the limit set by the operating system. Change the build location of the current release to a shorter path to resolve this issue.
It don't see that I have any control over these path names, other than the initial c:\Projects\MATT_Setup. How do I get around this issue?
Crystal Reports does not load aspnet_client files to proper IISExpress directory
Hello,
We are working with Visual Studio 2013 and the latest SP 9 of the SDK. I noticed on install, the aspnet_client files are still installed in c:\inetpub\wwwroot. However, IISExpress in VS 2013 looks in <user>\Documents\WebSites\<SiteName> for it's global files (i.e. aspnet_client). Upon trying to view a report, the viewer then of course choked on ol' "bobj" as the files were not where it was looking.
The solution I suppose would be to copy the aspnet_client folder into each website we create, which obviously is not ideal compared to how 2010 worked (one central location in wwwroot).
Any ideas on how to have only one instance of aspnet_client? Redirect IIS Express to look where Crystal Reports installs the global files?
Thanks,
Chad