SAP Crystal Report Viewer
Hi,
I have developed a application in visual studio to create and view reports. Now I would like to make this application as default viewer for viewing .rpt files instead with sap report viewer programatically in c# in all the systems i install this application. Please help me in regarding this.
Hi Vamsi,
I honestly don't know how are you going to do to transform the method as default to open the report, but below is a code that will make your report open. From it, you can configure all properties, export and automatically set the parameters. Unfortunately he is different from SAP SBO.
Before you will have to add the library reference:
Crystal Reports Report Source Bridge Library or B1CRBridge.dll (SAP SBO path)
Unfortunately I can't remember which of the two to the right.
Report lReport = new Report();
lReport.Load(@"C:\File.rpt");
lReport.SetDBConnection2(0, "\\local-pc", "SBOTest", "sa", "123456");
var lForm = CrystalReportForm.FromHandle(lReport.PrintPreview());
lForm.Text = "Title of window";
lForm.Show();
Regards,
Paulo Henrique
Similar Messages
-
How to set printersettings for the crystal report viewer in SAP BI dynamically
Hello
I have set the URL method for my crystal report and with parameter passing as shown below, it was displaying the crystal report viewer by connecting to the SAP BI 4.0 server with this method.
http://cr:port/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sDocName=CRLabelParam&sType=rpt&lsSnPrinted=0&lsSsTestProjectNr=1
This URL will be called from Web application by different users, i would like to set the printer settings differently for different users for this crystal report viewer how shall i need to set the printer options?
shall i need to set the printer settings programatically for each user. Please advise me how do i need to proceed.
Thanks & Regards,
Rajeswari.There are no BI / CR APIs that would do this for you. The way I see it, you'll have to have your own print button and populate it with the correct printer information for each user as they request the report. Of course, alternatively, use the viewer printer button and get the users to choose the correct printer.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Crystal Report Viewer ActivX Control into an SAP Form
Hi
I need to show an Crystal Report Viewer in a SAP form This code show an blanck from.
I know that only ATL activX are supported by SB1, but I dont have more information about the Crystal ActivX.
Dim oFormTST As SAPbouiCOM.Form
Dim oCreatP As SAPbouiCOM.FormCreationParams
oCreatP = oApp.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
oCreatP.UniqueID = "TEST"
oCreatP.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
oCreatP.FormType = "TESTFtype"
oFormTST = oApp.Forms.AddEx(oCreatP)
Dim oItemX As SAPbouiCOM.Item
Dim oActivX As SAPbouiCOM.ActiveX
oFormTST.Height = 400
oFormTST.Width = 400
oItemX = oFormTST.Items.Add("TEST01", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
oActivX = oItemX.Specific
oActivX.ClassID = "CrystalReports11.CrystalReportViewer.1"
Dim oRep As CrystalDecisions.Windows.Forms.CrystalReportViewer
oRep = oActivX.Object
oRep.ReportSource = "E:\DevLoc\App\bin\FICHETECH.rpt"
oItemX.Height = oFormTST.Height
oItemX.Width = oFormTST.Width
oFormTST.Visible = True
Some one as an idea ?
ThksVishal,
I would like to let you know of an SBO addon that we have created called CrystalWave. This addon integrates Crystal reports with B1. This might save you a some time trying to recreate the wheel. Please take a look at the following link:
http://www.twbs.com/CrystalWave.html
YOu can download a fully functional copy at http://www.twbs.com/selectcwversion.html
This will work only on the SBODEMO_US company.
Let me know if you have any questions.
Gopal Viswanathan -
1,000,000! One million views in just over three years;
SAP Crystal Reports, developer version for Microsoft Visual Studio Updates & Runtime Downloads;Re. runtime distribution limits; WIN apps, free. Web apps used internal to your organization, free. Web apps deployed external to your organization, extra licensing applies. Check with sales: 866-681-3435
Worldwide Office Locations | SAP
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Crystal Report Viewer integration with Sharepoint 2010
We had a requirement in our project to view crystal report off an hyper link embedded into sharepoint web part developed using ASP .NET. The report accepted few parameters from the sharepoint page and passed those on to the SQL server to retrive data and
display the data in the report. The challenge was to open the report in the web browser.
The first difficulty was to find the right control to use, the report viewer tool that comes with Visual Studio 2010 is not the right one to use to view Crystal reports, I realised this after spending half a day trying to figure out why wouldn't the report
load. I then downloaded the Crystal Report Viewer for VS 2010 Standard from http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp. After you install this, you get the crystal report viewer in your toolbar. All you have to do is drag and drop it on
to the web part and configure it to use your report. If any one needs help with this let me know I will show how to do that.
So far so good. The biggest challenge was to deploy this on to the production server which took better part of 3 days to figure out how its done. If you deploy the WSP file as it is expecting that the crystal DLLs would be embedded in it then be ready to
expect a rude shock because it isn't. Here are the steps -
1. Deploy the WSP to the sharepoint server
2. Install the crystal dlls used in the project (CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.ReportSource.dll, CrystalDecisions.Shared.dll, CrystalDecisions.Web.dll) into the GAC using GacUtil command
3. Add following entries to Web.Config file (C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.congif)
<SafeControl Assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.CrystalReports.Engine" TypeName="*" Safe="True" SafeAgainstScript="False"
/>
<SafeControl Assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.ReportSource" TypeName="*" Safe="True" SafeAgainstScript="False" />
<SafeControl Assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Shared" TypeName="*" Safe="True" SafeAgainstScript="False" />
<SafeControl Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TypeName="*" Safe="True" SafeAgainstScript="False" />
4. Install crystal redistributable package which can be downloaded from http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp (
SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit))
5. Copy aspnet_client folder from C:\>inetpub\wwwroot and overwrite it on C:\>inetpub\wwwroot\wss\VirtualDirectories\80
And we are done. Fingers crossed it should all work.
Prasad Matkar MCP, MCTSHi Mahesh,
How are you loading the report in your webpart? This is what I have done. I have tried to explain what I am doing in the program comments. Hope this helps. Good luck.
SPSite mySite = new SPSite(SPContext.Current.Site.Url.ToString());
SPWeb thisSite = mySite.OpenWeb();
// Writing to event log after every step in debug mode so that you get to know if there was a failure what step the failure occured after.
EventLog.WriteEntry("Reports", "Inside PAge Load ", EventLogEntryType.Error);
SPFolder folder = thisSite.GetFolder("Reports");
if (folder.Exists)
// get collection of Crystal Reports rpt files in the document library
SPFileCollection files = folder.Files;
// open the rpt file and get the contents
SPFile srcfile = files[reportToLaunch];
byte[] content = srcfile.OpenBinary();
// make a temporary folder
DirectoryInfo dir2 = new DirectoryInfo("~/temp");
if (!dir2.Exists)
dir2.Create();
if (File.Exists("~/temp/temp.rpt"))
File.Delete("~/temp/temp.rpt");
// write the report definition to a temporary file
// EventLog.WriteEntry("Reports", "Before Creating temp report ", EventLogEntryType.Error);
//EventLog.WriteEntry("Reports", "Before Create ", EventLogEntryType.Error);
BinaryWriter bw =
new BinaryWriter(File.Open("~/temp/temp.rpt", FileMode.Create));
bw.Write(content);
bw.Close();
// EventLog.WriteEntry("Reports", "After Create ", EventLogEntryType.Error);
// set up the crystal report
ReportDocument reportDoc = new ReportDocument();
reportDoc.Load("~/temp/temp.rpt");
EventLog.WriteEntry("Reports", "after report load ", EventLogEntryType.Error);
ConnectionInfo connection = new ConnectionInfo();
connection.ServerName = "SQLServerName";
connection.DatabaseName = "SQLDatabase";
connection.UserID = "sqluser";
connection.Password = "sqlpassword";
TableLogOnInfo logon = new TableLogOnInfo();
logon.ConnectionInfo = connection;
reportDoc.SetParameterValue("@Parameter1", parameter1);
reportDoc.SetParameterValue("@Parameter2", parameter2);
EventLog.WriteEntry("Reports", "after assigning parameters ", EventLogEntryType.Error);
foreach (CrystalDecisions.CrystalReports.Engine.Table t in reportDoc.Database.Tables)
t.ApplyLogOnInfo(logon);
EventLog.WriteEntry("Reports", "after applying login info ", EventLogEntryType.Error);
// and the Crystal report Viewer
CrystalReportViewer1.ReportSource = reportDoc;
EventLog.WriteEntry("Reports", "Before delete ", EventLogEntryType.Error);
// clean up
File.Delete("~/temp/temp.rpt");
EventLog.WriteEntry("Reports", "after delete ", EventLogEntryType.Error);
Prasad Matkar MCP, MCTS -
Error in Preview and Print in Crystal Report Viewer 2.0.0.7 in Workstation
Hi Guys,
I am encountering a problem when clicking preview and print in Crystal Report Viewer 2.0.0.7. It returns an error
Unhandled exception has occurred in your application. If you click Continue the application will ignore and attempt to continue. If you click quit, the application will close immediately. Load report failed.
I already install the runtime crruntime_120_mlb, . net framework 3.5 sp1 and the add-on itself. The viewer is working properly in SAP Server. My version of SAP is SBO 2007 A SP00 PL10.
Regards,
Michaelhere's the detailed error
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
Exception Text
CrystalDecisions.Shared.CrystalReportsException Load report failed. --- System.Runtime.InteropServices.COMException (0x80004005) The device is not ready.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_Database()
at SAP_CR.MyForms.frmReportViewer.ConfigureCrystalReports()
at SAP_CR.MyForms.frmReportViewer.frmReportViewer_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Loaded Assemblies
mscorlib
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3620 (GDR.050727-3600)
CodeBase fileCWINDOWSMicrosoft.NETFrameworkv2.0.50727mscorlib.dll
SAP_CR
Assembly Version 2.0.0.7
Win32 Version 2.0.0.7
CodeBase fileCProgram%20FilesSAPSAP%20Business%20OneAddOnsSAP_CRSAP_CR.exe
Interop.SAPbouiCOM
Assembly Version 8.0.0.0
Win32 Version 8.0.0.0
CodeBase fileCProgram%20FilesSAPSAP%20Business%20OneAddOnsSAP_CRInterop.SAPbouiCOM.DLL
System.Windows.Forms
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Windows.Forms2.0.0.0__b77a5c561934e089System.Windows.Forms.dll
System
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3614 (GDR.050727-3600)
CodeBase fileCWINDOWSassemblyGAC_MSILSystem2.0.0.0__b77a5c561934e089System.dll
System.Drawing
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Drawing2.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll
CustomMarshalers
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_32CustomMarshalers2.0.0.0__b03f5f7f11d50a3aCustomMarshalers.dll
Interop.CR_Crypto
Assembly Version 6.0.0.0
Win32 Version 6.0.0.0
CodeBase fileCProgram%20FilesSAPSAP%20Business%20OneAddOnsSAP_CRInterop.CR_Crypto.DLL
System.Data
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_32System.Data2.0.0.0__b77a5c561934e089System.Data.dll
System.Configuration
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll
System.Xml
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3082 (QFE.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Xml2.0.0.0__b77a5c561934e089System.Xml.dll
System.Transactions
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_32System.Transactions2.0.0.0__b77a5c561934e089System.Transactions.dll
System.EnterpriseServices
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase fileCWINDOWSassemblyGAC_32System.EnterpriseServices2.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll
CrystalDecisions.Windows.Forms
Assembly Version 12.0.2000.0
Win32 Version 12.0.2000.840
CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.Windows.Forms12.0.2000.0__692fbea5521e1304CrystalDecisions.Windows.Forms.dll
CrystalDecisions.Shared
Assembly Version 12.0.2000.0
Win32 Version 12.0.2000.840
CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.Shared12.0.2000.0__692fbea5521e1304CrystalDecisions.Shared.dll
CrystalDecisions.ReportSource
Assembly Version 12.0.2000.0
Win32 Version 12.0.2000.840
CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.ReportSource12.0.2000.0__692fbea5521e1304CrystalDecisions.ReportSource.dll
CrystalDecisions.CrystalReports.Engine
Assembly Version 12.0.2000.0
Win32 Version 12.0.2000.840
CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.CrystalReports.Engine12.0.2000.0__692fbea5521e1304CrystalDecisions.CrystalReports.Engine.dll
System.Web
Assembly Version 2.0.0.0
Win32 Version 2.0.50727.3618 (GDR.050727-3600)
CodeBase fileCWINDOWSassemblyGAC_32System.Web2.0.0.0__b03f5f7f11d50a3aSystem.Web.dll
CrystalDecisions.ReportAppServer.CommLayer
Assembly Version 12.0.1100.0
Win32 Version 12.0.1100.840
CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.CommLayer12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.CommLayer.dll
CrystalDecisions.ReportAppServer.ClientDoc
Assembly Version 12.0.1100.0
Win32 Version 12.0.1100.840
CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.ClientDoc12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.ClientDoc.dll
CrystalDecisions.ReportAppServer.DataSetConversion
Assembly Version 12.0.2000.0
Win32 Version 12.0.2000.840
CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.ReportAppServer.DataSetConversion12.0.2000.0__692fbea5521e1304CrystalDecisions.ReportAppServer.DataSetConversion.dll
CrystalDecisions.ReportAppServer.DataDefModel
Assembly Version 12.0.1100.0
Win32 Version 12.0.1100.840
CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.DataDefModel12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.DataDefModel.dll
CrystalDecisions.ReportAppServer.Controllers
Assembly Version 12.0.1100.0
Win32 Version 12.0.1100.840
CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.Controllers12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.Controllers.dll
CrystalDecisions.ReportAppServer.CubeDefModel
Assembly Version 12.0.1100.0
Win32 Version 12.0.1100.840
CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.CubeDefModel12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.CubeDefModel.dll
CrystalDecisions.ReportAppServer.ReportDefModel
Assembly Version 12.0.1100.0
Win32 Version 12.0.1100.840
CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.ReportDefModel12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.ReportDefModel.dll
BusinessObjects.Licensing.KeycodeDecoder
Assembly Version 12.0.1100.0
Win32 Version 12.0.0.840
CodeBase fileCWINDOWSassemblyGACBusinessObjects.Licensing.KeycodeDecoder12.0.1100.0__692fbea5521e1304BusinessObjects.Licensing.KeycodeDecoder.dll
JIT Debugging
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example
configuration
system.windows.forms jitDebugging=true
configuration
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box. -
Integration of Crystal Report Viewer in VS2010 WPF
Hello,
I google and research and founded that the viewer control is not attached with VS2010 so, we have to install it separately. I found it form here [http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp].
I installed "SAP Crystal Reports, version for Visual Studio 2010".
Now, I want to add Crystal Report Viewer on my WPF Page. how can I do this ?
I tried to find that control to add in toolbox but I didn't find it.
Please can someone help me int this that how can I add that control and call the report to view in that and change the sql server dynamically for that crystal report.
Bunch of thanks in advance, this would save me a lot....Appreciated any ones help.
ThanksSee [this|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8] demo and search these forums too.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Crystal Report Viewer fails for browser versions =10
We're using the Crystal Reports for VS2010 SP2 and get the following error when trying to generate a report in Firefox 10.0.2 and Chrome 18.0.1025.11 beta-m:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web.ViewerGlobal.get_IsNetscape6Up() +88
CrystalDecisions.Web.CrystalReportViewer.Render(HtmlTextWriter output) +83
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
ASP.app_filters_reportviewer_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\qfmui\10eb2bd5\d0d0d3a5\App_Web_e2fg2prg.2.cs:0
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +8991378
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
If I change the user agent string in Firefox to that of Firefox 7.0.1 everything works as expected, this implies there is some logic in get_IsNetscape6Up() which is failing because the major browser version as reported by the user agent string is two digits instead of one.
We encountered a similar issue for our legacy pages containing Infragistics 2007 controls but were able to fix that by overriding the System.Web.Configuration.HttpCapabilitiesBase.BrowserCapabilitiesProvider and faking the browser version to 9.80. Crystal Report Viewer is apparently not using .Net's built in HttpBrowserCapabilities object, is there anything else I can adjust to stop the viewer failing?hello Robert
Today must be my day. I already got a reply from PM (normally it takes a "bit" longer...). Anyhow, here is what he said:
With Firefoxu2019s release cycles, I donu2019t think weu2019ll be able to officially support the latest versions
of Firefox at every service release. We do our best to test the released versions of Firefox
that align with our releases. I donu2019t know the details but Iu2019ve heard there is a plan in place where
the support team(s) (?) will test the most recent releases of Firefox with whatu2019s currently
shipping by SAP and log bugs as necessary.
(umm, this is my - Ludek note here ) -> news to me re. support doing QA... find out something new every day. Anyhow, continuation of the message from PM:
The current plan for CR for VS2010, the SP3 release (expected in April) will support up to
Firefox 9. If there are reproducible bugs in Firefox 10 (or higher), then please enter a bug
and escalate and it will be investigated for the next available release.
I'll revisit this once SP3 is out there and do an escalation for Firefox 10 - ok?
- Ludek -
Crystal Report Viewer Control error
Please Help, I have a web application developed in .net 2005 which is using crystal reports developer product version 10.0.0.533.
This web application with crystal is working fine on my local machine with OS windows xp, but on the windows server 2003 the application web form is running into "couldnot load file or assembly 'CrystalDecision.VSDesigner, Version=10.0.0.3300' or one of its dependencies"
I have compared the assembly information of my local machine with that of the server and could not see the crystaldecision.vsdesigner version 10.0.0.3300 on the server 2003. I have uninstalled microsoft .net 2005 and crystal reports and installed crystal first and visual studio .net 2005 next and vice versa but still could not see that particular assembly available in the windows 2003 server.
Please suggest as what to do for the assembly to be available on the server so crystal report viewer control can be created with out error. Thanks for any help.Hello Sunitha,
Visual Studios 2005 ships with a bundled edition of Crystal Reports. This bundled edition is based on the v10 code stream, but it is not CR10. It's CR.NET for Visual Studios and it's v10.2. Crystal Reports 10.0 and the bundled CR.NET 10.2 for VS2005 are not interchangeable.
The stand alone version of Crystal Reports 10 is not expected to integrate correctly into VS2005. If you have CR10 Developer installed on your VS2005 machine you can force VS2005 to use the CR10.0 assemblies, but it is not supported.
You need to clean up your application so that it's referencing the 10.2 version assemblies and then deploy the 10.2 runtime files. You can visit the [Crystal Reports for Visual Studio .NET Runtime Distribution - Versions 9.1 to 12.0|https://www.sdn.sap.com/irj/scn/wiki?path=/display/bobj/crystalReportsruntimeforVisualStudio.NET] Wiki for a nice overview of the various versions of Crystal Reports, as well as a listing of the runtime files to match the version of Crystal Reports that is being used. For VS2005 and bundled CR.NET look at the "CR 10.2 (VS .NET 2005)" section of the Wiki.
Sincerely,
Dan Kelleher -
Crystal report viewer does not observe the PaperSize and PageOrientation setting
Hi:
My application is a 3 tier application, where the WinForm client is connected to the WCF Services hosted in IIS server.
The report is generated on server side using WCF service, and export as.rpt with data, the .rpt file is then sent to the WinForm client, the Crystal Report viewer is used to load the .rpt file for preview and print.
On server side I've Microsoft XPS Document Writer installed and set as default printer. On the client side if the default printer is XPS or Nitro PDF creator, the report can be view and print correctly, report design in landscape will be able to show in the landscape in CR viewer, report design using custom paper size (e.g. Half Letter), CR viewer able to show it in Half Letter.
The problem that I'm facing is when the default printer is set to HP LaserJet P1120 or others (I've tried Epson ESC/P Standard driver), the report is always shown in the portrait, and it will not be able to show in custom paper size either. Here is my code:
Dim settings As New System.Drawing.Printing.PrinterSettings
Dim rep as New ReportDocument
rep.Load(sOutputFileName) 'The report is download from server and save in sOutputFileName
SetReportPaperSize(rep, sPaperSizeName, False, settings) ' sPaperSizeName store the name of the custom paper used in the report
CrViewer.ReportSource = rep
Public Shared Sub SetReportPaperSize(rep As ReportDocument, paperSizeName As String, isHardCopy As Boolean, settings As Printing.PrinterSettings)
Dim installedPrinters As Printing.PrinterSettings.StringCollection = Printing.PrinterSettings.InstalledPrinters
Dim printers As New List(Of String)
Dim sPrinter As String
If installedPrinters.Count = 0 Then
Return
End If
SetPrinterDefaultPaperSize(rep.PrintOptions, paperSizeName, settings)
With rep.PrintOptions
.PrinterName = settings.PrinterName
.PaperSource = PaperSource.Auto
If paperSizeName.Trim.Length > 0 Then
.PaperSize = DirectCast(GetPapersizeId(paperSizeName, settings, rep.PrintOptions.PaperSize), CrystalDecisions.Shared.PaperSize)
End If
End With
End Sub
Public Shared Sub SetPrinterDefaultPaperSize(printOptions As PrintOptions, paperSizeName As String, settings As Printing.PrinterSettings)
With settings.DefaultPageSettings
If paperSizeName.Trim.Length = 0 Then
. PaperSize = GetPaperSize (printOptions.PaperSize, settings)
Else
For Each size As Printing.PaperSize In settings.PaperSizes
If size.PaperName.EqualsTo(paperSizeName) Then
.PaperSize = size
Exit For
End If
Next
End If
.Landscape = printOptions.PaperOrientation = PaperOrientation.Landscape
.Margins.Top = printOptions.PageMargins.topMargin
.Margins.Left = printOptions.PageMargins.leftMargin
.Margins.Bottom = printOptions.PageMargins.bottomMargin
.Margins.Right = printOptions.PageMargins.rightMargin
End With
End Sub
Public Shared Function GetPaperSize(paperSizeId As Integer, defaultPrinterSettings As Printing.PrinterSettings) As Printing.PaperSize
Dim settings As Printing.PrinterSettings = defaultPrinterSettings
Dim result As Printing.PaperSize
If settings Is Nothing Then
settings = New Printing.PrinterSettings
End If
' Default paper Size defined in the printer
result = settings.DefaultPageSettings.PaperSize
For Each size As Printing.PaperSize In settings.PaperSizes
If size.RawKind = paperSizeId Then
result = size
Exit For
End If
Next
Return result
End Function
Public Shared Function GetPapersizeId(paperSizeName As String, defaultPrinterSettings As Printing.PrinterSettings Optional defaultpaperSizeId As CrystalDecisions.Shared.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize) As Integer
Dim settings As Printing.PrinterSettings = defaultPrinterSettings
Dim result As Integer = defaultpaperSizeId
If settings Is Nothing Then
settings = New Printing.PrinterSettings
End If
If Not String.IsNullOrEmpty(paperSizeName) Then
For Each size As Printing.PaperSize In settings.PaperSizes
' Height and Width in Printing.PaperSize is measure in hundredths of an inch
If size.PaperName.EqualsTo(paperSizeName) Then
result = size.RawKind
Exit For
End If
Next
End If
Return result
End Function
Setting the PrintOptions.PaperSize and PageOrientation seem like no effect on the viewer. My code to load the report to CR viewer is much more complicated than the code I show above, I've a background worker thread to download the report, and when the worker thread finished download the report from the server, it will assign the report to CRViewer. Do the changes in report PrintOption before assign to CRViewe and after assigning to CRViewer make any different?
I'm using VS2010, CR XI R2 (Version 11.5.3700.0). Please Help. Thanks
Regards
JC VoonHi JC,
CRXI R2 is a no go with VS 2010, these two are not compatible.
With CR 11.5 use VS 2005.
Or Use VS 2010 and CR for VS 2010 (13.0)
Once you have the supported / compatible conbination of CR and VS, use the In Proc RAS .NET code from below KBA.
http://search.sap.com/notes?id=0001561333&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64653D3939382669765F7361706E6F7465735F6E756D6265723D30303031353631333333
Also, see the KBAs returned by below search. The top right corner search box on this page is quite helpful.
http://search.sap.com/ui/scn#query=crystal%252C+paper%252C+orientation%252C+.net%252C+sdk&startindex=1&filter=scm_a_site(scm_v_Site11)&filter=scm_a_modDate(*)&timeScope=all
- Bhushan
Senior Engineer
SAP Active Global Support
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Getting started and moving ahead with Crystal Reports .NET applications. -
Crystal Reports Viewer Toolbar Images missing
I have Crystal Reports XI R2 installed on a windows server 2008 R2 Enterprise server and when a when I browse to my asp.net page withe the crystal reports viewer I get the red x's for the toolbar images. The viewer and web.config entries all reference the 11.5.3700.0. When I view the source of the page the source is "../aspnet_client/system_web/2_0_50727/crystalreportviewers115". At first the crystalreportviewers115 was not in subfolder at my sites root aspnet_client folder and so I copied it there. But it still doesn't work.
What seems odd is that we I was using the embedded version from VS 2008 (10.5.3700.0) the view source of the page showed the image path as "/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4" and this worked fine but when I use XI R2 (11.5.3700.0) the path is "../aspnet_client/system_web/2_0_50727/crystalreportviewers115" so where and why is there ".." for the XI R2 version.CR 11.5 is not supported on WIn 2008 server. See [this|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567] wiki.
You may also want to take a look at the article [Viewer toolbar images appear as red u2018X on Crystal Reports VS .NET web viewer|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50aa68c0-82dd-2b10-42bf-e5502b45cd3a]. It may help, but if not, you'll have to move on to a supported version of CR.
Ludek
Follow us on Twitter
http://twitter.com/SAPCRNetSup -
Crystal Reports Viewer Control - Visual Studio 2008 WEB Application
My question is this: Has ANYONE on this planet been able to get the ASP .NET CR Viewer control to actually work?
Why does this editor NOT recognize End-of-line or CR characters or any whitespace??
I have developed a Crystal Reports "Viewer" web application in VS2008 using C#.
It's a simple app, in that it's a single page with a treeview control (containing the grouped names of the reports to which the user has access) and the CR Viewer control.
The report files live on a network share, and permissions to them is controlled via a SQL Server database, which, for each report, stores the UserID and Logion for the oracle database, as well as any required parameter values.
The reports themselves are all hititng an Oracle 10g database.
I managed to do this in a Windows desktop applcation using Visual Studio 2005 and VB .net, but now, upon trying to make this a web application in VS2008, I have completely failed. The application works when run locally, but when deployed to the web server, I experience database login prompts when I should not, (the dreaded "Report requires further information" message) even thought the setdatabaselogin has already been set. I have tried saving the reportdocument in viewstate and re-assigning the viewer Datasource property to it, that also fails. However, it only does it on some reports, and not others. (admittedly, the reports may have been created using different CR versions)
The viewer also displays data it should not be displaying when I attempt to scroll, when I do manage to get a report to run.
I am setting parameters dynamically at run time, whose values are stored in the SQL database.
Code Sample:
protected void ShowReport(int ReportID)
SQLDataPortal2005.Common sql = new SQLDataPortal2005.Common();
Hashtable outParms = new Hashtable();
string sAccess;
IDataReader dr;
CrystalDecisions.CrystalReports.Engine.ReportDocument rptDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
sAccess = p.Identity.Name;
int j = 0;
int i = -1;
if (!IsAdmin())
sql.ExecNonQuery("CrystalReports", outParms, "proc_CRM_Check_Permissions", sAccess, Convert.ToInt32(TreeView1.SelectedNode.Value));
if (outParms["@Allow"].ToString() != "True")
Response.Redirect("ErrorPage.aspx"); // redirect to error page
string sPath = System.Configuration.ConfigurationManager.AppSettings["WareHouse"].ToString();
sPath = sPath + TreeView1.SelectedNode.Text.Trim() + ".rpt";
rptDocument.Load(sPath);
dr = sql.GetDataReader("CrystalReports", "proc_CRM_Get_Report", Convert.ToInt32(TreeView1.SelectedNode.Value));
while (dr.Read() == true)
j += 1;
if (j < 2)
rptDocument.SetDatabaseLogon(dr["DB_Login"].ToString(), dr["DB_Pwd"].ToString(), "PLAW", "LAWDB", true);
pList = dr["ParmList"].ToString().Split(',');
dr.Close();
dr.Dispose();
if (pList.Length > 0 && pList[0].ToString().Trim() != "")
foreach (CrystalDecisions.Shared.ParameterField x in rptDocument.ParameterFields)
i++;
switch (x.ParameterValueType)
case CrystalDecisions.Shared.ParameterValueKind.BooleanParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToBoolean(pList<i>));
break;
case CrystalDecisions.Shared.ParameterValueKind.CurrencyParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToDouble(pList<i>));
break;
case CrystalDecisions.Shared.ParameterValueKind.DateParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToDateTime(pList<i>));
break;
case CrystalDecisions.Shared.ParameterValueKind.DateTimeParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToDateTime(pList<i>));
break;
case CrystalDecisions.Shared.ParameterValueKind.NumberParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToInt32(pList<i>));
break;
case CrystalDecisions.Shared.ParameterValueKind.StringParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToString(pList<i>));
break;
case CrystalDecisions.Shared.ParameterValueKind.TimeParameter:
rptDocument.SetParameterValue(x.Name, Convert.ToDateTime(pList<i>));
break;
Session["CReport"] = rptDocument;
CRV1.ReportSource = rptDocument;
CRV1.DisplayGroupTree = false;
CRV1.HasRefreshButton = true;
CRV1.ShowFirstPage();
Is there a better/different way of accomplishing this very simply process? All I need this application to do is to view a report, while setting it's parmeters (if required) dynamically at run time. I don't EVER want the user to be prompted for DB LOGIN INFO.
Edited by: RichardK on May 10, 2010 4:14 PM
Edited by: RichardK on May 10, 2010 4:14 PM
Edited by: RichardK on May 10, 2010 4:16 PM
Edited by: RichardK on May 10, 2010 4:18 PM
Edited by: RichardK on May 10, 2010 4:22 PM
Edited by: RichardK on May 10, 2010 4:23 PMTo answer you question; Yes, I suspect that most of the users in this community have managed to successfully create web apps. And this is the tiniest of sampling of the developers out there...
A few suggestions;
1) Keep the posts to under 1200 characters. Otherwise, the formatting is lost which makes it difficult to read.
2) Try out a few sample apps from here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
Suggest; csharp_web_simplelogonengine.zip, csharp_web_simplelogonviewer.zip and csharp_web_subreport_logon.zip.
3) Start simple; one table, one field, no subreports. Hard code the database logon parameters. Convince your self that this does work. Increase the complexity - add fields, tables, subreports. Do not mix connection methods (e.g.; if ODBC for main, than ODBC for sub is a good idea, though not a requirement).
4) See the article [Troubleshooting Guide to Database Connectivity Issues with Crystal Reports in Visual Studio .NET Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de].
5) See [this|http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/d05b3bb7-0f28-2c10-4ea3-84dbdc4e414e?quicklink=index&overridelayout=true] article.
6) Consider creating a phone case here:
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
Ludek
Follow us on Twitter
http://twitter.com/SAPCRNetSup -
Crystal Report Viewer and Windows Vista
Hi,
We are using RDC methodology for launching the crystal reports in the web using ASP.
The web server operating system is Windows 2003, Crystal Reports XI is installed in it. Report is not launching in only one client machine. For all the other client machines reports are launching perfectly. The problem is blank white activex control is displayed. I tried to register the crystal reports viewer (ActiveXViewer.cab available in the crystal installation folder) deliverables in the client machine but after installing the deliverables same problem persists.
When I click on the Crystal Report viewer Internet Explorer Exception occurs
The following add-on was running when this problem occurred:
Add-on Name: CRViewer.dll
Company Name: (Not verified)Business objects
Description: Crystal Report Viewer
Two buttons
Advanced... and Continue are shown but when we click on the button IE crashes
The client machine operating system is u201CWindows Vistau201D service pack 2
Internet Explorer 7 version is installed in it.
In the client machine event viewer log the following details are available.
Log Name: Application
Source: Application Error
Date: 10/29/2010 9:18:35 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: BillVista.toyalloc.local
Description:
Faulting application iexplore.exe, version 7.0.6002.18005, time stamp 0x49e01e78, faulting module CRViewer.dll, version 11.0.0.893, time stamp 0x41b6ac85, exception code 0xc0000005, fault offset 0x0001f8e7, process id 0x210, application start time 0x01cb7773d2b1c584.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2010-10-29T14:18:35.000Z" />
<EventRecordID>98684</EventRecordID>
<Channel>Application</Channel>
<Computer>BillVista.toyalloc.local</Computer>
<Security />
</System>
<EventData>
<Data>iexplore.exe</Data>
<Data>7.0.6002.18005</Data>
<Data>49e01e78</Data>
<Data>CRViewer.dll</Data>
<Data>11.0.0.893</Data>
<Data>41b6ac85</Data>
<Data>c0000005</Data>
<Data>0001f8e7</Data>
<Data>210</Data>
<Data>01cb7773d2b1c584</Data>
</EventData>
</Event>
Could any one help me regarding this.Hello,
First thing to do is upgrade to [CR XI R2 SP4 full build|https://smpdl.sap-ag.de/~sapidp/012002523100011802732008E/crxir2_sp4_full_build.exe]. Then get up to Service Pack 6 and you should not have problems with Vista.
CR XI R1 will not and has never been tested on that OS.
If you do not want to upgrade though use Process Monitor to watch for Access Denied errors. Also run IE in Compatibility mode.
Likely what is happening is your test PC doesn't have rights to install ActiveX controls.
Thank you
Don -
Crystal Report Viewer (SmartViewerActiveX/ActiveXViewer) barcode problem
I am using the crystal reports viewer to show my reports in my asp website.
In the reports, I have a barcode using the font source IDAutomationHC39M.ttf.
This code must be a certain size that I indicated in my report design.
The problem is that the viewer appears in the browser with the barcode expanded to full size, and not with the size that I indicated in report design.
If I print from the program Crystal Reports, it appears according to the size indicated.
It seems that this is a problem of the Viewer in the browser.
Someone can help me? this matter is very urgent.
Thank you.Thread moved to the .NET - SAP Crystal Reports forum.
A few details missing:
1) Version of CR?
2) CR updates applied?
3) Version of .NET?
4) OS?
5) What browser and version?
6) is the issue present on dev / deployed computer / both?
Oh, BTW.; if this is urgent, consider creating a phone case here:
http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
Edited by: Ludek Uher on Feb 3, 2012 10:26 AM -
Crystal Reports Viewer - pdf, prompts, icons problem
Hi all,
I am a new in BO.
I have some answer about Crystal Reports Viewer (not about setup.exe but about CRV application that I uploaded on Tomcat)
1) The old version (11.5) works good, only Export to PDF functionality is wrong. There are in the pdf file wrong display of specific czech characters (charset)
2) A new version, Crystal Reports Viewer 2008, show the same pdf mistake. I have J2SE Runtime Environment 5.0 Update 4 and Apache Tomcat 5.5.9.
I upload application on Tomcat, configuration (web.xml, crconfig.xml and context.xml) is the same with version 11.5.
Crystal Reports Viewer 2008 displayed reports, but the problem with PDF is present. The second problem is the look of CRV. First one, the icons (for export, print...all icons) are not displayd. I can copy old jar files into java (in application folder C:\WebReports\WEB-INF\lib), but then CRV looks like old version.
And CRV 2008 doesn't display listbox in dynamic prompt on crystal report. What shall I set to displaying prompts in CRV 2008 (on CRV or on report in Crystal 2008)?
Have you some idea? What and how can I set and configure application and where?
VeronikaHi,
To confirm, are you talking about "Crystal Reports Viewer 2008" http://www.sap.com/solutions/sapbusinessobjects/sme/reporting/viewer/index.epx
I suggest sending in the report, in the viewer, select "Help" - "General Feedback" and then pick the option to attach the report. In a couple of months there will be a refresh version of this view which will have Czech language support so it would be good if we could test out your PDF issue.
As for showing parameters in the prompt panel in Crystal Reports Viewer 2008, since the viewer cannot refresh the data, make sure the parameter does not used in the record selection formula but only in the saved data selection formula.
Maybe you are looking for
-
How do I find an iMovie project that is no longer showing up in iMovie?
Our students have 32gb iPad Airs and are currently using iOS 7.1.1. We've had several students come in to the IT office over the last couple days saying that a project they had been working on in iMovie has disappeared. The alert notification that po
-
Easylink advisor link or software needed please help me
i need the software for the linksys easylink advisor for the router wrt54gs version 6. i have 2 computers at my house and the one that had all my router information officially broke ( i saw it coming it was 10 years old and i did not take care of it
-
Can't install Oracle 8i EE 8.1.7 release3 on Pentium 4 machine
Hi folks, We are upgrading our PCs from Pentium 3 to Pentium 4, but we are having problems with Pentium 4 PCs: we are unable to install Oracle 8i Enterprise edition (8.1.7, release 3) on all our P4 machines (OS Win2000 professional; Gateway Pentium 4
-
Message not displaying in print command
Hi Experts, I have created a smart form, in the driver program it is selecting data from some of the tables if not found it will issue an message and terminate the process ie, will not print the form. This form has been configured in standard where t
-
How does one meaningfully measure maintainability?
Context: I'm an enterprise developer in an all-MS shop. Can anyone recommend a good way of objectively measuring maintainability of a piece of code or an application? Why maintainability: I'm tired of "quality" metrics in my group revolving only arou