Print draft in Crystal report
Hi all,
I face a problem when printing draft document via crystal report.
when i try to print preview for non draft document , it runs well
But the problem is when i print preview in draft mode.
I use store procedure in sql.
my query is like this.
Create PROCEDURE [dbo].[Form_PO]
@Dockey numeric(19,6),
@ObjectId Numeric(19,6)
AS
BEGIN
IF @ObjectId = 22
BEGIN
SELECT
--'ND' [DocuTipe],
a.DocEntry,
a.DocNum [PO NO],
a.NumAtCard [Reff Number],
a.DocDate [Document Date],
a.DocDueDate [Delivery Date],
a.TaxDate ,
a.CardCode [CardCode],
a.CardName [CardName],
a.Address2,
c.PymntGroup [Payment Terms],
a.Comments [Remark],
a.DocCur [Currency],
b.ItemCode [ItemCode],
b.Dscription,
a.DocType [TypeDoc],
e.TrnspName [Incoterms],
b.Quantity,
b.Price [Price],
b.LineTotal [Amount],
a.DocTotal [AmountTotal],
d.Phone1 [Telp],
d.Fax [Fax],
FROM OPOR a
INNER JOIN POR1 b ON a.docentry = b.docentry
INNER JOIN OCTG c ON a.GroupNum = c.GroupNum
INNER JOIN OCRD d ON a.CardCode = d.CardCode
LEFT JOIN OSHP e ON a.TrnspCode = e.TrnspCode
where a.DocEntry = @Dockey
END
IF @ObjectId = 112
BEGIN
SELECT
'DR' [DocuTipe],
a.DocEntry,
a.DocNum [PO NO],
a.NumAtCard [Reff Number],
a.DocDate [Document Date],
a.DocDueDate [Delivery Date],
a.TaxDate ,
a.CardCode[CardCode],
a.CardName[CardName],
a.Address2,
c.PymntGroup [Payment Terms],
a.Comments [Remark],
a.DocCur [Currency],
b.ItemCode [ItemCode],
b.Dscription,
a.DocType [TypeDoc],
e.TrnspName [Incoterms],
b.Quantity,
b.Price [Price],
b.LineTotal [Amount],
a.DocTotal [AmountTotal],
d.Phone1 [Telp],
d.Fax [Fax],
FROM ODRF a
INNER JOIN DRF1 b ON a.docentry = b.docentry
INNER JOIN OCTG c ON a.GroupNum = c.GroupNum
INNER JOIN OCRD d ON a.CardCode = d.CardCode
LEFT JOIN OSHP e ON a.TrnspCode = e.TrnspCode
where a.DocEntry = @Dockey
and a.ObjType = 22
END
END
So when i print draft document the objectId is 112 and will select the odrf table.
The issue is when print draft there is no data, but actually there are data in the odrf.
Is there any problem with my query ?
Regards
Jia shun
Hi,
To print draft document using stored procedure , use base document object type instead of 112.
for e.g. if you want to print purchase order draft set condition as Objtype ='22' instead if 112. It will fetch data.
Thanks,
Neetu
Similar Messages
-
Print Preview of crystal Report without add a document
Dear All,
Can i see the Print Preview of Crystal Report without add a document like PLD.
i have developed a Crystal Report through Add Command by Passing a query.
if anybody have idea on this issue please suggest me.
Thanks.
ShekhawatHi Shekhawat....
Through Query Crystal report it is not possible to view the Layout as Draft withou adding teh docs because Report fetch the details only when itys value goes to Database Table......
So suggest to use SAP standard CR and modify as you want....
Regards,
Rahul -
Print Preview using crystal report in SAP B1 slow.
Dear all,
I face another problem. Print preview using crystal report in SAP B1 is very slow. Although i have create a query view in SQL server but it's still slow for my user. First time i create using table in crystal report. just drag the table. It's take more than 10 minutes. After that i move all the query to view in SQL server , it's take 1-2 minutes to print preview some time more.. But i think that it's still slow. Does any one know how to print preview fast. Just like in PLD.
Thanks in advance
bodhi86Hello,
How do you answered to this question ?
Malika
Edited by: Malika Sanoune on May 13, 2011 1:48 PM -
Can we add custom print button to crystal report launched using jsp
Hi,
I need to add a print icon in crystal report. My requirement states that I should not use the print button given in the taskbar of crystal report. Can this be done?
ThanksAre you using Crystal Reports for Eclipse? If so, there is a new version out that suports Excel exporting:
/people/blair.wheadon/blog/2009/01/16/announcing-crystal-reports-for-eclipse-20 -
Print preview using crystal report in SAP B1 is very slow.
Dear all,
I face another problem. Print preview using crystal report in SAP B1 is very slow. Although i have create a layout in AR invoice form and applying the print sequences (ie 4 prints). Does any one know how to print preview fast. Just like in PLD.
Thanks in advance
Kamlesh NawareHi,
Basically Crystal report run with SQL statement, I would suggest to do well performance tuning on SQL query / Store Procedure.
Structure your query in DBA manner that will make some how faster such as use ( inner join, less condition,...)..
also if it simple query then use Command in Crystal report rather store Procedure..that make some how Faster your report.
Thanks
Kevin
Edited by: Kevin Shah on May 27, 2011 4:21 PM -
Error when print out SAP Crystal Report in SAP B1
Dear all,
I have encountered the following message when I tried to print out SAP Crystal Report at client pc:
Could not load file or assembly 'CrystalDecision.Windows.Forms, Version = 12.0.2000.0, Culture=neutral, Publickey Token=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
On the other hand, there's no error when I print out the SAP Crystal Report on server.
Can anyone advice on the error message as above?
Thanks alot.Hi All,
I have SAP 2007 B,Visual Studio 2008 and Crystal report 2008 Add-on. I am facing the same problem,
"Could not load file or assembly 'CrystalDecision.Windows.form,Version=12.0.2000.0, Culture=neutral,Publickey Token =692fbea5521e1304' or one of its dependencies. The system can not find the file specified."
I have uninstalled SAP B1 and Crystal report 2008. Still I am getting the same Error message. Kindly give me your suggestions.
Regards,
Tom. -
Error print preview a crystal report
Hi,
I have an issue where i log in as a user with admin rights and try to print preview a crystal report that was created. It prompts me to log into the database, when i do this gives me a login incorrect oracle error. But when i log in as administrator i am able to do this.Hi,
Additional Info:
CR 2008 SP3 is called by an application using .net. The Application passes a couple of parameters to the CR report. I'm able to preview the report. All the reports use the same set of parameters.
Balaji K -
Print preview for crystal report
hi kings,
I have one problem . I Designed userform that form have print button when i press the print button the crystal report Open and show the data. but the report is not open when i press the button.Please any one help me out of this issue
the error Shows-Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Dim oForm As SAPbouiCOM.Form
oForm = gonAppApplication.Forms.Item("Emr_NewNCMR")
Dim Docnum As String = ""
Docnum = oForm.Items.Item("txtDocNo").Specific.value
Dim cr As New CRAXDDRT.Report
Dim apcr As New CRAXDDRT.Application
Dim myCrystalReportViewer As CrystalActiveXReportViewerLib102.CrystalActiveXReportViewer
Dim RptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
RptDoc.Load(System.Windows.Forms.Application.StartupPath & "\Ncmr.rpt")
RptDoc.SetDatabaseLogon("sa", "Sa@123", gonComCompany.Server, gonComCompany.CompanyDB)
RptDoc.SetParameterValue("@Docnum", Docnum)
myCrystalReportViewer.rptViewer.ReportSource = RptDoc
myCrystalReportViewer.rptViewer.Refresh()
myCrystalReportViewer.ShowDialog()
thanks regards
B.lakshmi NarayananTHANKS
-
Need alternative for activex print control using Crystal reports 2008
I have created a .Net web application (2.0/3.5 .Net framework) with crystal reports 2008.
Reports are viewed using Crystal reports 2008 activex viewer.
On click of PRINT icon in activex viewer, activex print control download prompt will be displayed on client machine.
I need to avoid downloading of activex print control on client machine. Is there any other alternative or option to use print functionality in viewer without downloading activex print control on client machine?
Or Is there any other workaround for print functionality in Crystal reports 2008 Viewer without downloading activex print control?
Note: Activex print control download prompt will not be displayed when using Crystal reprots XI Release 2 version.
Thanks,
JagannathDoes anyone know which files need to be registered for the ActiveX print control? We occasionally have users who somehow break their Crystal ActiveX controls, and they can no longer see the print options. In Crystal 10, I was able to fix these issues by pushing a package which registered several files on the user's computer.
-
Remove Printer Name from Crystal Report
How can i remove the printer name from the Crystal Report so that the PrinterName property of the CRAXDRT.Report object in the RDC SDK is blank WITHOUT having the "No Printer" Option checkbox checked?
Here's the scenerio. When I first create a Report and don't go into Page Setup, PrinterName property is blank. If I go into Page Setup and explicitly select a printer, PrinterName property equals the name of the printer selected. If I check the "No Printer" checkbox in Page Setup, PrinterName property is blank. But if i go back in and uncheck the "No Printer" checkbox in Page Setup, the PrinterName property equals the name of my Windows Default Printer.I'm still not sure what is unclear about my first question. And I'm not sure how any of the info you are requesting is going to make any difference in answering my question. And I'm not sure how your analogy fits here but ..
Version of CR = 11.0.0.895
CR Service Packs applied = None
Web or Win app? = Win App
OS? = Windows XP Service Pack 3
Development language? = Both Visual Basic 6 and C#.Net 2008
Method of CR files deployment = email the .RPT file to a client
Where were the runtime files downloaded from? = Runtimes are installed from Merge Modules donwload from SAP site
What is the version of the craxdrt.dll on the deployed box? = 11.0.0.893
So here are the exact steps so you can understand what is going on:
I have the Crystal Reports Application open side-by-side with my Visual Basic development environment in debug mode so i can step through the code using the RDC SDK.
1. I open the Crystal Reports Application and create a brand new report - "Test.RPT" and DO NOT go into Page Setup at all and save the report.
2. In my Visual Basic development environment, i run the code that will generate the report, Here's the exact code
Dim m_crApp As CRAXDRT.Application
Dim m_crReport As CRAXDRT.Report
Set m_crApp = New CRAXDRT.Application
Set m_crReport = New CRAXDRT.Report
Set m_crReport = m_crApp.OpenReport("Test.RPT")
3. When i look at the PrinterName property in the CRAXDRT.Report object, it is blank.
ie. crReport.PrinterName is equal to ""
4. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and check the "No Printer" option.
5. I go back into my Visual Basic development environment and rerun the code that will generate the report.
6. When i look at the PrinterName property in the CRAXDRT.Report object, it is still blank.
ie. crReport.PrinterName is equal to ""
7. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and uncheck the "No Printer" option. I have NOT specified any printer, nor have i clicked the "Printer..." button to setup a printer....i have just unchecked the "No Printer" option
8. I go back into my Visual Basic development environment and rerun the code that will generate the report.
9. When i look at the PrinterName property in the CRAXDRT.Report object, it is now set to my WINDOWS DEFAULT PRINTER, yet i had not specified any printer.
ie. crReport.PrinterName is equal to "
MyNetwork\MyPrinter"
PROBLEMS:
1. The client needs the report to go to the default windows printer of their machine
2. If the "No Printer" Option is checked, the Report does not print at all
3. If the report is set to MY default windows printer and i give it to the client, at times it takes upwards of to a minute for the Print Dialog to disply. As i've read on other forum posts, it appears Crystal is looking for MY printer on the clients machine and takes a minute before i realizes it can't find it and then sets it to the CLIENTS default windows printer.
4. The client believes it is unreasonable to wait a minute for the print dialog to appear ...and i agree.
5. I cannot change the code to use the Select Printer in the RDC SDK - it's a long explanation why but just suffice it to say that i cannot do this.
All i want to do is either:
1. Remove the Printer Name in the actual report from the Crystal Reports designer - basically undoing what Crystal did when i went into Page Setup.
2. Via the RDC SDK, be able to detect the "No Printer" option is selected. Checkign CRAXDRT.PrinterName equal to "" is not an option. -
Print button to crystal report
Hi All,
In my business partners form i want to take related activities report.If i press print preview then basred on my coding it should go to cystal report not to sap report.can anybody suggest me some ideas about this.
thanks
shangaiHi
What version u r using?
If it is 2007 then it will take the Normal PLD only,there is no automatic diversion to Crystal report.
In 8.8 u can have both option PLD & Crystal Report to print the Doc's
Giri
U have posted two thread r it might be duplicated. so close one thread and follow the other thread.
Edited by: Giri dharan on Jan 6, 2010 12:36 PM -
Print preview using Crystal Report
Hello All,
In SBO 8.8 or in 2007 with add-on (like B1UP) it is possible to have a cystal report launched by the preview buttons. It works perfectly when the document is stored in the DB, the preview is blanked if you don't have the document validated (created in SAP).
In PLD this functionnality is available with the screen variables, is there a way to have it in crystal report?
BR
Arnaud VIVIANTHello Gordon.
Thanks for response but it doesn't answer the question.
Question is : is it possible to use the print preview functionnality in crystal without creating a document in the database (as it is possible in layout designer) ?.
I know that the preview will work when I created the document in the DB.
Regards,
Arnaud -
Label Printing issues on Crystal Reports Server
I built a label that prints off beautifully on my local machine with Crystal XI installed. However, when I post the label to the reports server, and a user tries to print it off, it prints off two blank labels behind each good label. I have racked my brain on this for days. The printer settings are identical to my local machine. Any idea what might be causing this?
I think the following information might help you
Symptom
A label report was viewed over the web using the Web Component Server, and printed on a label maker printer DYMO 330. The labels were being resized to 8 1/2 x 11 instead of printing the size of the label. Even after selecting the correct size, the labels print one per page, followed by 3 blank labels.
When printing was done through a distributed report or the report designer, the labels printed to the correct size and only printed one label with no blank labels.
What is causing the label report to print incorrectly when printed from the web viewer?
Resolution
Steps to Resolve
1. Open the report in the Crystal Reports 8 designer on the web server.
2. Click on 'File' then click 'Printer Setup'. If a printer is already selected then set it to 'No Printer', click 'OK', then save the report.
3. Click on 'File' then click 'Printer Setup' again. Select the default printer and clear the 'Default Properties' checkbox.
4. Click 'OK' and save the report.
5. Click on Start > Settings > Control Panel > Services and double click 'Seagate Page Server' service. Set this service to run under an 'Administrator' account.
6. Stop and restart the service, and close down all browsers.
The label reports now will print successfully over the web.
Background
Incorrect printing from a web viewer can have several causes, including:
· The report is designed with a designated printer, but the encapsulated page format (EPF) files are being created in 'No Printer' mode.
· The server does not have access to the printer.
· A valid printer is not saved with the report on the server.
· The printer driver is not installed on the server.
Regards,
Raghavendra.G -
Problem when trying to print standart invoice crystal report for SAP
Hi All, I have the following problem when trying to print a system invoice report in crystal reports for SAP
I pass params and load the report using this code
Private Sub DisplayThreadReportSeq()
Dim oView As New frmViewReport
Dim strReportPath As String = ""
Dim strParamName As String = ""
Try
Dim CR As New ReportDocument
CR.Load(oReport.CrstPath)
' Declare the parameter related objects.
SetReportValues(CR)
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
' Get the report's parameters collection.
For Each oPar As cslParam In oReport.Params
crParameterFieldDefinitions = CR.DataDefinition.ParameterFields
crParameterFieldLocation = crParameterFieldDefinitions.Item(oPar.ParName)
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = oPar.Value
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
Next
If pPrint Then
If oReport.Printer "" Then
CR.PrintOptions.PrinterName = oReport.Printer
End If
CR.PrintToPrinter(IIf(oReport.Copies = "", 1, oReport.Copies), False, 0, 0)
SBO_Application.StatusBar.SetText("Printed Document Successfully", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
Else
oView.Text = pReport
oView.TopMost = True
oView.Viewer.ReportSource = CR
oView.Hide()
oView.ShowDialog()
End If
Catch ex As Exception
Util_GenErrorLog("DisplayReport", ex)
End Try
End Sub
This code works fine when the report invoke to print is developed in crystal reports version for .net 2008 or .net 2005
when trying to print a report standart getting from SAP BO 8.8.1 using this code I getting the following error:
Error in File C:UsersecombaAppDataLocalTemp5ARInvoiceStandartSap {300B9A68-DF05-4D7B-8F3B-1670A4493BEE}.rpt:
Error in formula .
'Shared numberVar SectionTotalMaxHeght;
A number, currency amount, boolean, date, time, date-time, or string is expected here.
This report is the standart report that SAP 8.8.1 includes and works fine on SAP.
I referenced this dlls CrystalDecisions.CrystalReports.Engine.dll, CrystalDecisions.CrystalReports.Shared, version 10.2.3600
How I can get these dll´s version for Crystal Report 2008 for SAP Business one or How I can solve this problem
thanks in advance,
Ezequiel.Hi Ezequiel,
You can try to search in SAP Business One Reporting & Printing forum section or post there.
nd.Q -
Printing Problem in Crystal Report From JSP
Hi,
I m calling crystal report from JSP.Report is parameterized.I m passing parameters from JSP.Report is displaying on the page,but when I try to print or export the report by pressing Print or export Button ,it displays an error message "Some parameters are missing values".
Please guide my,what should I do? Following is the code.
Good Bye
AQ
Vector fieldVector = new Vector();
SPParameters spParams = new SPParameters();
ReportFactory reportFactory = new ReportFactory();
// Setteing the report Name (Path Appended)
reportFactory.setReportName(ReportsCoreDataConstants.REPORT_PATH.concat("Test_Rep2.rpt"));
//Setting the parameters for the report
ParameterField paramFeilds = null;
System.out.println("fiscalYearCode:"+fiscalYearCode);
paramFeilds = spParams.createParams("IPFISCALCODE",fiscalYearCode);
paramFeilds.setReportName("");
fieldVector.add(paramFeilds);
//Creating the ReportSourceInstance
reportFactory.setFields(fieldVector);
String exp = "";
try {
ReportFactory l_reportFactory=null;
l_reportFactory = reportFactory;
if (l_reportFactory != null) {
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setParameterFields(l_reportFactory.getFields());
viewer.setOwnPage(true);
viewer.setDisplayGroupTree(false);
viewer.setHasZoomFactorList(false);
viewer.setHasLogo(false);
viewer.setHasPrintButton(true);
viewer.setHasRefreshButton(true);
viewer.setHasToggleGroupTreeButton(false);
viewer.setHasViewList(false);
viewer.setPrintMode(CrPrintMode.ACTIVEX);
viewer.setSeparatePages(true);
viewer.setEnableParameterPrompt(false);
viewer.setReuseParameterValuesOnRefresh(true);
viewer.setReportSource(l_reportFactory.createReport( request.getLocale() ));
viewer.refresh();
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(),out);
viewer.dispose();
} catch(Exception e) {
exp = e.toString();
System.out.println("Exception in JSP : " + e.toString());
e.printStackTrace();
}I think ScreenRaghu is right. If you look at the generated source, your jsp becomes an action and processHttpRequest() method is invoked everytime some action happens. So when you click the export button, request object no longer has the values your report needs. Either put the values in session or via link or db or whatelse.
Maybe you are looking for
-
I bought a new HD camcorder a couple of months ago and am going to buy a new computer because my old one is a few years old and probably need faster processor to handle HD. What other specs do you recommend for optimal performance with my PSE Premeir
-
Computer not recognizing Ipod and my ipod freeze
My ipod used to work quite fine, but not from today. When I plugged in my Ipod and load up my batteri, it worked as normal. Then when i unplugged my Ipod, it still says, that it is connected to the computer? I can't turn it off or start it. My comput
-
How to propagation identity to Remote EJB if client application is not deployed on WLS, but just standalone application. I found some document on the web in regards to identity propagation with remote EJB ( EJB security mechanisms) I follow it and ha
-
Can't get safari to open with home page
I have set google as my homepage in Preferences, but Safari invariably opens with the last page I had used before quitting. I've tried both "Set as Current Page" (being on google, of course), as well as typing in google's URL. Any suggestions? Thank
-
Multipage pdf in photoshop cs5
Hi out there! I've upgraded from PS CS2 to CS5 - now I'm missing the option to compile multipaged pdf out from PS. I know for sure that bridge will compile psd's to one single pdf but bridge seems not to embed fonts used in a psd. And yes, I know tha