Report execution without prompting user id

Hi,
Is it possible to execute the report using Query designer/Web Application designer without prompting for User Id and password for selected queries?
If possible, please let us know.
Thanks in advance.

Hi,
This is possible with workbook and by creating a macro which has the auto logon code. Create a workbook on the query and you need to create a macro and call the function 'sapBEXgetConnection'.
With this you can specify the user id and password to workbook and when ever workbook is refreshed the logon will be done automatically for specified user id and password and data will be retrieved.
Hope this gives you an idea.
Regards
Akhan

Similar Messages

  • XML Publicher Report Output without Prompt Value

    Hello,
    I've one report(XML Publisher) which prints various data from PS_JOB,PS_PERSONAL_DATA and some other Performance tables.
    The Prompt Values are from a dynamic view which shows the Subordinate employees(emplids and names) of the login employee.
    The base query view i created has all the information of all active employees from all Business Unit. Now when i select when employee from prompt table the output values for that particular employee and is ok. But when i don't select anything(no table edit), it is not showing the output of my subordinates but for all the employee. That is Right because i've base report view is for all employees.
    Is there any way that if i dont select anything from prompt values i'll get only output of my subordinates only?
    Regards!

    Thanks. I did try that before but the view didn't build but i don't how today the view built successfully.
    But when i tried to run the query with a normal user who's having subordinate the excel output is still blank.
    One more thing, when i checked Resolve Meta SQL in Application designer, the %oprclause doesn't resolve to PS.
    below is my complete query..with subqeury for finding current user..
    SELECT A.emplid,
           A.Name_Display,
           K.descr,
           T4.effdt join_date,
           D.grade,
           G.descr Dept,
           D.effdt Last_prom_dt,
           period_begin_dt,
           AA.EMPLID MGR_ID_VW,
           AA.NAME_DISPLAY NAME_DISPLAY_MGR,
           ab.supervisor_id EMPLID_FM_VW,
           FMGN.name_display NAME_DISPLAY_FM,
      FROM PS_PERSONAL_DATA A,
           (SELECT EMPLID, NAME_DISPLAY FROM PS_PERSONAL_DATA) AA,
           (SELECT ad.emplid,
                   DECODE(ad.supervisor_id, ' ', 'XXXX', ad.supervisor_id) supervisor_id
              FROM ps_job ad
             WHERE ad.effdt = (SELECT MAX(t3.effdt)
                                 FROM ps_job t3
                                WHERE ad.emplid = t3.emplid)) AB,
           (SELECT EMPLID, NAME_DISPLAY FROM PS_PERSONAL_DATA) FMGN,
           (SELECT emplid, effdt
              FROM ps_job T3
             WHERE effdt =
                   (SELECT MIN(effdt) FROM PS_JOB T5 WHERE T5.emplid = T3.emplid)) T4,
           PS_EP_APPR B,
           PS_EP_APPR_ITEM C,
           PS_JOB D,
           PS_DEPT_TBL G,
           PS_BUSUNIT_HR_VW K
    WHERE A.EMPLID = B.EMPLID
       AND B.EP_APPRAISAL_ID = C.EP_APPRAISAL_ID
       AND A.EMPLID = D.EMPLID
       AND AA.EMPLID = D.SUPERVISOR_ID
       AND D.supervisor_id = AB.emplid
       AND FMGN.Emplid = AB.supervisor_id
       AND c.ep_appraisal_id = pnt.EP_APPRAISAL_ID
       AND T4.emplid = D.emplid
       AND D.deptid = G.Deptid
       AND D.business_unit = K.Business_unit
       AND D.effdt =
           (SELECT MAX(t1.effdt) FROM PS_JOB t1 WHERE t1.emplid = D.EMPLID)
       AND A.EMPLID IN
         (SELECT EMPLID                                                            ----------here comes subquery for finding logged in user
              FROM (SELECT B.EMPLID
                      FROM PS_NAMES A
                     INNER JOIN PS_JOB B ON B.EMPLID = A.EMPLID
                                        AND B.EMPLID = A.EMPLID
                                        AND B.EFFDT =
                                            (SELECT MAX(CA.EFFDT)
                                               FROM PS_JOB CA
                                              WHERE CA.EMPLID = B.EMPLID
                                                AND CA.EFFDT <= %CurrentDateIn)
                     WHERE A.NAME_TYPE = 'PRI'
                       AND A.EFFDT = (SELECT MAX(B.EFFDT)
                                        FROM PS_NAMES B
                                       WHERE B.EMPLID = A.EMPLID
                                         AND B.NAME_TYPE = A.NAME_TYPE
                                         AND B.EFFDT <= %CurrentDateIn)
                       AND B.SUPERVISOR_ID =
                           (SELECT T1.OPRID FROM PSOPRDEFN T1 WHERE %oprclause)
                        OR A.EMPLID =
                           (SELECT T2.OPRID FROM PSOPRDEFN T2 WHERE %oprclause)
                        OR B.SUPERVISOR_ID IN
                           (SELECT EMPLID
                              FROM PS_JOB
                             WHERE SUPERVISOR_ID =
                                   (SELECT T3.OPRID
                                      FROM PSOPRDEFN T3
                                     WHERE %oprclause))))
    ORDER BY A.emplid Regards!

  • Using a Report Filter without giving users access to "Design" mode

    I have a report in which I use the filter bar to provide my end users the ability to use a drop down menu to switch between different months worth of data.  However, I have been asked to disable the ability for users to access the Design mode.  I have been unable to come up with the right security settings to allow the report filter while disabling the Design mode.  Does anyone have any suggestions to this problem?
    BO XI 4.0 Patch 9
    Thanks very much for your help

    Hi,
    I'm familiar with your issue - described here BO4 navigate the available object in READING MODE in webi
    and also here: Hide/Disable DESIGN MODE on WebI (BI4)
    I've every reason to believe this is currently not possible. You may want to vote on the existing Enhancement Requests in Ideas Place, or create your own
    Regards,
    H

  • Report Prompt & User Response

    Hello All,
             Created a BOBJ Report from BEx query. I need to achieve the below tasks for the report.
             1. List of Values shows leading zeros on the Report Prompt, can we remove those leading zeros on the
                 report prompt ( BEx report doesnot show any leading zeros on the variable screen when running report)
             2. The Users need a set of selection values to be displayed on the report, For Ex: Material, Profit Center.
                 They want to see what they have selected at the prompt which was done using the User Reposne.
                  The question is they want to see the Key Value instead of the Text of the material, is this possible.
    Please look into and update with your valuable suggestions.
    Regards,
    Raj

    Hello Rohit,
            Thanks for your quick reply.
            I followed  your steps and created a variable for User Reposne and another variable with the where condition
            to populate the Material Key.
            But I am getting the following error as InList is looking for a list of values, not the User Reponse as the List Of Values.
            Error - Missing or bad operand in 'InList' expression at position 51. (WIS 10070)
           My Formula : =([L01 Material Key]) Where ([L01 Material] InList [vURMat])
           Where vURMat: =UserResponse("Material")
           L01 Material is the Material Desc.
           Please look into and let me know where I am going wrong.
    Regards,
    Raj

  • Reporting Services - Content Manager shows all reports for all domain users even without permissions

    I have installed
    reporting services 2008 in:  Site
    Settings option / Security only 3 users
    have added:
    BUILTIN \ Administrators                
    System Manager
    MYDOMAIN \ user1                         
    System Manager, System User
    MYDOMAIN \ user2                         
    System Manager, System User
    I have the same settings in the "start
    up" folder and inside the folder
    where are my reports, however if I authenticate
    any user with different domain
    to user1 and user2 can see all content
    of the report manager can even
    manage it.
    Help me, greetings
    Jenny

    however if I
    authenticate any user with
    different domain to user1 and user2 can see
    all content of the report manager can
    even manage it.
    Hello,
    Did you means that other domain user account (Other-Domain\user3) can access reports on the Report Manager without grant any permission? As per my understanding, it is not possible. SQL Server Reporting Services uses Windows Authentication
    defaultly to determine who can perform operations and access items on a report server.
    Based on your description, you grant the local Administrators group and two domain users with system-level role: System Administrator.  System-level role assignments grant access to global tasks and permissions that apply to a report
    server site, That's may cause the user can access and manage all contents on the Report Manager.
    If you want to set permissions for accessing conntents on Report Manager, you can just specify itme-level role assignments.For example, if you grant user with Browser role on a report, the user can view report and report properties, but cannot edit
    report properties.
    Reference:
    Lesson 1: Setting System-Level Permissions on a Report Server
    Lesson 2: Setting Item-Level Permissions on a Report Server
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Can we user Report Runtime without 9iAS?

    Can we user Report Runtime without 9iAS?
    How to install/configure the Report runtime?
    Thanks in advance,
    Trung

    This question should be posted on the reports discussion forum.
    Oracle9i Reports is a web version only. It relies on the report Server to manage queus of reports and distribute them as needed. The Oracl9i Reports Server is part of Oracle9i Application Server and you need to license Oracle9iAS to use it.
    Once you install Oracle9iAS you'll have the reports server configured for you.

  • Deploying a report to the end user without using Crystal Reports Server

    Hello,
      I'm using Crystal Reports Professional XI.
      I finished creating a report that contains several subreports.  Now it's time for me to deploy the report to the end user so that they can start running it.  The company that I'm doing this consulting work for does not have Crystal Reports Server setup so what is the best approach to deploying this report to the end user?  For now it would just be one user using the report but down the road there could be other people within his department that are running it as well.
        if you have any questions or need additional information to answer my posting just let me know.  Have a good day.
    Regards,
    Ting

    Hi Ting,
    I see now.... In older versions of CR like 8.5 there was a Deployment Wizard one could use to compile the report and runtime into an executable to run on an end users PC so that user could preview and refresh the reports.
    That ability stopped as of CR 8.5 or earlier, I don't recall exactly now.
    Yes, if they want to be able to run your report they will need to install a copy of Crystal Reports, then just send them your RPT file, they can then set Database location to their DB Source and then preview and refresh the report as required.
    Or as mentioned use a third party app to do the same or write your own. It's quite simple to do and likely one of our samples applications is all you need with a few basic changes, report source and DB log on info would need to be updated.
    As for licensing, the end user must purchase a copy of Crystal Reports to be able to use your application. Third Party app's would include the licensing mostly but check with them if you go that way.
    The convenient part is if the users want to write their own reports they can.
    And for your sake if you want to protect your reports the next version of CR has a read only RPT file format that all the user can do is preview and refresh the report. They can not edit it in anyway.
    Thanks again
    Don

  • Crystal Report Viewer Credential Prompt for Report with Dynamic Parameters

    The .NET Crystal Report Viewer is prompting for database credentials when launching a report containing dynamic parameters. This only occurs for reports created with SAP Crystal Reports 2011 designer. Reports created with Crystal Reports XI designer (where dynamic parameters were first introduced) work correctly.
    The credential prompt window contains the following fields:
    - Server Name: <server name> (disabled)
    - Database Name: <database name> (disabled)
    - User Name: <empty> (enabled)
    - Password: <empty> (enabled)
    - Use Single Signon Key: false (disabled)
    The values in the prompt window which are disabled are the database connection values used during the design of the report in the SAP Crystal Reports 2011 designer.
    Expected Result:
    - No prompt for database credentials.
    - Values read from the database should be populated in a drop down for the dynamic parameters.
    Environment:
    - Visual Studio 2010 (C#)
    - Windows 7 Enterprise
    - SAP Crystal Reports runtime engine for .NET Framework 4
    - SAP Crystal Reports, version for Visual Studio 2010
    - SAP Crystal Reports 2011
    The database connection is being set to use a DSN. It must be a DSN as the calling application is only aware of the DSN/Username/Password values. These values are being passed to the Crystal Report Viewer contained in a Windows form.
    The database connection for the report is being set as follows:
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection otherwise the connection does not work
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Supposed to set the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    The SetConnection method's signature is as follows:
       SetConnection(string server, string database, string name, string password)
    As you can see from the code snippet above I am setting the DSN name as the server parameter, blank for the database parameter (a database connection using DSN should only require DSN name/Username/Password) and the database username and password respectively.
    Is this a SAP bug?
    Is this the correct way of setting the database connection to use a DSN?
    Is there some other properties that need to be set somewhere else in the report through code?
    Any help would be greatly appreciated.

    Thanks for the pointer to the database connection code generator. After taking a look at the output from the tool I was able to finally get the dynamic parameters to load and populate properly without prompting for credentials. I needed to tweak the outputted code a bit to match my requirements of using a DSN only connection.
    Instead of updating the database connection properties contained within the Report.Database.Tables collection from the CrystalReports.Engine namespace, I changed it to replace the database connection properties in the Report.ReportClientDocument.DatabaseController.Database.Tables collection from the CrystalDecisions.ReportAppServer.DataDefModel namespace. For one reason or another, using the RAS namespace solved the problem.
    Below is the updated code with the change made:
    using RAPTable = CrystalDecisions.ReportAppServer.DataDefModel.Table;
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Sets the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    // The attributes for the QE_LogonProperties which is part of the main property bag
    PropertyBag innerPropertyBag = new PropertyBag();
    innerPropertyBag.Add("DSN", this.DSN);
    innerPropertyBag.Add("UserID", this.LoginName);
    innerPropertyBag.Add("Password", this.Password);
    innerPropertyBag.Add("UseDSNProperties", "true");
    // The attributes collection of the tables ConnectionInfo object
    PropertyBag mainPropertyBag = new PropertyBag();
    mainPropertyBag.Add("Database DLL", "crdb_ado.dll");
    mainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
    mainPropertyBag.Add("QE_LogonProperties", innerPropertyBag);
    // Pass the database properties to a connection info object
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.Attributes = mainPropertyBag;
    connectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    connectionInfo.UserName = this.LoginName;
    connectionInfo.Password = this.Password;
    // Replace the database connection properties of each table in the report
    foreach (RAPTable oldTable in this.report.ReportClientDocument.DatabaseController.Database.Tables)
        RAPTable table = new RAPTable();
        table.ConnectionInfo = connectionInfo;
        table.Name = oldTable.Name;
        table.QualifiedName = oldTable.QualifiedName;
        table.Alias = oldTable.Alias;
        this.report.ReportClientDocument.DatabaseController.SetTableLocation(oldTable, table);
    this.report.VerifyDatabase();
    Thanks again Ludek for the help.

  • Report does not prompt for parameters when SeparatePages=False

    Hi all. We are using CR2008 Basic w/SP1 along with VS2008. Within our application, reports pull up fine and prompt for parameters using the CrystalReportViewer against the web service. SeparatePages is set to True. We want to change SeparatePages to False, but when I do that any report that should prompt for parameters is not.
    The reports were created in CR 8.5. We have upgraded them to CR2008 (open, refresh, save) which has greatly increased performance. With some further testing, I've discovered that if I take a report that doesn't currently have any parameters and add one via VS2008 report designer, it WILL prompt for the parameter when I run it in our application with SeparatePages=False.
    So I'm leaning that the problem has to do with the reports originally being created in 8.5. I've tried modifying an existing report with parameters, deleting parameters and re-adding, but I still can't get these to prompt for parameters with SeparatePages=False.
    Again, these same reports prompt for parms and work fine as long as SeparatePages=True.  I'm hoping someone might be able to shed some light on this. There are over 400 reports so re-creating them from scratch under CR2008 will be a painful option
    If I need to provide any additional information just let me know. Thank you!
    Sheila

    We are still working to resolve this issue. Testing has shown that for reports that don't return a lot of data, the prompt for parameters will display. But for larger reports, we just see the hour glass and the parameter prompt never displays. It's almost like the reports are trying to return the full dataset without any paramters being passed BEFORE it will prompt for parameters. This would explain why smaller reports will prompt and larger reports never will (?). Not sure that is what is happening.  Again, with SeparatePages=True we are immediately given the parameter prompt. With SeparatePages=False we run into the issue of no prompts.
    Here's the code behind if it help:
    ReportDocument report = new ReportDocument();
    try
        String rptFileName = @"App_Data\Reports\" + Request.QueryString.GetValues(0).GetValue(0).ToString();
        log.writeLog("Loading Report: " + rptFileName);
        String rptFile = Server.MapPath(rptFileName);
        report.Load(rptFile);
        report.Refresh();
        ConnectionInfo crConnectionInfo = new ConnectionInfo();
        log.writeDebugLog("ServerName : " + rProperties.ODBCSource);
        crConnectionInfo.ServerName = rProperties.ODBCSource;
        log.writeDebugLog("DatabaseName : " + rProperties.ODBCSource);
        crConnectionInfo.DatabaseName = rProperties.ODBCSource;
        log.writeDebugLog("UserID : " + rProperties.ODBCUser);
        crConnectionInfo.UserID = rProperties.ODBCUser;
        log.writeDebugLog("Password : " + rProperties.ODBCPassword);
        crConnectionInfo.Password = rProperties.ODBCPassword;
        foreach (CrystalDecisions.CrystalReports.Engine.Table table in report.Database.Tables)
            TableLogOnInfo crTableLogOnInfo = new TableLogOnInfo();
            crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
            table.ApplyLogOnInfo(crTableLogOnInfo);
    catch (Exception err)
        log.writeLog("Error Loading Report: " + err.ToString());
        this.lblError.Text = err.ToString();
        this.ErrorTable.Visible = true;
        this.ReportTable.Visible = false;
        return;
    CrystalReportViewer1.HasCrystalLogo = false;
    CrystalReportViewer1.ReportSource = report; // _serverFileReport;

  • SAP BO 4.1 Webi report sample with prompts to try Restful api

    I was not able to find, in the report demo samples available in the SAP BO 4.1 installation, a Webi report with prompts.
    I found many Webi reports samples but all are without prompts.
    I need at least one Webi report sample with prompts to try the Restful API http://localhost:6405/biprws/raylight/v1/documents/7090/parameters and http://localhost:6405/biprws/raylight/v1/documents/7090/schedules with parameters body.
    Where can I found such webi sample?
    Thanks,
    Riccardo

    As you have BI 4.1 installed, you could design a sample webi report using Webi Rich Client tool.
    Open Webi rich client, select the sample eFashion universe drag few objects in the query and a filter. Set the filter as a prompt and save the report to Enterprise.
    Now you could now use this sample report for your handson on REST SDK.
    -Bhushan

  • To create a Crystal Report which will prompt for a value and if nothing is entered select the alternative value from the database record.

    Hi Experts,
    I am working on a report in Crystal (2008) which will prompt user to input a value, but if nothing is entered then it will select relevant database value.
    I created a string parameter prompt called "{?Pack_Qty_Overide}" and used the following formula.
    IF {?Pack_Qty_Overide} = ""
    THEN {OITM.SalPackUn}
    ELSE {?Pack_Qty_Overide}
    However, when I check the formula in editor, it says that there should be a number at the end of "Else" clause.
    What am I doing wrong?

    Hi Janos,
    OITM.SalPackUn is Numeric(19.6). When I used parameter input type as number, my formula returned error that "A number is required here" at the "if .... " statement.
    So I used the formula you provided and it worked, such that when I input a quantity in parameter prompt it would display that, but if no override value given, the field remains blank - i.e. it does not display the value stored in OITM.SalPackUn.
    What am I doing wrong?
    Thanks,
    YP

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

  • Have a company based itunes account, trying to share itunes on bank owned devices. can't get all devices to keep our shared password on them without requesting user to enter password (which i am not giving them)

    i am an IT manager for a bank.  we have several company owned iphones. WE have also implemented a mobile device management system to manage our iphones. 
    We setup acompany based itunes account, trying to share itunes on bank owned devices.  This way i can add bank approved apps to the devices through our itunes account and push out to the iphones, and no one can download any other non bank approved apps.
    it has been working ok. but recently i had one user who came in.  He went to enter in his itunes account on the phone and didn't work. So then came back and my staff and myself have (as much as we can see) removed his email account itunes login from all sections in settings. and entered in our itunes account information, but when you go to the app store, and hit upgrade, it still shows his email account for itunes.  I feel like i can't get all devices to keep our shared password on them without requesting user to enter password (which i am not giving them)
    How can i troubleshoot his device. i tried changing password 5 times today, rebooted device, and no change.
    Jenn McGlynn

    i have an MDM application, and i push out the apps i want them to have with our IT apple id account. for some reason when two approved apps needed updating last week, they prompted him for our password. (which i told him to bring phone in and i would enter password).
    but somehow he went to try to enter his personal to make it work (don't know why)
    somewhere it's keeping his personal email. i went into itunes/apps and our apple id is in there.
    there is nothing in icloud b/c we do not allow icloud, so that's clear.

  • How to print pdf file in SQL Server Reporting services report using command prompt?

    Is there a way to automatically print a SQL Server Reporting services report on command prompt? For eg: We can save a pdf file using rs.exe utility. I want to print a pdf using rs.exe utility. Is it possible? I don't want to install any 3rd party software.

    Thanks Simon for replying to my question.
    In oracle form, there is oracle command to print the report from command prompt with the help of rwrun.exe
    e.g: rwrun.exe   REPORT="D:\Test\REP_25\MLA.REP" DESNAME="testprinter" DESTYPE="PRINTER" P_FORMNAME="MLA.FMX" P_SPRACHE="E" P_SPRACHE_NR2="1" P_WHERE_BEDINGUNG="order by land_nr" USERID="test/test.world" PSV_NAME="PSV_DEMO" PSV_JOB_ID="PS$9583" RECURSIVE_LOAD="NO"
    BATCH="YES" NONBLOCKSQL="NO" ARRAYSIZE="1" PARAMFORM="NO" ERRFILE="c:\temp\psv16.tmp"<
    and to save the report we just need to change DESNAME="c:\temp\OC_100001349.pdf" DESTYPE="FILE" in above command instead of DESNAME="testprinter" DESTYPE="PRINTER".
    DESNAME and DESTYPE are the input parameters of the respective report.
    In SSRS, we can run the file from the command prompt and save it.
    rs -i "C:\Users\pujarswa\Documents\reports\new\LoadReport.rss" -s ww2004760:80/ReportServer_MSSQL -v fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"
    -v reportPath="/TipsReport/LoadListTabular" -t -v format="PDF" -v LandNr=4 -u ap\swati -p test@# -e Exec2005
    But we cannot use same command for printing as you said we need to create another script for printing files.
    I have gone through the links but I dont want to use Adobe Acrobat Reader exe for printing because client it may not have Adobe Acrobat Reader on their machine.
    Also I want to pass a input parameter as type="Printer" to my report which will print directly for me and same I can acheive in command prompt passing type="Printer" fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"

  • Use a delivers agent on a report with "Is Prompted" column, 11g

    Hi all,
    I have a report with is prompted filter on a column. And the report are working fine.
    But now the customer have asked me to set up a deliver agent on the report. And when the agent is running the report it is not working.
    The column that is set to "is prompted" has a expression in business layer and in that expression we are using a session variable. If I changes "is prompted" to a static filter or no filter the agent works fine. I'm getting this error when the agent tries to run the report:
    [nQSError: 77006] Oracle BI Presentation Server Error: A fatal error occurred while processing the request. The server responded with: Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
    [nQSError: 43113] Message returned from OBIS.
    [nQSError: 23006] The session variable, NQ_SESSION.access_voc, has no value definition. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Espor voc fields"."Field name" FROM "Esporingdata"')}
    SQL Issued: SELECT "Espor voc fields"."Field name" FROM "Esporingdata"
    Error Codes: AGEGTYVF
    AgentID: /users/weblogic/Linus_test_agent
    ...Trying main Agent loop again.... Sleeping for 6 seconds.[nQSError: 77006] Oracle BI Presentation Server Error: A fatal error occurred while processing the request. The server responded with: Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
    [nQSError: 43113] Message returned from OBIS.
    [nQSError: 23006] The session variable, NQ_SESSION.access_voc, has no value definition. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Espor voc fields"."Field name" FROM "Esporingdata"')}
    SQL Issued: SELECT "Espor voc fields"."Field name" FROM "Esporingdata"
    Error Codes: AGEGTYVF
    AgentID: /users/weblogic/Linus_test_agent
    ...Trying main Agent loop again.... Sleeping for 8 seconds.[nQSError: 77006] Oracle BI Presentation Server Error: A fatal error occurred while processing the request. The server responded with: Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
    [nQSError: 43113] Message returned from OBIS.
    [nQSError: 23006] The session variable, NQ_SESSION.access_voc, has no value definition. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Espor voc fields"."Field name" FROM "Esporingdata"')}
    SQL Issued: SELECT "Espor voc fields"."Field name" FROM "Esporingdata"
    Any Help Much Appreciated
    Linus

    Hi Linus,
    Where you able to solve this issue or do you have additional findings to your issue? I'm facing a similar problem: a session variable has no value defined when running from the agent.
    Please let me know,
    Thanks,
    Santiago

Maybe you are looking for