Printing Individual Reports in Thick Client Application

<p>Hi</p><p>I am exploring the capabilities of printing in Thick Client Applications.</p><p>I am following Creating a Thick Client Application >> <a href="/node/321" title="http://diamond.businessobjects.com/node/321"><font color="#325087">http://diamond.businessobjects.com/node/321</font></a> </p><p>In the crystal report viewer, there is a main report panel whereby there many different objects generating a separate report each.</p><p>Left clicking the object in the main report panel loads the report on the right panel.</p><p>My challenge is that the user would need to "remember" which pages, object 3 (for example) generates such a report, if he/she wanted to print that report (object 3&#39;s report) seperately.</p><p>Is there an existing work-around to tackle this?</p><p>(For instance, right clicking on main report panel and print that individual report.)</p><p>Orbid</p>

<p>Hi Orbid,</p><p>      I want to clarify what you are asking to ensure that I have a good understanding of the question. When you view a report you are seeing a Group tree on the left hand of the report viewer. If a user drills into this particular group they are presented with a new viewer pane displaying only that group&#39;s data (and potentially some data that was hidden at the top-level). You are wondering if there is a shortcut that can be applied to the group tree which would allow the user to print that group&#39;s data without viewing first. Is this correct? I am not too sure if this is possible but I will check with the Developer. I know that we can capture the Drill-down event but I am not sure if we can extend the click action to provide a context menu containing custom events (e.g. print) </p><p>I will look into this and get back to you.</p><p>Regards,<br />Sean </p>

