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 Narayanan

THANKS

Similar Messages

  • 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
    bodhi86

    Hello,
    How do you answered to this question ?
    Malika
    Edited by: Malika Sanoune on May 13, 2011 1:48 PM

  • 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 Naware

    Hi,
    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 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 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.
    Shekhawat

    Hi 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

  • Can't Print preview draft crystal report.

    Print preview draft crystal report.
    Error message:
    One or more fields could not be found in the result set.
    Use verify database to update the report. Error in file POR20009. Rowset column could not be found.
    It occurs when trying to print (or preview) a DRAFT document with the report being a Crystal report.  No problems when the document is NOT a draft.  This happens on both SAP 8.8 PL16 and PL17.
    Updating the report and saving it again (as suggested by the error message) does not fix the problem.
    The DRAFT or u201CNORMALu201D document type uses the same Crystal report.   Something seems to be different when passing parameters from a Draft report?
    I can preview DRAFTS and NORMAL reports from the Crystal Editoru2019s preview pane.  This is only happening when launching from within SAP.
    Is this a bug?

    Hi Maeve,
    Can you please help by posting what exactly was the solution to this issue?
    Thanks in advance.
    Regards,
    Sanil

  • 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 VIVIANT

    Hello 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

  • CRVS2010 Beta - Print functionality  for Crystal Report in VS 2010

    I want to print crystal report documrnt without loading in Reportviewer(in ASP.NET 4.0), just print the report document.
    I have used ReportDocument.PrintToPrinter(1, false, 0, 0);This server-based method .One limitation of this method is that a printer name must be specified.  I can set the default printer at design time in the report, and I can change the printer name at run time by setting the ReportDocument.PrintOptions.PrinterName property.this method prints from the server itself, not from the client machine.  This means that any printer I wish to use must be accessible from the server.  I cannot print to a client's desktop printer using this method unless that printer is shared on the network and mapped to the server.
        But I want to print from client machine(in ASP.NET 4.0) which is not accessible from server.
    I need solution and suggessions.
    Than You
    Hrushikesh Patel

    I don't think that this is a Crystal Reports issue as such. All client / server web apps will behave the same way. See [this|http://support.microsoft.com/kb/184291/en-us] MS Kbase for more details and possible solution.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • 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

  • 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,
    Jagannath

    Does 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.

  • Preview a Crystal report prompted for the sa password

    Dear All,
    When our customer preview a Crystal report, we got a window prompted for the sa password. Even we type in a correct password, it still says wrong password.
    Only two user computer have this problem.
    How do I solve it?
    Regards,
    Karen

    I install Crystal Reports Designing Software on those computers which canu2019t preview reports.
    Then start the Crystal Reports design software to open the problem report.
    It usually asks to enter the column on the interface u201COLE DB (ADO) u2013 Connect Informationu201D.
    But it gets into the interface u201COLE DB (ADO) u2013 OLE DB Supplieru201D.
    I correct the setup and save the report.
    The problem is solved.
    I try many methods, but only this one can solve my problem.
    If you have another solution, please tell me, thanks!
    Regards,
    Karen

  • 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

  • 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?
    Thanks

    Are 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

  • How to preview a Crystal Report in SAP ?

    Hi,
    I have an add-on for witch on the press of a button we need to preview a Crystal Report in SAP.  How do you do that ?

    Hi Marc,
    Please check below links.
    View Crystal Report from add-on | SCN
    Crystal Reports Integration For SAP Business One
    Hope this help
    Regards::::
    Atul Chakraborty

  • Error in Export to PDF for crystal reports

    Hi All,
                I have created one Crystal Report & on other side i have created a windows form & kept crystal report viewer on it.so through my coding i'm setting the crystal report to get loaded into viewer on runtime.so in runtime i can connect to Printer (or) i can export it to PDF,but while exporting it to PDF gives me an error like this
    System.Threading.ThreadStateException:current thread must be set to single state apartment(STA) mode before OLE calls may be made.Ensure that your main function has STAthreadAttribute marked on it.
    System.Windows.Forms.Form.ShowDialog()
    can anybody suggest me some ideas to solve this problem.
    thanks,
    shangai.

    hello,
    in details,
    1. to make sure that ur .rpt file is working run in (Preview ) using crystal reports ... this should return the expected result.
    2.try to run ur report in an Administrator account. (if i am correct w/ authorization issue) this should fix the problem.
    best regards
    fidel

Maybe you are looking for

  • Sound effects no longer play in Rosetta emulation games

    While sorting out the data transferred from my recently deceased Powerbook G4 17", I accidently started up Audacity 1.2.3 which is a Power PC only version. It only partially loaded with its icon in the Dock but nothing else. I had to force quit the p

  • HP Laserjet 1200 multiple copies problem

    I am trying to print multiple copies of an index card document to my HP Laserjet 1200 printer.  However, it will only print 1 copy, regardless of how many copies I tell it to print.  Any ideas what I'm doing wrong?  I have rebooted both the printer a

  • Question on Files and Exceptions

    Hi everyone. I have a program that is supposed to let you use a JFileSearcher to find a text file, enter some search terms into a JTextArea and when you click a button it opens a new frame. The new frame is it's own class and its constructor requires

  • Logic dosen´t send out my prg. ch numbers on start up?

    Hi List I have a couple of external synths (Moog Voyager, Nordlead 4, Dave Smiths Tetra.....) In my customized template I have prg change numbers to be sent out on start up. But it seems like I need to manually change the value in the track parameter

  • Startup Classes and JMS - Suggestions Please!

    I'm in serious need of having several resources initialized before beans start handling requests. I tried implementing a Weblogic Startup Class, and it works fine - as long as it's the first thing to run! -- the problem is, when my Message Driven Bea