Report Generation without previewing

Hi,
i am generating report by clicking menu. Code under menu is...
run_product(reports,'daily',synchronous,runtime,filesystem,'',null);
Suppose i am viewing the detail of customers. i want to print the report of customer detail whose detail iam viewing. i want to generate report by clicking button without previewing report. what would be the code of it?
Thanks

place a button on ur report and in action trigger use srw.run_report for calling 2nd report.
srw.run_report('report path & name destype=.......');
pass value for DESTYPE what u want eg printer, screen, file. U can also pass other paramters.

Similar Messages

  • 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. :)

  • Print Report RDLC without preview ... very important for me.

    Hello, I want to ask you about print Report RDLC without preview .
    I saw this article here :
    http://msdn.microsoft.com/en-us/library/ms252091.aspx
    but I did not understand because the code is long and I think difficult.
    could you put simple code please?
    Thanks a lot.

    Would that fix this mod_jk problem? Do you mean to say that I have those permissions when I actually edit those files?
    I think the wiki is also mistaken assuming that JAVA_HOME is in the /opt directory.

  • Query preview works; report generation fails

    I have a report query pulling data from two tables that: works in MS SQL Management Studio with no errors, and when copied and pasted into the Query window in BIRT works with a resulting Preview window as expected. However, the moment I hit View (in HTML or PDF, my two preferred outputs), I get an error message stating that the Report viewer cannot convert:
    "Can not convert the value of None to Integer type."
    I am sure this refers to the following query code:
    ,CAST(CASE
    WHEN a.Access1 > 1 THEN u.o_name03
    WHEN a.Access1 = 0 THEN 'None' END as varchar(10)) as 'Event'
    Where I cast the value of field access1 (tinyint) to a varchar in a case statement. However, what I don't understand is that the preview runs and returns the expected text ('None') with no problems.
    Why does the report generation itself cause this error - and more importantly, how do I fix it?
    By the way, the above code worked, at one time, without the CAST statement (both in Preview and in the report) but I changed the data tables and re-bound the report fields (one-by-one - there are 20 of them.)
    Ideas? What am I missing?
    Thanks in advance.

    Here it is:
    Stack Trace:
    org.eclipse.birt.report.engine.api.EngineException: A BIRT exception occurred. See next exception for more information.
    Can not convert the value of None to Integer type.
    at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1245)
    at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1224)
    at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:96)
    at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
    at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
    at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
    at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
    at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
    at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
    at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
    at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
    at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)
    at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)
    at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325)
    at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)
    at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
    at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58)
    at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:118)
    at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:103)
    at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
    at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
    at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
    at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
    at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
    at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
    at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
    at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:360)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred. See next exception for more information.
    Can not convert the value of None to Integer type.
    at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:123)
    at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateExpression(ExprEvaluateUtil.java:88)
    at org.eclipse.birt.data.engine.impl.BindingColumnsEvalUtil.evaluateValue(BindingColumnsEvalUtil.java:201)
    at org.eclipse.birt.data.engine.impl.BindingColumnsEvalUtil.getColumnsValue(BindingColumnsEvalUtil.java:161)
    at org.eclipse.birt.data.engine.impl.ResultIterator.prepareCurrentRow(ResultIterator.java:784)
    at org.eclipse.birt.data.engine.impl.ResultIterator.(ResultIterator.java:168)
    at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:222)
    at org.eclipse.birt.report.engine.data.dte.QueryResultSet.(QueryResultSet.java:98)
    at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
    at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:83)
    at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
    at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
    at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
    ... 71 more
    Caused by: org.eclipse.birt.core.exception.CoreException: Can not convert the value of None to Integer type.
    at org.eclipse.birt.core.data.DataTypeUtil.toInteger(DataTypeUtil.java:276)
    at org.eclipse.birt.core.data.DataTypeUtil.convert(DataTypeUtil.java:104)
    at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateExpression(ExprEvaluateUtil.java:84)
    ... 82 more

  • Print crystal report without preview

    Dear All,
    i want print crystal report without preview.
    when i click print button i want show printer list install in that computer.
    so user can choose which printer that use to print. I means like if we printing document from office, we can choose the printer.
    how that i can do that?
    please help.
    best regards,
    Surbakti

    Since this issue has little to do with sql server, I suggest you post your question to a forum for CR
    SAP CR community

  • Excel - Modify rows without touching other data (have gone thru LV report generation 4 designs)

    File attached....
    Have gone thru FAQs and examples. (And also 4 parts of 'Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit'. Unfortunately this document is not clear enough for me.)
    Have task of modifying rows of the same excel sheet, number of times without touching data  already present (numbers and strings)
    I have an excel file. (attached)
    A test will be run N number of times.  (N<=17)
    SubTask 1 --> Each time it runs, string data needs to be placed in 'n'th row. (...there are going to be notes in Row 18 and row 19)
    SubTask 2  --> Each time it runs, a 1D array data also will be placed in the same row (but in different cells)
    SubTask 3 --> The number 'n' of the row (where to place the current iteration's data) needs to be determined on fly (by looking at "n-1"st non blank row)
    The same file needs to be used.
    How can above be achieved ?
    thnks
    Sandeep
    Attachments:
    sample excel file.xls ‏14 KB

    See if this board will help.
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391

  • Install of Report Generation Toolkit without Microsoft Office previously installed.

    After installing "LabVIEW Report Generation Toolkit for Microsoft Office Version 1.1.3" on a computer without Microsoft Office I noticed that the Report Generation VI palette does not include the "Excel & Word" specific VI's, even though I have "Excel & Word" installed. Is there any way to "activate" those VI's without installing "Microsoft Office?" If the answer is no and I do install "Microsoft Office" will those VI's become available on the Report Generation VI palette? Or will a reinstall of the "LabVIEW Report Generation Toolkit for Microsoft Office Version 1.1.3" be required?
    Message Edited by St. Pete SAIC on 06-17-2009 08:01 PM

    St. Pete SAIC wrote:
    After installing "LabVIEW Report Generation Toolkit for Microsoft Office Version 1.1.3" on a computer without Microsoft Office I noticed that the Report Generation VI palette does not include the "Excel & Word" specific VI's, even though I have "Excel & Word" installed. Is there any way to "activate" those VI's without installing "Microsoft Office?" If the answer is no and I do install "Microsoft Office" will those VI's become available on the Report Generation VI palette? Or will a reinstall of the "LabVIEW Report Generation Toolkit for Microsoft Office Version 1.1.3" be required?
    Message Edited by St. Pete SAIC on 06-17-2009 08:01 PM
    OK any question?  Install the specific Office version and if that doesn't change the registery keys that NI is depending on reinstall the LV Add-on.  Of course NI, software tool-kits check registered software!  Why install a "for Office" package that is unusable or (worse from a litigation point) includes functionality for unlicensed or pirated "Office" installations.  Again- "*xx For (R) Office xx*"  means they have gone through some licensing agreement.
    Jeff

  • How we can print directly a report without preview to a local printer in web

    How we can print directly a report without preview to a local printer in web-environment, whith Oracle 9ias Report server release 6i patch 11.
    The user want to print ticket, built by Oracle Report, without previuw on PDF format, in a web three-tier environment.
    Please supply my documentation in detail and sample code if you can.

    Hello,
    Take a look to the example provided in the note :
    Note.253881.1 How to Create a Report With a Frame Only on the Last Page at a Fixed Position
    Regards

  • How to import pictures into excel sheet without using report generation

    Dear Friends
    I want to know how to import the picture or picture file into excel sheet without using report generation..
    kindly come up with any suggestions or example code
    Regards
    Karthick
    Solved!
    Go to Solution.

    Thank you Rajesh 
    i am going through that vi
    Rajesh Nair wrote:
    Please go through below link
    http://zone.ni.com/devzone/cda/epd/p/id/3638
    Eventhough one subVI is missing i think it will be usefull for you.
    Regards
    Rajesh R.Nair
    Rajesh Nair wrote:
    Please go through below link

  • Report Generation Toolkit (Word) : How to use correctly bookmark and cross-reference without "Error! Reference source not found"

    Hi,
    I try to generate a report using a template. In my template I use some cross-reference to refer to one bookmark. For exemple in the first page I created a bookmark for my name and in the header I created a cross-reference refer to my name. The problems is when I run my VI the bookmark actualise perfectly but the cross-reference refer to the bookmark can't actualise with the same value and generates an error : "Error! Reference source not found".
    Can somebody help me please!
    Nki
    Solved!
    Go to Solution.
    Attachments:
    01.jpg ‏72 KB

    Hi,
    When i create the word template, the bookmaks and the cross-reference referred to the bookmark update correctely. The problem is when I try to change the bookmark using "report generation from template vi" the bookmark change but not the cross-reference and the error generated is "Error! Reference source not found". 
    I make coople reasherch and i think they have no solution for this because : "if the text in a heading referred to in a cross-reference is revised, the cross-reference to the heading may no longer work" (http://office.microsoft.com/en-us/word-help/troubleshoot-cross-references-HP005189368.aspx).
    To "resolved" this problem I create an other bookmark in the template who have the same value white the principle bookmark.   
    I use Labview 2011 and Micosoft office 2010.

  • How to populate the last empty row in Excel without using Report Generation Kit

    I wrote  a Labview SUb Vi that uses Report Generation Toolkit that is not loaded on the test stand. I am looking to convert it from Report Generation Vi like New Report,  Append Table to Report, Dispose Report. The tunneling through all the report generation Vis seems extensive. Code is attached. Thanks, Greg
    Greg

    Thank you that was a big help...
    I used the Excel Forum to get a lot of great ideas.  My code is almost working.
    There is a 2-D String Array that represents the String data that I am exporting to the Excel File Sheet 1 - 5.
    I am attempting to determine the last populated row in sheet 1 then populate the next row of Sheet 1.  Since all 5 sheets are populated every time, I should not have to search every sheet for the last row.
    I am getting two row populated on sheet 1 with seeming the same data.
     I found an AXExcelWrite2D ArrayWorksheet.vi that I thought would work.  I think there is a Table  determination that is causing me problems.  The link is http://lavag.org/topic/13324-labview-and-excel-activex-or-ado/.  The Application Invoke Node has a convert formula with "FromReferenceStyle" with R1C1 Attached to it.   I am not sure what this function is doing.  When I try to bring the function help up, there is a missing file.
    I am including both the new active x vi and the report generation vi.   Report Generation VI works.
    I would appreciate any assistance I can get on this.
    Thanks
    Greg
    Greg
    Attachments:
    REPU Test Data Population using Active X Write Save.vi ‏92 KB
    REPU Test Data Population.vi ‏60 KB

  • Generation of previews is still a very significant problem

    An old problem surfaced again yesterday, after several years of stability.
    I decided to upgrade my previews in preparation for a move to a new iPad.  My reading says that, with the retina screen, the new iPad is capable of handling larger image files and showing much more detail than previous machines.
    I have had much of my Aperture Library on my iPhone for well over a year and I liked this functionality.
    So I set my preference for Preview quality higher and selected all my photos (around 22000) and started an "Update Previews".  Three or four times, the process crashed and I restarted it.  Then there was a crash that could not be handled.  Each time I rebooted Aperture, it crashed before I could do anything about it.
    So I did all three recovery procedures.  Holding down Command-Option on reboot, I repaired permissions, repaired the database and then rebuilt the database.  This let me reboot successfully, but once the Update Preview recommenced automatically, Aperture crashed again.
    My reading says that there was a corrupted file somewhere.  But there's no way to find it without trying Update Preview on one or two or a few image files at a time—a process which could take days or weeks with a big library.
    So I wiped my disk clean and copied over one of my back-up libraries and gave up on the Update Preview.  Presumably, my back-up library has the corrupt file in it and I wasn't about to lose all Aperture functionality again.  Fortunately, I maintain a number of Vaults and other Library back-ups (created outside Aperture), so I can recover when my default Library gets into a state like yesterday.
    The bottom line is this—there appears to be no way to easily root out a single corrupted file.  When you try to generate a Preview of a corrupted image file, Aperture will crash, and sometimes this is fatal and you have to simply replace the library you are using.  So there's a crying need for an effective method of finding and correcting a single corrupted file, AND/OR the software should report a corrupted file, but carry on with the generation of previews for the thousands of good files.
    I've decided to avoid this problem in the future by changing my work method.  I can do without the previews.  I've turned off the Maintain Previews for this Project, for all my projects.  I will select a few of my best images and will create high-end previews of them for my iPad and that will satisfy my needs.

    My reading says that there was a corrupted file somewhere.  But there's no way to find it without trying Update Preview on one or two or a few image files at a time—a process which could take days or weeks with a big library.
    Yes, that procedure would be terribly slow on a large library: But you could search more efficiently by a "divide and conquer" method:
    Back up your library.
    Divide the set of images in your library in two albums of equal size; album A1 and A2.
    Try to build the Previews for all images in Album A1 at once.
    If that succeeds, you know that does A1 not contain the corrupted image - you'll have to search A2 next.
    But if it crashes again, the corrupted image is in A1 and not A2.
    Depending on the first result now build two albums B1 and B2 from the images in either A1 or A2 (depending on the result of step 1).
    Then divide again, and again, and again, until the album is so small that you can spot the broken image.
    Using this subdivision strategy you could scan 100000 images in only 16 steps
    So there's a crying need for an effective method of finding and correcting a single corrupted file, AND/OR the software should report a corrupted file, but carry on with the generation of previews for the thousands of good files.
    d’accord!    Have you sent feedback to Apple? http://www.apple.com/feedback/aperture.html
    Regards
    Léonie

  • Report Generation Toolkit V9.0.0 : Print Report.vi doesnt print

    Hi,
    i have migrated my Labview 8.5 Project with Report Generation Toolkit V1.1.2 to a Labview 2009 System with Report Generation Toolkit V9.0.0.
    In this Project I use the Report Generation Toolkit for printing out a Standard Report with e few Tables and Graphs.
    Now the VI Print Report.vi delivers the Error -41002 with the Text "Invalide Printer Name". I have, of course installed the propper Printer on the machine.
    I don´t connect a string to the "Printer name" input of the VI, because i want to use the default printer.
    In my oppinion, there´s  a bug in the Print Report.vi: if you don´t wire the "Printer name" input, the vi should use the default printer, but in this case the vi connects the empty input string to the input of the method node it calls.
    I fixed this bug, but the method node still returns the same error.
    any ideas?
    Thanks!
    Solved!
    Go to Solution.

    Thank you for the link!
    For some reasons i can´t find this specific article in the knowledge base (my browser is always rerouted to the german version of ni.com, because i am in Austria). I tried to search with the exact title of this article, and the error message string, but no results...
    I have also installed Labview 8.5 and the "old" Toolkits on my new computer in addition to Labview 2009 and the "new" Toolkits and tested my program in 8.5. Here i got an error mentioning the margins and i had to change the margin settings for printing out, then in worked.
    After reading the article, i have applied the same changes for the margins in the 2009-version of my program and it works too!
    Problem solved!
    Thank you very much!
    PS:
    I first wrote, that there´s maybe a bug in the new version of the Print Report.vi, but i´ve compared it with the old version and it seems to be no bug, sorry!
    After all I decided to stay with Labview 8.5 for now, because of another problem:
    it´s not possible to "save for previous version" from LV2009 to LV8.5 directly.
    Laview crashes, when a VI contains an event structure as i found out by searching through the "known issues", and i have a lot of VIs with event structures!
    I have to have the possibility to save my Labview projects for 8.0 and 8.5. The only way is to save for 8.6 and then save from 8.6 to 8.5.
    That´s nasty and time-consuming!
    Maybe a future update will solve this problem (without producing new ones)

  • Report Generation Toolkit Error

    I  have an application that generates multiple excel spreadsheets each containing a table and four graphs.  This has been working fine for three months but I am now getting error when generating the reports.  The source of the error is in the Excel_create_workbook as indicated on the attached picture.  I am passing in a template name for my excel reports.  The error code (-2147352571) states a type mismatch.  The file path to my template is a constant so I can't see how sometimes I get a type mismatch and other times I don't.
    Any help on this would be greatly appreciated.
    Thank you,
    AJL
    Attachments:
    create_Workbook error.JPG ‏269 KB

    Thanks for the reply, however, this VI is part of the Report Generation Toolkit so I don't want to have to modified NI's code if possible.  I did try your suggestion without saving the VI and I still got the same error. 
    Any other ideas? 
    BTW - I encountered this problem first in an executable but have since seen the error in the development code.
    Does anyone know if there is a limit to how many times you can create an excel document from LabVIEW?  I wouldn't think so but the error seems to happen if I try to create several (more then five usually) documents at a time. 
    Thanks in advance
    AJL

  • EHS Report Generation

    Hi Guies,
    During report generation of SOP for a specification using Generation varient and report template, I am unable to release the report using transaction cg56. I am getting message "action accept can not be done with reoprt status "generation possible"
    What can be the possible reasons, how to change the status
    Suhas

    Dear Suhas,
    Pl check the rating in generation variant.
    Also check the services are currently running without fail. Check the Background jobs running or not.
    Check in CG5z WWI server is up and running.
    PL do confirm once ur issue solved.
    Regards,
    Gunak

Maybe you are looking for