Similar Messages

  • Tomcat session management (serverid) in loadrunner - thick client application (single signon)

    Hi,
    We have a system that is currently undergoing scalability and performance tuning and we are having a problem with sessions randomly expiring.
    Here is our setup:
    Tomcat
    LoadRunner launching 20, 50, 100, 150, 200 users against the server
    (within a few mins of eachother)
    Thick client application (signle signon)
    As per the business requirement created the scripts with single sign on, however in vugen
    the scripts works fine. During the load test noticed that after few mins approx 7 mins started
    getting the error.
    Recording captured: Xml request and response
    Correlation: serverid (ex. 2142) login transaction
    Script details:
                                 Login (serverid)
                                 Action repeat iteration till the execution (replacing the serverid throught the script)
                                 Logout (replacing the serverid throught the script)
    But manually looks all fine the user can use the same one login throught the day without any expiration.
    Note: while the user gets login a jsessionid 12BDE39384940483HDFFKDH.1 created but the loadrunner unable to record anywhere in the script.
    Quick response will be appreciated.
    If you need any additional information please let me know.
    Regards,
    Suresh.

    I'm having the same problem, did you get any luck with this ?
    Thanks

  • Deploy Crystal Reports 10 Thick Client

    I bought CR10 but nobody could help me deploy a simple RDC application to a client. I am still using CR8.0 but now I need to upgrade as CR8 has a bug. CD10 works fine on my computer where the full CR10 is installed. When I deploy it, no error message just a blank screen where the report should be displayed. (I can send the small app with the relevant report file)
    Do I need to purchase other licenses for the deployment? NB. this is not a
    net or web application, just a thick client. I am desperate and would
    upgrade to CR11 if required as long as the deployment can work.
    I have tried the Merge Modules with Installshield for the deployment package. I am using Visual C++ 2005.
    Is there anybody that can tell me what to do ... or can I download the client install package for CR10 somewhere?
    Thanks

    An assumption is that you are using CR 10.5(?)...
    Make sure you are using SP 1:
    Crystal Reports for VS 2005 and VS 2008 Updates & Runtime Downloads
    If that does not help, Fiddler may be a good - see what it logs.
    Check event logs.
    Restart IIS(?).
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow me on Twitter

  • Aski user information while trying to print a report from a web application

    Hi,
            I am trying to print a report from web application. When I click on the print button then the page is redirected to the below link and asking for user information. See the below given link for more help.
    _http://<server><port>PlatformServices/service/app/logon.do?appKind=InfoView&service=%2FOpenDocument%2FappService.do&backContext=%2FOpenDocument&backUrl=%2Fopendoc%2FopenDocument.jsp%3FSERVICE%3D%252FOpenDocument%252FappService.do%26OBJIDS%3D20016421%26backUrl%3D%252Fcontent%252Fview.do%26PREF%3DmaxOpageUt%253D200%253BmaxOpageC%253D10%253Btz%253DUS%252FPacific%253BmUnit%253Dinch%253BshowFilters%253Dtrue%253BsmtpFrom%253Dtrue%253BpromptForUnsavedData%253Dtrue%253B%26CONTAINERID%3D6424083%26backContext%3D%252FPlatformServices%26LOC%3Den%26APPKIND%3DInfoView%26PVL%3Den%26ACTID%3D280%26service%3Dtimeout&backUrlParents=1&appName=OpenDocument&prodName=BusinessObjects+Enterprise&cmsVisible=false&cms=<servername>%3A6600&authenticationVisible=false&authType=secEnterprise&sso=false&sm=true&smAuth=secLDAP&persistCookies=true&sessionCookie=true&useLogonToken=true
    The instance Id for the report is generated successfully and the staus of the report is showing as success on Business Objects server side ie. crystal server side.
    And we are using OpneDocumentURL for generating the report. And the in the URL we are passing the "Instatce ID" and the "Token" which Both are generated successfully.

    Hi,
    This is a crystal report link which i am trying to print.
    The actual URL to generate a report is,
    http://servername:port/OpenDocument/opendoc/openDocument.jsp?&iDocID=22874532&token=systemname%4022874531JOLS2B40fr7cuAE522874529JVB36Yr3PswjM7IP
    but it is redirected to below URL,
    http://servername:port/PlatformServices/service/app/logon.do?appKind=InfoView&service=%2FOpenDocument%2FappService.do&backContext=%2FOpenDocument&backUrl=%2Fopendoc%2FopenDocument.jsp%3FPREF%3DmaxOpageUt%253D200%253BmaxOpageC%253D10%253Btz%253DUS%252FPacific%253BmUnit%253Dinch%253BshowFilters%253Dtrue%253BsmtpFrom%253Dtrue%253BpromptForUnsavedData%253Dtrue%253B%26service%3Dtimeout%26CONTAINERID%3D21700595%26backContext%3D%252FPlatformServices%26ACTID%3D279%26OBJIDS%3D22874532%26SERVICE%3D%252FOpenDocument%252FappService.do%26APPKIND%3DInfoView%26LOC%3Den%26PVL%3Den%26backUrl%3D%252Fcontent%252Fview.do&backUrlParents=1&appName=OpenDocument&prodName=BusinessObjects+Enterprise&cmsVisible=false&cms=systemname&authenticationVisible=false&authType=secEnterprise&sso=false&sm=true&smAuth=secLDAP&persistCookies=true&sessionCookie=true&useLogonToken=true
    -VinodC

  • Can't print a report from within web application

    <p>I can run the report within Eclipse and it displays fine.  When I click the export button a modal window comes up and all works as expeced.  If I click the print button then a modal box comes up but it is blank except for a little white square up in the top left corner.</p><p>When I view the html source in the browser, the displayPrintDialog function makes reference to active X print control.</p><p>prm.codebase = "../ActiveXControls/PrintControl.cab";</p><p>but I don&#39;t have that within my web application. </p><p>Is there something that I need to install on this machine to get printing to work?</p><p>Any help would be greatly appreciated.</p><p>Marty Jones </p><p> </p>

    <p>Unfortunately the ActiveX print control was not validated with the CR4E version of the Java Reporting Component. Therefore users must implement the prininting via the PDF print option. The print option is determined by the printMode property of the viewer. The default should be PDF but if you want to ensure that it always uses PDF you can set the following code using our API:</p><p> crystalReportPageViewer.setPrintMode(CrPrintMode.PDF);</p><p>If you are using the Tag Libraries you should set the property printMode equal to PDF.</p><p>Hopefully, in a future release we can look at adding in a "pure" print option again. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

  • Exception trying to Create a Thick Client Application

    JRCViewReport.java throws exception running as Java Application:
    Crystal Reports-Berichtsviewer 11.8.0.671
    java.vendor = Sun Microsystems Inc.
    java.version = 1.5.0_09
    os.name = Windows 2000
    os.version = 5.0
    os.arch = x86
    Exception in thread "Command" java.lang.NoSuchMethodError: com.businessobjects.crystalreports.viewer.applet.ViewerUI.clearMessage()V
         at com.businessobjects.crystalreports.viewer.applet.h.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:595)
    What is missing?

    Hopefully the following kbase article will solve your issue:
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2018313&sliceId=&dialogID=7454883&stateId=1 0 7456062
    -MJ

  • How to Print Crystal Report without any dialog message on the client side

    Hi!
    I've read too much questions like this, but i can't find any answer.
    How can i print a report on the client side directly?
    I have three buttons, "Generate Report", "Generate PDF", "Print".
    I want when the "Print" button was clicked, automaticaly the report is printed using default printer, like PrintToPrinter function, but in the client side.
    Thanks!

    If you search for previous posts about this, you will see many posts saying not possible.  If this functionality was possible, you could essentially have a page that would send something to a clients printer just by visiting the page, how bad of security hole would that be?

  • Print a report to a printer (server-side printing) Error

    <p>Hi ran into some hiccups following a sample from crxi_r2_jrc_desktop_samples</p><p>JRCPrintReport</p><p>I am attempting to send a report for printing on a Thick Client Application.</p><p>This is the error.</p><p align="left">- All configurations cleared.</p><p align="left">- CRConfig.xml not found</p><u><font color="#000080">com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException</font></u><font color="#ff0000">: Printer name could not be set: Brother MFC-8840D Printer on Megatron---- Error code:-2147215357 Error code name:internal</font><font color="#ff0000"> <p align="left">at com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException.throwReportSDKPrinterException(Unknown Source)</p><p align="left">at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)</p><p align="left">at com.crystaldecisions.reports.sdk.PrintOutputController.printReport(Unknown Source)</p><p>at JRCPrintReport.main(<u><font color="#000080">JRCPrintReport.java:78</font></u><font color="#ff0000">)</font></p><p>... </p><p>...</p></font><p><font color="#ff0000"> The printer name is verified to be correct.</font></p><p><font color="#ff0000">I tried to place ReportPrinter.jar at the first order but to no avail.</font></p><p><font color="#ff0000">Orbid</font></p>

    Sean:
    This is similar to mine which i followed from the sample.
    Code:
    <font color="#7f0055"><p align="left">public <strong><font color="#7f0055">class</font> JRCPrintReport
    <font color="#7f0055">static</font> final String <font color="#0000c0">REPORT_NAME</font> = "JRCPrintReport.rpt";
    <font color="#7f0055">public</font> static <font color="#7f0055">void</font> main(String[] args)
    <font color="#7f0055">try</font>
    //Open report.
    ReportClientDocument reportClientDoc = <font color="#7f0055">new</font> ReportClientDocument();
    reportClientDoc.open(<font color="#0000c0">REPORT_NAME</font>, 0);
    //Create and set print options.
    PrintReportOptions printOptions = <font color="#7f0055">new</font> PrintReportOptions();
    printOptions.setPrinterName("
    Megatron
    1160-TID");
    printOptions.setJobTitle("Sample Print Job from JRC.");
    printOptions.setPrinterDuplex(PrinterDuplex.<font color="#0000c0">horizontal</font>);
    printOptions.setPaperSource(PaperSource.<font color="#0000c0">auto</font>);
    printOptions.setPaperSize(PaperSize.<font color="#0000c0">paperA4</font>);
    printOptions.setNumberOfCopies(1);
    printOptions.setCollated(<font color="#7f0055">false</font>);
    PrintReportOptions.PageRange printPageRange =
    <font color="#7f0055">new</font> PrintReportOptions.PageRange(1, 1);
    printOptions.addPrinterPageRange(printPageRange);
    //Print report.
    reportClientDoc.getPrintOutputController()
    .printReport(printOptions);
    //Release report.
    reportClientDoc.close();
    System.<font color="#0000c0">out</font>.println("Successfully send report to the printer.");
    <font color="#7f0055">catch</font> (ReportSDKException ex)
    ex.printStackTrace();
    Any views on this error?
    Printer name could not be set:
    Megatron1160-TID---- Error code:-2147215357 Error code name:internal
    Anybody else having problems with sending a report to a printer?
    Orbid

  • Java Thick Client Parameter bug

    Hi Sean,
    The Crystal Report for Eclipse is looking awsome but you provided more functionalities for web development partial with standalone application's
    Also I think you have removed the dependency of CRCONFIG.xml for Java Thick Client(Stand Alone) ,so I think i dont need to place the CRCONFIG.xml in class path ,so its very nice.
    Presently I am using the latest jars provided in crystal report for eclipse.Prior to this I was using jars from ftp1.businessobjects.com/outgoing/ehf/CE/XI/JRCPatch.zip
    In that version of jars if my report XYZ.rpt has some paremeters and if i dont set the parameter values then the JAVA THICK CLIENT(REportViewerFrame) used to provide me a dialog in which i can padd the parameter for the report.
    Noe in the latest version of jars provided in eclipse the JAVA THICK CLIENT does not show the dialog nor does it opens the report instead it logs as
    "Some parameters are missing values"
    I dont know if I am missing something.
    Please guide on this.
    Also I want to ask that the Printing/Viewing issue has been fixed for Java Thick Client I had report about this few months back.
    We are very excited to use the Crystal Reports for Java but the (Java Thick Clinet)so Please help us we want to get rid of native code.
    Thanks,
    Debraj.

    <p>Hi Debraj,<br />     Providing more thick-client support is definitely an area we will look at resolving in the next release of CR4E. In the meantime you may find the following whitepaper useful:</p><p><a href="/node/321"><u><strong>http://diamond.businessobjects.com/node/321</strong></u></a></p><p>This will explain the necessary steps to create a thick-client application using CR4E. It sounds like your JAR files may be out of synch. We use the thick-client viewer for our Preview tab in the CR4E designer so you should notice pretty much exactly the same behaviour in your application. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a>          </p>

  • Printing report oracle10g at client side through form

    Report Mode : CHARACTER.
    I am running report through oracle10g from in browser based environment from client machine.
    My application server running that form. My code is following for setting the report destination type:
    IF :B01.S_REPORT_TO = 'S' THEN
    SET_REPORT_OBJECT_PROPERTY(REP_ID,REPORT_DESTYPE,CACHE);
    ELSIF :B01.S_REPORT_TO = 'P' THEN
    SET_REPORT_OBJECT_PROPERTY(REP_ID,REPORT_DESTYPE,PRINTER);
    ELSIF :B01.S_REPORT_TO = 'F' THEN
         SET_REPORT_OBJECT_PROPERTY(REP_ID,REPORT_DESTYPE,FILE);
    SET_REPORT_OBJECT_PROPERTY(REP_ID,REPORT_DESNAME,'c:\temp\abc.txt');
    END IF;
    vrep := RUN_REPORT_OBJECT (vrepid,PRAM_ID);
    web.show_document( 'http://servername:port/reports/rwservlet/getjobid'||
    SUBSTR (vrep, INSTR (vrep, '_', -1) + 1)|| '?'|| 'server=REPserver','_blank');
    But when i am using destype as print , the report output is directed to Application Server's printer and not in clinet computer's printer. as well as detination type is file , then specified file is stored in Application Server and not in client machine.
    HOW CAN I PRINT REPORT DIRECTLY AT DEFAULT PRINTER OF CLIENT COMPUTER OR SAVE THE FILE AT CLIENT COMPUTER'S HARDDISK

    Lionel wrote:
    Java bean is not supported anymore !
    [http://fdegrelle.over-blog.com/article-22717699.html|
    I strongly suggest that you read the article carefully and understand it it before you start spreading unverified rumors and mislead people.
    The article you pointed out in your post is a [url http://en.wikipedia.org/wiki/Disclaimer]Disclaimer wrote by the author of the Java Beans/PJCs found on that site.
    I will try to explain to you what Francois, the author of the site is trying to tell you in that Article and I'll be more than happy if Francois corrects me when I'm wrong.
    The article is clearly stating;
    Quoting the article:
    This material, these articles do not come from Oracle, have nothing to do with Oracle and are certainly not taken into account by the Oracle support.
    This mean's that the material pointed and the articles are not made, distributed or related to Oracle Corp. and "Oracle Support" will not help you if you have any questions or clarifications about these articles and/or materials. And the only person(s) will help you with them is the person(s) who wrote them and they are not from Oracle and if you have any questions you should ask send it to the e-mail address found on the homepage and not Oracle.
    This does not mean by any scope or dimension or by any mean that Java Beans are not supported to be used with Oracle Forms.
    Java Beans ARE supported to be used with Oracle Forms and in the next release Java has more integration with Forms.
    Francois, please correct me If I'm wrong.
    Thanks
    Regards
    Tony

  • Printing a report in client side

    Hai All,
    I am working on a J2EE application which using jasperreport for reporting but i am having an issue with that while printing it prints the report in server side but i wants tho print that in client side is there any options for doing this.
    Thanks in Advance
    Karthikeyan.V

    Yes my output is HTML but i have to print only some part of the html page and also the the HTML page shows only one page of the report at a time but i wants to print all pages in a single click action
    Regards
    Karthikeyan.V

  • Print a report from Application Express direct to a CUPS Printer

    Hi all, I'm new to this technology, is it possible to print a report from Application Express directly to a CUPS Printer? Can someone tell me in laymans terms how to do it? I find the terminology and documentation less than helpful.

    Jeremy,
    BI Publisher handles submitting reports directly to a CUPS printer. However, the APEX integration doesn't currently integrate with that portion of BI Publisher.
    Here's an options:
    Use the Java API of BI Publisher to build a custom Java program that would do this for you. Delivering to CUPS is part of the Java API.
    Bryan

  • Auto print out report for java application

    <p>Hi, </p><p>Now i&#39;m using eclipse 3.2 to develop a java application and using crystal report to create report.</p><p>I would like to directly printing out the report from the java application.</p><p>what the installer or plugin i need?</p><p>What the setting i need to set? </p><p>Can you give me the sample coding to directly print out the report from java application by passing parameter?</p><p>Thanks,</p><p>Hui Bee</p>

    There is a Consulting Solution called BOInterface that Business Objects Global Services sells and that helps you to achieve what you describe very easily.
    A description is <a href="http://www.mnsoft.org/bointerface0.0.html">here</a>.
    Particularly, see the <a href="http://www.mnsoft.org/boxinterfacedocs/com/bo/boxinterface/boreport/scheduler/BOReportSchedulerPrinter.html">BOReportSchedulerPrinter</a>. BOInterface comes with a complete example on scheduling to printer; that example can even itself be scheduled.
    Contact me via direct email for more information if this is interesting for you.
    HTH,
    M
    Matthias Nott -  Business Objects
    Service Line Leader Products EMEA
    [email protected]

  • How to print a report directly on to a printer on the client machine

    Hi,
    Could anyone let me know how to print a report directly on to the clients default printer in oracle forms 10g with OAS?.
    Regards,
    Prasad.

    Hello,
    <p>You can use this Java Bean</p>
    Francois

  • How to print the report directly without previewing (report viewer) using c# windows application

    Hi,
    Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
    can fill this problem.
    To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
    csCashInvoiceCal csCashCal; --Crystal report name .rpt
    dsCsReceipt dsCs; --created dataset
    DataTable u;
    DataRow s;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private System.Windows.Forms.PrintDialog printDialog1;
    ParameterValues paramValue;
    ParameterDiscreteValue discreteValue;
    ParameterFieldDefinition fieldDefinition;
    private void btnPrint_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt2();
    print2();
    csCashCal.Close();
    this.Cursor = Cursors.Default;
    private void loadReceipt2()
    dsCs = new dsCsReceipt(); --created dataset
    u = dsCs.Tables.Add("DtCsReceipt");
    u.Columns.Add("Qty", Type.GetType("System.String"));
    u.Columns.Add("UOM", Type.GetType("System.String"));
    u.Columns.Add("Description", Type.GetType("System.String"));
    u.Columns.Add("UnitPrice", Type.GetType("System.String"));
    u.Columns.Add("Discount", Type.GetType("System.String"));
    u.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
    s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    s["Discount"] = "";
    s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    u.Rows.Add(s);
    catch (Exception) { }
    csCashCal = new csCashInvoiceCal();
    csCashCal.SetDataSource(dsCs.Tables[1]);
    //csCashCal.Refresh();
    loadParameter2();
    private void loadParameter2()
    ParameterFieldDefinitions paramFieldDefinitions;
    paramValue = new ParameterValues();
    discreteValue = new ParameterDiscreteValue();
    paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
    discreteValue.Value = date;
    fieldDefinition = paramFieldDefinitions["Date"];
    commonParam();
    discreteValue.Value = txtcsno.Text;
    fieldDefinition = paramFieldDefinitions["InvoiceNo"];
    commonParam();
    discreteValue.Value = txtNameTo.Text;
    fieldDefinition = paramFieldDefinitions["CustomerName"];
    commonParam();
    discreteValue.Value = txtAdd.Text;
    fieldDefinition = paramFieldDefinitions["CustomerAddress"];
    commonParam();
    ------other parameters----
    private void commonParam()
    paramValue.Clear();
    paramValue.Add(discreteValue);
    fieldDefinition.ApplyCurrentValues(paramValue);
    private void print2()
    using (printDocument1 = new System.Drawing.Printing.PrintDocument())
    using (this.printDialog1 = new PrintDialog())
    //this.printDialog1.UseEXDialog = true;
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if (dr == DialogResult.OK)
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    try
    csCashCal.PrintOptions.PrinterName = PrinterName;
    csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
    printcount++;
    //saveCountPrint();
    catch (Exception err)
    MessageBox.Show(err.ToString());
    This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
    But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
    with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
    So here is my code so far which I don't know what's next:
    private void button2_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt3();
    //print3();
    this.Cursor = Cursors.Default;
    ReportParameter[] parameter = new ReportParameter[11];
    private void loadParameter3()
    parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
    parameter[1] = new ReportParameter("Date", date);
    parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
    parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
    parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
    parameter[5] = new ReportParameter("Agent", agent);
    parameter[6] = new ReportParameter("Discount", "Discount: ");
    parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
    parameter[8] = new ReportParameter("TotalSales", rdtotal);
    parameter[9] = new ReportParameter("Tax", rdtax);
    parameter[10] = new ReportParameter("TotalAmount", rdnet);
    private void loadReceipt3()
    DataSet dsrs = new DataSet();
    DataTable dtrs = new DataTable();
    DataRow drs;
    dtrs.Columns.Add("Qty", Type.GetType("System.String"));
    dtrs.Columns.Add("UOM", Type.GetType("System.String"));
    dtrs.Columns.Add("Description", Type.GetType("System.String"));
    dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
    dtrs.Columns.Add("Discount", Type.GetType("System.String"));
    dtrs.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    drs = dtrs.NewRow();
    drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    drs["Discount"] = "";
    drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    dtrs.Rows.Add(s);
    catch (Exception) { }
    int addtlRow = 7;
    if (addtlRow > (count - 1))
    addtlRow = addtlRow - (count - 1);
    for (int i = 0; i < addtlRow; i++)
    dtrs.Rows.Add();
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    localreport.Refresh();
    //what's next....
    So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
    Anyway I'm using VS 2010 with sql server 2012 express.
    You're help will be greatly appreciated.
    Thank you,
    Hardz

    After some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
    with my code above and helps solve my question.
    Here's the continuation of the code above:
    private void loadReceipt3()
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    Export(localreport);
    print4();
    private IList<Stream> m_streams;
    private int m_currentPageIndex;
    private void Export(LocalReport report)
    string deviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
    out warnings);
    foreach (Stream stream in m_streams)
    stream.Position = 0;
    private void print4()
    if (m_streams == null || m_streams.Count == 0)
    throw new Exception("Error: no stream to print.");
    PrintDocument printDoc = new PrintDocument();
    PrintDialog printDlg = new PrintDialog();
    printDlg.Document = printDoc;
    DialogResult dr = printDlg.ShowDialog();
    if (dr == DialogResult.OK)
    if (!printDoc.PrinterSettings.IsValid)
    throw new Exception("Error: cannot find the default printer.");
    else
    printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
    m_currentPageIndex = 0;
    printDoc.Print();
    Dispose();
    public void Dispose()
    if (m_streams != null)
    foreach (Stream stream in m_streams)
    stream.Close();
    m_streams = null;
    private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
    Stream stream = new FileStream(name + "." + fileNameExtension,
    FileMode.Create);
    m_streams.Add(stream);
    return stream;
    private void PrintPage(object sender, PrintPageEventArgs ev)
    Metafile pageImage = new
    Metafile(m_streams[m_currentPageIndex]);
    // Adjust rectangular area with printer margins.
    Rectangle adjustedRect = new Rectangle(
    ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
    ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
    ev.PageBounds.Width,
    ev.PageBounds.Height);
    // Draw a white background for the report
    ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
    // Draw the report content
    ev.Graphics.DrawImage(pageImage, adjustedRect);
    // Prepare for the next page. Make sure we haven't hit the end.
    m_currentPageIndex++;
    ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
    Thank you very much for this wonderful tutorial. :)

Maybe you are looking for