Getting error on printing of crystal report
hi..
on clicking print button using active x i got this error why this error comes
http://i51.tinypic.com/fz2bk0.png
thanks in advance
my cs file look like this
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
public partial class _Default : System.Web.UI.Page
ReportDocument crReportDocument = new ReportDocument();
//'CrystalReport1' must be the name the CrystalReport
TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
//Crystal Report Properties
CrystalDecisions.CrystalReports.Engine.Database crDatabase;
CrystalDecisions.CrystalReports.Engine.Tables crTables;
CrystalDecisions.CrystalReports.Engine.Table crTable;
protected void ConfigureCrystalReports()
string Server1 = ConfigurationManager.AppSettings["Server"];
string user1 = ConfigurationManager.AppSettings["Userid"];
string Password1 = ConfigurationManager.AppSettings["Password"];
string DataBase1 = ConfigurationManager.AppSettings["DataBase"];
crReportDocument.Load(Server.MapPath("InvoiceReport.rpt"));
crConnectionInfo.ServerName = Server1;
crConnectionInfo.DatabaseName = DataBase1;
crConnectionInfo.IntegratedSecurity = false;
crConnectionInfo.UserID = user1;
crConnectionInfo.Password = Password1;
crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
Session.Add("h1", crReportDocument);
protected void Page_Init(object sender, EventArgs e)
if (Session["h1"] == null)
ConfigureCrystalReports();
CrystalReportViewer1.ReportSource = Session["h1"];
CrystalReportViewer1.RefreshReport();
CrystalReportViewer1.Visible = true;
protected void Page_Load(object sender, EventArgs e)
is that i have to change anything...?
Similar Messages
-
Error WHen trying to print a crystal report
I am trying to print a system crystal report and it is giving me the following error: "Error during printing; ensure all parameters are defined". And it prints the first page, but none of the consecutive pages if there are more than 1. Is there some type of setting that needs to be set for printing?
Hmmmmm it says "page range" ALL. I was able to print fine until I created a new layout and saved it. THen I went to print it and got the error. But it seems I get the error when I print any crystal report in any DB. Is this a setting in crystal, SAP, or printer itself? I can print the second page if I toggle through to the second page on the crystal report view, and go to print, and put 2 next to pages feild. Otherwise it is set to print ALL, however it is not doing that.
-
Page Not Found Error when clicking on Crystal Report Viewer print icon
Hi,
I am working with ASP.NET 2.0 and crystla reportXI release2.
I am getting "Page Can not be Found " error when clicking on Crystal Report Viewer print icon.
Could you please tell me how to get rid of this error?
Regards,
SmithaThis sounds like a postback issue. Does your application handle postback by putting the report in session?
There is a [sample|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_samples_aspx/data/crsdk_net_tutorials_115_en.zip] to look at on our website. It was created with Crystal Reports XI R2 and Visual Studio .NET but the code will be the same.
A short pseudocode would be something like this:
Dim rptDocument As ReportDocument
If Not Me.IsPostBack or Session("Report") = Nothing Then
rptDocument = New ReportDocument
rptDocument.Load(sGlobalPath & "\myreport.rpt";)
Ludek -
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. -
Duplex Printing in Crystal Reports
Post Author: Razzle00
CA Forum: General
Where can I get some information or sample code on how to duplex print with crystal reports?
Thanks,
RazzlePost Author: senglee
CA Forum: General
Here was how I did it using vb.net and crystal reports.
1. In the report, create a seperate detail section to hold your second page. Crystal will see it as Details a & b. In section a, set the new page after property. This will cause the second page (details b) to print on a seperate page.
2. Ok. The next step is to programmically tell your printer to print in duplex. Study the code below and modify it to suite your needs.
' Declare an object of your report. Dim objReportObject As New rptTheDailySavings
'Declare a printoptions object of the objReportObjects print option. Set the settings. Dim PrintOptions As CrystalDecisions.CrystalReports.Engine.PrintOptions = objReportObject.PrintOptions PrintOptions.PrinterName = "Your Printer Name Here" PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.DefaultPaperOrientation PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize PrintOptions.PrinterDuplex = CrystalDecisions.Shared.PrinterDuplex.Default PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Auto
' Send the report to the printer. objReportObject.PrintToPrinter(1, False, 1, 2)
Hope this helps. -
Preview and print a Crystal report prompted for the sa password
Dear All,
Our customer has Crystal report add-on to be installed. When we Preview and print a Crystal report, we got a window prompted for the sa password. Even we type in a correct password, it still says wrong password...
Every time when I open my report in Crystal Basic 2008 on the server, then go database expert >> My connections >> click + in front of the connection name, it asks my sa password. I type in my password then save and close. Next time when I open the report and go my connections, I have to type in my password again. This only happens on one customer.
Any idea? Thanks a lot.
Regards,
YukaHi Yuka,
1) All their SAP client workstation, they have to have use SQL2008 CD and install SQL Client on it
Correct, MS does NOT support MDAC or WDAC when connecting to SQL 2008.
2) Then go ODBC >> SQL Native Client 10.0 >> Create a new connection to SAP server. Should we use sa user or another use that has the same authorization as sa?
Correct again if they are also using ODBC to connect, as for using the sa account or creating a new one is up to you. I suggest creating a Crystal account with what ever rights your app needs, this way if tracing it turned on etc. you can confirm who is actually running the report.
3) Then from MY Crystal report, I have to use ODBC connection as well?
Just to clarify, if you created your reprots using OLE DB then they can do so also. But you need to update your connection properties. Open each report click on Database, Set Location, scroll down to OLE DB and expand and then choose MS SQL Server Native 10 as your OLE DB provider, fill in all the logon info and then verify the database. Do the same for each subreport also.
Save your report and either send them the new one or if you are doing this remotely then replace the original report.
VERIFY your reports to confirm they still return correct data and do work as expected.
Or if you are using ODBC then yes you do select the MS 10 driver with a new DSN. Then do the above to update the reports to all use ODBC as their data sources.
Hope this is all clear now....
Thanks again
Don -
How to print directly to Printer from Crystal Report Viewer ?
Hi All,
We are integrating our Java Web Application with Crystal report XI, currently using JRC and export to PDF for user to preview and print to local printer.
Now there is new requirement :
Some clients is using thin client terminal (no harddisk, only has OS +Browser in ROM), so I cannot install Acrobat Reader for them to preview&print the report.
So I am looking at Crystal Report Viewer, the question is : Can I print from Crystal Report Viewer directly to local printer without first converting it to PDF (because I can't have acrobat reader installed) ??
Thank you very much,
Krist
IndonesiaHi,
It can't be achieved through XI.
JRCXI R2 SDK offers the ability to print the report server side
using the PrintOutputController using printReport(PrintReportOptions printReportOptions) method.
Here is the code(for XIR2):
import="com.crystaldecisions.reports.sdk.*"
import="com.crystaldecisions.sdk.occa.report.lib.*"
import="com.crystaldecisions.sdk.occa.report.document.*"
try {
final String REPORT_NAME = "Inventory.rpt";
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_NAME, 0);
//Create and set print options.
PrintReportOptions printOptions = new PrintReportOptions();
//Note: Printer with the 'printer name' below must already be configured.
printOptions.setPrinterName("
10.10.45.220
BOBJ 2C");
printOptions.setJobTitle("Sample Print Job from JRC.");
printOptions.setPrinterDuplex(PrinterDuplex.horizontal);
printOptions.setPaperSource(PaperSource.auto);
printOptions.setPaperSize(PaperSize.paperLetter);
printOptions.setNumberOfCopies(1);
printOptions.setCollated(false);
PrintReportOptions.PageRange printPageRange = new PrintReportOptions.PageRange(1,1);
printOptions.addPrinterPageRange(printPageRange);
//NOTE: If parameters or database login credentials are required, they need to be set before.
//calling the printReport() method of the PrintOutputController.
reportClientDoc.getPrintOutputController().printReport(printOptions);
reportClientDoc.close();
out.println("Successfully sent report to the printer.");
catch(ReportSDKException ex) {
out.println(ex);
Please revert in case you have any query.
Thanks,
Neeraj -
How do i print a crystal report using SAP B1 SDK's in Delphi?
Senthil,
I do not have the code with respect to how to integrate Crystal Reports using Delphi and the Business One SDK. Possibly there may be other users on SDN that use Delphi and can assist.
There is source code posted here for Crystal integration with SAP Business One written in .Net. You could look at the source code and translate possible to Delphi ...
http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/d0a0c14b-0e20-2b10-939b-e93a19f14c12
HTH,
Eddy -
Printing a Crystal Report changes the printers default tray setting every
Hey,
Hopefully someone have experienced this in the past,
I am printing a Crystal Report, and in windows the printer has the tray auto as the setting. When I print from word, mspaint, or notepad, works perfect.
But when I print via Crystal Report, it changes the deafult printers tray setting every time.
Anyone have any idea, if there's a hotfix or something for this, I have problems at the client machine.
Best Regards,
LoveI dont have much idea about CR 8.
I would suggest you to try with No printer option.
Try with this also:
On Page setup click on printer ->Properties->Apply settings for default printer.
Regards,
Shweta -
Hi,
I would like to get certified for the SAP Crystal Reports. So, I would like to get some info about the currently available Certification Exams for Crystal Reports (2011/2013). Also, would greatly appreciate if you have any suggestions for this Certification Exam preparation materials from another 3rd party or from SAP directly . I would like to prepare or get trained well before taking the exam as I see it costs around $500.
Thanks in advance for your help in this regard!
Sincerely,
JPlease search here.. Training and Certification Shop for your desired certification or training. Don't forget to set your location.
Please use some summarized title for your query. -
Error With Export/Print from Crystal Report Viewer
Hello there,
I've searched through the web and SAP discussion boards with not much luck with this issue.
After working through this for some days now I've decided to look here for help.
Environment:
I have created a web Crystal Report viewer application(Developed with SBOP BI Platform 4.0 SP06 .NET SDK Runtime) that communicates with a managed Cyrstal Server 2011 SP4 (Product 14.0)
I am able to connect and authenticate with the server, retrieve a token for communication and display reports in the Crystal report Viewer successfully.
Problem:
When I attempt to export, I receive the prompt to select format and pages.
When I click export after selections most times I receive an error with the text
Unable to cast COM object of type 'System.__ComObject' to interface type 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{74EEBC42-6C5D-11D3-9172-00902741EE7C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Other times the page simply refreshes on export.
When I click to print, no print dialog is displayed the page always refreshes and no error is displayed.
No Print or Export document is ever created.
As many print/export issues seems to be related, I'm guessing this two issues are as well.
Notes:
I am utilizing the ReportClientDocument model
I am storing this in session to use as the crystal report viewer report source on postbacks
I am assigning a subset of export formats to the crystal report viewer
I am setting particular parameters as well on the report source
At this point I would appreciate every assistance I may receive on this issue
Thanks in advance,
Below is the pertinent code
Code:
<aspx>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="true" EnableDatabaseLogonPrompt="False"
BestFitPage="False" ReuseParameterValuesOnRefresh="True"
CssClass="reportFrame" Height="1000px" Width="1100px" EnableDrillDown="False"
ToolPanelView="None" PrintMode="Pdf"/>
<Codebehind>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CrystalDecisions.Enterprise;
using CrystalDecisions.ReportAppServer.ClientDoc;
using CrystalDecisions.ReportAppServer.CommonObjectModel;
using CrystalDecisions.ReportAppServer.Controllers;
using CrystalDecisions.ReportAppServer.DataDefModel;
using CrystalDecisions.ReportAppServer.ReportDefModel;
using CrystalDecisions.Shared;
namespace ClassicInternalReportPage
public partial class Reports : System.Web.UI.Page
protected override void OnInit(EventArgs e)
base.OnInit(e);
if (!String.IsNullOrEmpty(Convert.ToString(Session["LogonToken"])) && !IsPostBack)
SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpriseSession = sessionMgr.LogonWithToken(Session["LogonToken"].ToString());
EnterpriseService reportService = enterpriseSession.GetService("RASReportFactory");
InfoStore infoStore = new InfoStore(enterpriseSession.GetService("InfoStore"));
if (reportService != null)
string queryString = String.Format("Select SI_ID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS "
+ "Where SI_PROGID='CrystalEnterprise.Report' "
+ "And SI_ID = {0} "
+ "And SI_INSTANCE = 0", Request.QueryString["rId"]);
InfoObjects infoObjects = infoStore.Query(queryString);
ReportAppFactory reportFactory = (ReportAppFactory)reportService.Interface;
if (infoObjects != null && infoObjects.Count > 0)
ISCDReportClientDocument reportSource = reportFactory.OpenDocument(infoObjects[1].ID, 0);
Session["ReportClDocument"] = AssignReportParameters(reportSource) ? reportSource : null;
CrystalReportViewer1.ReportSource = Session["ReportClDocument"];
CrystalReportViewer1.DataBind();
//Viewer options
// Don't enable prompting for Live and Custom
CrystalReportViewer1.EnableParameterPrompt = !(Request.QueryString["t"] == "1" || Request.QueryString["t"] == "4");
CrystalReportViewer1.HasToggleParameterPanelButton = CrystalReportViewer1.EnableParameterPrompt;
CrystalReportViewer1.AllowedExportFormats = (int)(ViewerExportFormats.PdfFormat | ViewerExportFormats.ExcelFormat | ViewerExportFormats.XLSXFormat | ViewerExportFormats.CsvFormat);
protected void Page_Load(object sender, EventArgs e)
if (IsPostBack && CrystalReportViewer1.ReportSource == null)
CrystalReportViewer1.ReportSource = Session["ReportClDocument"];
CrystalReportViewer1.DataBind();
private bool AssignReportParameters(ISCDReportClientDocument reportSource)
bool success = true;
if (Request.QueryString["t"] == "1" || Request.QueryString["t"] == "2" || Request.QueryString["t"] == "4" )
reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "STORE", Session["storeParam"]);
if (Request.QueryString["t"] == "2")
reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "FromDate", Request.QueryString["fromdate"]);
reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "ToDate", Request.QueryString["todate"]);
else if (Request.QueryString["t"] == "3")
reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "SKU", Request.QueryString["sku"]);
else
//Unknown report type alert
success = false;
return success;Thanks Don for your response,
I'm new to the SCN spaces and my content has been moved a couple of times already.
In response to your questions
The runtime is installed on the web application server, if by that you mean the machine hosting the created .NET SDK application.
My question was whether it was also required on the Crystal Server 2011 (I.E. the main enterprise server with CMS and Report management and I guess RAS and all that). I figured this would remain untouched and queries would simply be made against it to retrieve/view reports e.t.c
If install of the SDK on Crystal Server 2011 is indeed required should I expect any interruption to any of the core services after a restart. I.E. I'm hoping that none of the SDK objects would interfere with the existing server objects (in SAP Business Objects)Reason I ask is I note that much of the SDK install directories are similar to the existing Crystal Enterprise Server 2011 (Product 14.0.0)
Is this temp folder to be manually created/configured or is it created by the application automatically to perform tasks. Or are you referring to the default C:\Windows\Temp directory and so saying that the application would try to use this for print and export tasks?Once I'm sure which I'd give the app pool user permission
Printing is to be client side but I figured by default (with the Crystal Report Viewer) it would simply pool and print from the user's printer. This is how it works with the previously used URL reporting approach (viewrpt.cwr). Therefore a user can print the document from wherever they are with their own printer.We don't intend on printing from the server machine, but are you suggesting that a printer must be installed on server (which one web or enterprise server) for any client side printing to work.
App pool is running in 32 bit mode
Initially didn't get anything useful from fiddler but I'd try and look closer on your suggestion.
It's also possible that some of my questions are a misunderstanding of APP vs RAS vs WEB, so please feel free to clarify. Currently I see the Web server as simply the created .NET SDK Application and RAS (Crystal Server 2011 e.t.c) as the existing fully established Application server which I simply pool for information.
Thank you for your patience and advice, -
Error when i try to print in Crystal Report
Hi , im student from mexico, i have a truble with Crystal Report so u can help me ? plz
my problem with Crystal Report is when i try to print
check my code
repComandaGeneral.Load("C:\Users\Usuario\Documents\DozRES - comandas\RepTicketCGeneral.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault) repComandaGeneral.SetDatabaseLogon("root", "1234", "localhost", "dozres") ' Login base de datos
'Dim MiConexion As New ConnectionInfo
'Dim myTables As Tables = repComandaGeneral.Database.Tables ' Informe.Database.Tables
'MiConexion.ServerName = "192.168.1.254"
'MiConexion.DatabaseName = "dozres"
'MiConexion.UserID = "root"
'MiConexion.Password = "1234"
'For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
' Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
' myTableLogonInfo.ConnectionInfo = MiConexion
' myTable.ApplyLogOnInfo(myTableLogonInfo)
'Next
repComandaGeneral.SetParameterValue(0, "Value")
repComandaGeneral.SetParameterValue("cm_id", cm_id)
repComandaGeneral.PrintToPrinter(1, False, 0, 0)
repComandaGeneral.Close()The "database vendor error 556" indicates that the query to the database returned with error 556. It's vendor specific. Look up your database vendor's documented error codes, to see what 556 indicates.
Doing a bit of googling looks like the issue is that the ODBNC datasource does not exist. Remember that there are 32 bit and 64 bit ODBC datasources. If your app is 32 bit, the DSN must be 32 bit, if it is compiled as 64 bit the DSN must be 64 bit.
See KBA 1505620 - How to create a 32 bit ODBC data source on a 64 bit Operating System
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Getting an error trying to install Crystal Reports 2008 on a 64 bit Windows
reformatted my computer and now I'm trying to install Crystal Reports 2008 on 64 bit windows 7 box. When the "Registering modules" portion of the install comes up, I get a message that a dll has failed to register. I saw something about not having the Microsoft Visual c++ 2005 redistributable pack (x86) installed but that was not it either.
The cd label say Crystal Reports to Crystal Reports 2008 Upgrade, but it does not seem like I have to have the older version of Crystal insatlled.
Any ideas how to fix this ?Hello together,
i've had the same problem. Tried to install CR SP 2 "cr2008win_sp2.exe" onto an existing CR 2008 SP1 installation, and got the above error. After extracting the cr2008win_sp2.exe to an folder using Winzip (or just start Installation, the source would be extracted to "c:\temp" ), navigate to the subfolder "\package" and execute the CrystalReports.msp (in my case: c:\temp\package\CrystalReports.msp). This start's the Installation of SP 2. If you get an version mismatch, use parameter SKIP_PATCH_VERSION_CHECK=1 by typing command in an dos prompt "c:\temp\package\CrystalReports.msp SKIP_PATCH_VERSION_CHECK=1" but remember, you need to have an SP1 installed (somebody said, SP's are incremental).
Reboot and apply then the CR 2008 SP2 FixPack 7 "cr2008fp27.exe". Use this Link to Download CR and Xcelsius Stuff:
[https://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm]
I would suggest you not to use IE for downloading, use an alternative browser. I got only bad downloads (IE8 on Win7).
This is the way i did and this works pretty good.
Good Luck
Matthias -
Sale Order Query Print layout/Crystal Report Query required
Hi Experts,
I created a Sale Order. Items included in it are service and material.
(I created a BOM, bound the child material item to the parent service item. Moreover child item will have unit price where as parent item will not have unit price)
I need the report on it please let me know how i can do it.
I tried with below query
select a.DocEntry, a.DocNum, a.CardCode, a.CardName, b.DocEntry,b.ItemCode, b.Dscription, b.Quantity, b.Price, b.LineTotal, a.DocTotal, a.VatSum
from ORDR a inner join RDR1 b on a.DocEntry = b.DocEntry
--and b.TreeType <> 'N'
where a.docnum = '14240621'
output of above query is
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
2493.76
43940.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0001
Material for PROVIDING & LAYING
17.62
2800
49336
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
1980
19908.9
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0002
Material for BM CM INCLUDING CEMENT
10.055
1650
16590.75
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
116.5
7572.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0003
Material for P/APPLYING
65
65
4225
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
31625.05
70618.74
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0004
Material for P& FIXING
2.233
44000
98252
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
3593
10779
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0005
Material for PROVIDING RMC
3
4847
14541
354652
18888.46
and my desired output is
Unit price of both child item and parent item should be display in single column. ie. cumulative in Unit Price Column and Linetotal respectively.
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
5293.76
93276.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
3630
36499.65
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
181.5
11797.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
75625.05
168870.7
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
8440
25320
354652
18888.46
please let me know the update on this.
with regardsHi Nagarajan,
thanks for reply..
1) Yes, i.e i have taken into BomType: Template
2) i did not get any helpful output by using treetype by keeping 'S' and 'N', i kept in comment.
3) Actually MT0001-05 - these are material item- unit prices are fixed. see in attached image
for parent item, unit prices are not fixed. I give the price for them in Sale Order.
I want unit price for parent and child should be summed/cumulative for Sale Order print.
(in my above post, first matrix exactly same as sale order line items plz check it)
Please help me, how i can achieve this by query(for PLd or Crystal report)
With Regards -
LO 02010 / LO 26631 error while embedding a crystal report in a Dashboard
Hi Experts,
I am trying to embed a crystal report in a Dashboard Design using LiveOffice 4, and i am getting the below error.
"An error occurred while opening the report. The report does not exist; you have insufficient rights to open the report; or you cannot make a connection to the BusinessObjects Web Service. (LO 02010)" and "Crystal Reports Java Format is not supported. (LO 26631)"
I am logging in as an administrator and the report does exist in the CMC.
Pls. Help
Thanks
AsiriHi Amit,
Thanks for replying.
We did a upgrade from BOBJ 3.1 to 4.0 recently, and need to migrate the existing dashboards. DB connections to the reports have changed, hence the need to embed the migrated reports to the dashboard.
Yes, I get this error when i try to embed a crystal report in dashboard. I do get the same error when trying to embed a WEBi report too. As you suggested, i tried inserting a sample crystal report, and that inserts like a charm.
Pls. advice.
thanks
Asiri
Maybe you are looking for
-
How can I make mail retry sending messages in the Outbox?
Howdy all, As the title says how can a force Mail to try to resend the messages in the outbox? I use my MacBook Pro in a number of different environments and when I am on one flakey access point in particular or when I have forgotten to open Safari t
-
Settings for icloud in outlook for mac
Up until today my outlook for mac worked just fine with my .me email. Now it cannot find the server. I also today got a new license agreement for icloud on my phone and noticed on my phone it is using the icloud smtp server. Are there new settings
-
Where Used List for Master Data Entries
Hi folks, I am looking for a FM, method, etc. that gives me a list, that shows, where a certain master data entry of an InfoObject is used. The BW system makes this check implicitly, when trying to delete master data, but I couldn't get behind the lo
-
Detecting error messages of XBO
Hi, everyone, How do I detect when error messages come out of an XBO? - I wrote some code in AfterModify that updates another BO. - I want to role back when errors come out of the XBO. Any help is appreciated. Regards, May T.
-
After sync my music disappeared. Now I cannot get music back on phone. I selected playlists and triedeven loading allmusic.I have one song on my phone and cannot load any music back on it. Is there a setting I may have selected that needs to be chan