How to display the print dialogbox in crystal reports viewer for visualstudio 2013 in wpf?

Hi,
In my wpf application when i click on print button i want to display the print dialog box for current report.
Here i have written like as follows.
1.MyCrystalReportsViewer.ViewerCore.ReportSource = reportDocument;
2. MyCrystalReportsViewer.ViewerCore.PrintReport();
The above two statements  is executed and displayed the report in CrystalReportViewer, but it doesn't show any print dialogbox.
MyCrystalReportsViewer is name of the CrystalReportsVIewer control.
Can any one help me to solve this one using code.

Hi Sandeep,
Did you download CR for VS SP 13 from this link?
http://scn.sap.com/docs/DOC-7824
First link is to integrate CR into VS.
If you did then I suggest you do a Repair on both VS and CR for VS.
Also, VS must be Pro or higher, CR will not work in VS 2013 Express.
Do you have printers installed? Do not use Windows XPS printer, it has problems.
Don

Similar Messages

  • How to use a connection ODBC in  crystal reports viewer?

    Hi Guys!
    I need to know if for update a report in crystal reports viewer, is necessary, have a connection SAP Business Objects Business Intelligence. How to use a connection ODBC in  crystal reports viewer?

    Hi Guys!
    I need to know if for update a report in crystal reports viewer, is necessary, have a connection SAP Business Objects Business Intelligence. How to use a connection ODBC in  crystal reports viewer?

  • Dynamic command execution fails in Crystal report viewer for parameters

    We are using the Crystal Report Viewer for the .Net Application on the client side.The reports are designed using Crystal Report XI R2.
    The issues that we are currently encountering is that, we are unable to load the combo-boxes in the pop-up for the parameters.
    All the reports have multiple commands and the variables are of 'dynamic' type.
    When the dialog box for requesting the pop-up comes up, It comes up empty even though they are linked to the respective commands.
    Also,For reports having multiple parameters we are unable to give a single dialog box to get in all the parameters.It appears as a series of prompts.
    Both,these issues are not encountered when the reports are launched via the Crystal reports developer tool.

    Hello Varun,
    I recommend to post this questionin the [dedicated NET forum|SAP Crystal Reports, version for Visual Studio;.
    This forum is monitored by qualified technicians and you will get a faster response there.
    Thank you for your understanding,
    Falk

  • Is there a recommended crystal reports viewer for Mavericks?

    I am having some trouble finding a Crystal reports viewer for Mavericks and was wondering if someone might have some guidance as to the best solution(s).
    Thanks!

    This is the most current:
    http://scn.sap.com/docs/DOC-29774
    I don't know about Mavericks support, but it at least launches on my system.
    Regards.

  • How to display the Print Dialog with defined print presets included.

    When I try and display the Print Dialog none of my defined print presets are included in the print preset list box, I only get the [custom] option.
    How can I get the presets included in the list?
    The code I am using is:
    InterfacePtr<IPrintData> docPrintData(document->GetDocWorkSpace(), UseDefaultIID());
    // create a temp non-persistent IPrintData
    IPrintData* tempPrintData(CreateObject2<IPrintData>(kPrintDataBoss));
    // copy data from the document workspace
    tempPrintData->CopyData(docPrintData, kTrue);
    InterfacePtr<ICommand> printDialogCmd(CmdUtils::CreateCommand(kPrintDialogCmdBoss));
    InterfacePtr<IPrintDialogCmdData> printDialogCmdData(printDialogCmd, IID_IPRINTDIALOGCMDDATA);
    // store off the document's UIDRef in the print data boss
    UIDRef docUIDRef = ::GetUIDRef(document);
    printDialogCmdData->SetDocUIDRef(docUIDRef);
    printDialogCmdData->SetPrintData(tempPrintData);
    ErrorCode result = CmdUtils::ProcessCommand(printDialogCmd);
    tempPrintData->Release();
    Thanks

    You can set the presets with Adobe Acrobat.

  • How to disconnect the database connection using crystal report

    Post Author: cp_pramodu
    CA Forum: Crystal Reports
    Hi All,
    We have developed an application using .Net and Crystal Reports 10 for generating Adhoc reports from Business system (db sybase 12). We are using the below mentioned script for opening rpt files.
    Try
           ReportDocument1.Load(sReportName)
           For Each table In ReportDocument1.Database.Tables
                  ' Get the TableLogOnInfo object.
                  logonInfo = table.LogOnInfo
                  ' Set the server or ODBC data source name, database name,
                  ' user ID, and password.
                  logonInfo.ConnectionInfo.ServerName = sReportServerName
                  logonInfo.ConnectionInfo.DatabaseName = DBName
                  logonInfo.ConnectionInfo.UserID = UserName
                  logonInfo.ConnectionInfo.Password = Password
                  ' Apply the connection information to the table.
                 table.ApplyLogOnInfo(logonInfo)
    Next
    'Me.Cursor = Cursors.WaitCursor
    Me.CrystalReportViewer1.ReportSource = ReportDocument1
    'Me.Cursor = Cursors.Default
    Catch ex As Exception
    'Response.Write(ex.Message)
    Finally
    Me.Cursor = Cursors.Default
    'ReportDocument1.Close()
    'ReportDocument1.Dispose()
    End Try
    Each time user opens the report a new connection is established to the database, can we disconnect the connection established from crystal reports, while closing crystal report. At the same time i want to setup an Idle time for these connections. In database level, i will not be able to set idle time in database level, as it affect our electronic channels.
    Waiting for a reply.
    Thanks & Regards,
    Pramodu. C. P

    Hi,
    If you are reworking the application can you not build in the functionality to re-establish a connection if there is a failure? That is, a submission from the application server to the database server detects a failure, etc. and then re-establishes the connection. If you need a more frequent check than during a user-initiated roundtrip, you may be best served by using the "dummy query" technique on some time interval.
    From my understanding using HA Event Notification would require a RAC database (plus a multi-threaded application and services correctly configured on the RAC-side).
    In the documentation I see this:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14250/oci09adv.htm#sthref1495
    "Applications must connect to a RAC instance to enable HA event notification."
    In any case, this has the potential to be a bit complicated...
    Regards,
    Mark

  • How to enhance the Excel export from Crystal Reports

    Hello,
    I am new in Crystal Reports and I wonder if it is possible to enhance the Excel export from Crystal Reports with post-processing that would be applied to the Excel exported file.
    By example, is it possible to freeze the window panes, so rows and columns are frozen in place on the screen?
    Is there any possibility to obtain the file exported to excel to work with.
    Or maybe there is some ways to parametrize the Excel export from Crystal Reports?
    Any suggestions are welcomed.

    If you are using Crystal Reports 2008 you can use the Report Application SDK that is now available.
    It has a object called PrintOutputController that has an export method that allows you to get access to the exported file before you send it to the user.
    Check the Developer library and the samples for details.
    <a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/robhorne</a>

  • Can't Print Landscape from Crystal Reports Viewer XI

    Post Author: conrad
    CA Forum: General
    Product: Crystal Reports Viewer XI, version 12.0.0.r130_v20070725 and
    Crystal Reports XI, version 11.0.0.1282
    Patches Applied: none
    Operating System(s): XP Pro SP2
    Database(s):
    Error Messages: noneSteps to Reproduce:
    Download and install Crystal Reports Viewer XI
    Open a Crystal Report that prints landscape.
    Save report with data.
    Open that report with Crystal Reports Viewer XI.  Report will display landscape.
    Click Print..OK
    Viewer will attempt to scale output to fit on portrait paper, with varying degrees of success.
    Checking the properties of the report from Viewer (File...Report Properties...) shows a "Page Orientation" of "Landscape" and a message "Page Orientation and size defined by the application (no page information set by report author)."
    Any ideas on how to get the report to print landscape?  It prints that way from Crystal Reports XI.

    Hello Glenda,
    as you refer to the legacy technology I recommend to post this query to the [Legacy Application Development SDKs|SAP Crystal Reports - Legacy SDKs; forum.
    This forum is dedicated to topics related to legacy SDKs, including the Report Designer Component (RDC), OCX, VCL, and Crystal Reports Print Engine (CRPE).
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Legacy Application Development SDKs queries remain in one place and thus can be easily searched in one place.
    Thanks a lot,
    Falk

  • How to assign a variable value to crystal report viewer formula with CR2008

    Hi ,
    I am using crystal reports 2008 and i am not able to find how to assign  variable value  to crystal report viewer formula.
    In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
                                             crystalreport1.Formulas(1) = variable2
    but, i don't find similar kind  in crystal reports 2008.
    How can i achieve the same functionality using crystal reports 2008.
    Thanks in Advance
    Regards,
    Ramnath

    Hi,
    Can i anyone help me out with this.
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

  • The "next" button of crystal report viewer does not work

    hi
    I use crystal report viewer control to show my crystal report on my aspx page.
    like:
    <CR:CrystalReportViewer id="CRViewer" runat="server" HasRefreshButton="False" PrintMode="ActiveX" DisplayGroupTree="False"
    AutoDataBind="True"
    SeparatePages="TRUE"
    Height="520px"
    Width="900px">
    </CR:CrystalReportViewer>
    however when I try to navigate to next page by click "Next" arrow button on the crystal report viewer toolbar, it only can navigate to the page 2, whatever I click the "Next" button, it still stay on page 2,
    actually this report has 10 pages.
    On the other hand, if I input the page number, such as 5 on the "goto" textbox, it will jump to page 5 correctly.
    Could you give me any good advices to solve this problem?
    Thanks.

    There are a few threads discussing the issue in this forum. See if these provide some guidance:
    "Next Page" wont go beyond page 2 in Html Viewer (Crystal.NET for VS 2008)
    Re: Crystal Reports .NET Visual Studio 2005
    Problem in CrystalReportViewer
    Ludek

  • Crystal report Viewer for 8.5 reports

    We are using an older version of Crystal reports (8.5) and use an application called RePortal (that use Crystal Enterprise) to view the reports through out the building. We recently had a report that was created and we are getting an error:
    Error encountered by Crystal PageServer
    Unable to connect: incorrect table location. File Worksheet.rpt. On Cache/Page Server:
    I tried a few solutions I found on line, but that didn't work.
    My thought was to bypass and download the free Crystal Report viewer, but the one I found was only compatible with Reports written in 9 or higher.
    Does anyone know how to resolve the error above or we I can find an older version of Viewer to work on 8.5

    Hi
    Now am using Crystal Report 8.5 with Visual Basic 6.0
    i want to use latest of crystal report with Visual basic 6.0
    can anyone suggest which version i have to use
    it must be compatible with Visual Basic 6.0
    Regards
    Abhi

  • Reuse Crystal report Viewer For different reports - unload cache

    So I am migrating from crystal reports basic to crystal reports 2008. I have hit a stumbling block. Rather than have a new page and report viewer for each report I decided it would be easier to have one report viewer and send to it in session variables the report I wish to run and appropriate parameters. This seemed to work fine in CR basic.
    Now I have upgraded the viewer works fine for the first report I run however it then caches this report and doesn't seem to clear it down, if the new report has different parameters I will get a parameter error. If I run a report requiring the same parameters I will get the original report not an updated one.
    I believe I need to leave the CrystalReportSource cache on in order to page the report (correct me if I am wrong)
    I have taken a few snippets of code, is this possibly running too late in page life cycle have I missed something or is there a way to force a cache clear:
    protected override void OnLoad(EventArgs e) {
    //setup report in viewer with correct db logon
                    CrystalRepSource.Report.FileName = report;
                    SetupLogonInfo(CrystalRepSource);
                    //add parameters
                    AddParam(paramFields, pfItem1, dcItem1, "@year", year);
                    AddParam(paramFields, pfItem2, dcItem2, "@school", school);
                    AddParam(paramFields, pfItem3, dcItem3, "@division", division);
                    AddParam(paramFields, pfItem4, dcItem4, "@progArea", progArea);
                    AddParam(paramFields, pfItem5, dcItem5, "@type", SessionHandler.record_type);
                    AddParam(paramFields, pfItem6, dcItem6, "@filterText", "School = \'" + school +
                                                            "\' Division = \'" + division
                                                            + "\' Programme Area = \'" + progArea
                                                            + "\' Record Type = \'" + SessionHandler.record_type_text + "\'");
    CrystalViewer.ParameterFieldInfo = paramFields;
    private void SetupLogonInfo(CrystalReportSource CrystalRepSource)
            TableLogOnInfo logOnInfo = new TableLogOnInfo();
            logOnInfo = CrystalRepSource.ReportDocument.Database.Tables[0].LogOnInfo;
            ConnectionInfo connectionInfo = new ConnectionInfo();
            connectionInfo = logOnInfo.ConnectionInfo;
            connectionInfo.DatabaseName = Application["db"].ToString();
            connectionInfo.ServerName = Application["server"].ToString();
            connectionInfo.Password = Application["pass"].ToString();
            connectionInfo.UserID = Application["user"].ToString();
            CrystalRepSource.ReportDocument.Database.Tables[0].ApplyLogOnInfo(logOnInfo);
        private void AddParam(ParameterFields paramFields, ParameterField pfItem, ParameterDiscreteValue dcItem, string fieldName, string value)
            pfItem.ParameterFieldName = fieldName;
            dcItem.Value = value;
            pfItem.CurrentValues.Add(dcItem);
            paramFields.Add(pfItem);

    ok so I have tried changing the code to:
    CrystalRepSource.ReportDocument.SetParameterValue("@year", year);
                    CrystalRepSource.ReportDocument.SetParameterValue("@school", school);
                    CrystalRepSource.ReportDocument.SetParameterValue("@division", division);
                    CrystalRepSource.ReportDocument.SetParameterValue("@progArea", progArea);
                    CrystalRepSource.ReportDocument.SetParameterValue("@type", SessionHandler.record_type);
                    CrystalRepSource.ReportDocument.SetParameterValue("@filterText", "School = \'" + school +
                                                            "\' Division = \'" + division
                                                            + "\' Programme Area = \'" + progArea
                                                            + "\' Record Type = \'" + SessionHandler.record_type_text + "\'");
    private void Page_Unload(object sender, EventArgs e)
            try
                    CrystalRepSource.Report.DataSources.Clear();
                    CrystalRepSource.Report.Parameters.Clear();
                    //CrystalRepSource.ReportDocument.Close();
                    //CrystalRepSource.ReportDocument.Dispose();
                    CrystalRepSource.Dispose();
                    CrystalViewer.Dispose();
                    GC.Collect();
            catch { }
    I experimented with various bits in the page unload as you can see I have commented a bit out at present as it was throwing an exception. The SetParametersValue while handy (will clean the code up a bit) didn't make any difference I am still getting the same issue.

  • Reg : How to get the company address in Crystal Report

    Dear members,
    I am stuck up with problem in Crystal Report in my project. I want to get the company address in the Crystal Report. How can i get the company address in the crystal report. Hope i will get help in this regard.
    Thank you.
    Regards,
    Venkatesh Rajagopalan

    Hi Dear
      plz send me  what is your methad to applay,
    so i am sending u code   for company address
    all company information  contain the OADM table ,
    so applay the select query  ang get the data form table
    this ia sample code ........
      SAPbobsCOM.Recordset oRecordset = (SAPbobsCOM.Recordset)ICreon_SBOAddOn.SBOCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                    string GetComp = "select * from OADM ";
                    oRecordset.DoQuery(GetComp);
                    strCompName = oRecordset.Fields.Item("CompnyName").Value.ToString().Trim();
       Use this code  u will find the company name
      and after  that pass this valu a parameter
    oRPT.SetParametervalue ("CompanyName", strCompanyName)
      so pass the strCompanyName  as a parameter in the  cdrystel report.
    hope  help this code ,
    if u have any problem so plz send me  question in form,
    if u r  satisfied my answer so pl give me rewards point,

  • How to get the ard file of crystal reports

    Hi all,
    I have downloaded crystal reports from sap market place but i dont have .ard file for that how to transfer that reports into sap. How to get the ard file please help me out.
    Thanks & Regards,
    Murtuza Ahmed.

    When you click on your SAPCrystalSetup.exe and select the path to your add-on folder it will install the files and your ard file will be situated in your add-on folder.  Then you can start SAP up and install it from SAP. 
    So if your SAP install is in your local drive your ard file for crystal reports should be here C:\Program Files\SAP\SAP Business One\AddOns\SAP_CR
    Hope this helps.

  • How to display the  text in a classical report before top-of-page?

    Hi all,
    I am developing a classical report with top-of-page because i want to display the texts of cloumns  even users scroll down the output.
    But here the problem is i have to display a text and selection screen values in the ouput ,Before this top-of-page. But i couldn't find the way to do it.
    Please help me on solving this problem?
    Thanks,
    Vamshi.

    Hi Vamsi,
    whenever there is write statement and you are going to display some thing the system checks for the TOP-OF-PAGE and we are helpless here
    so declare your heading in the TOP-OF-PAGE only
    THIS is SAP provided way of the SYSTEM bahaviour
    Regards
    ramchander Rao.k

Maybe you are looking for

  • Advance Payment and part recoveries

    Hi All, Right now we are using the advance payment functionallity of FI module. ( F-47 and F-48). Now if i want to recover the advances in parts, how can the information for this recovery of advance can be given to accounts dept. Is it possible to gi

  • Advice on best workflow for large Motion project

    I am a part-time video editor/designer/motion graphics creator/etc. Normally, I work on projects with pieces no longer than 5 minutes, even if the projects themselves might be 30-40 minutes of total material--mostly video support for conferences and

  • QM Control Key

    Hi, What is the use of QM Control key in Procurement? I was creating a purchase order with ref of PR then SAP shown me the error message : "QM control key not allowed" According to me QM view is maintained for quality purpose and its internal matter

  • JButton problem

    hi, i am new to java and need a bit of help. I have 2 frames and when i click a button on one of them the other should get displayed. So far everything works.to do that i am using the following code public void actionPerformed(ActionEvent e) new Bord

  • I have installed Premiere, but I can't find it on my computer

    I have the Creative Cloud and the Application Manager tells me that Premiere is up to date, however I can't find it in my applications folder nor via spotlight and I can't download it, because the Application Manager assumes that it's there somewhere