Crystal Report为所有用户显示相同的报告 [英] Crystal Report show same report for all users

查看:92
本文介绍了Crystal Report为所有用户显示相同的报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这几个星期了。当用户登录网站时,他们会在会话中开始。用户填写Web表单并将数据提交到数据库中。用户可以单击打印按钮并打印出他们刚刚输入的数据的报告。此问题是,当用户单击打印按钮时,它会弹出报告的打印预览,但不是报告中的当前用户数据。我使用SQL数据库在CR 2013中编写了报告。然后我将它添加到Web项目中。向crystalreportviewer添加了新的Web表单,crystalreportviewer和报告。我该如何解决这个问题?我只想用当前登录数据的用户打印报告。



这是Web表单上包含Crystalreportviewer的代码。



I have been at this for weeks. When a user logs into the website they start off in a session. The user fills out the web form and submits the data into the database. The user can click on the print button and print out a report of the data they just entered. This issue is that when the user clicks the print button it pops up a print preview of the report but it is not the current users data on the report. I made the report in CR 2013 using a SQL database. Then I added it to the web project. Added a new web form, crystalreportviewer and the report to the crystalreportviewer. How can I fix this issue? I just want to print the report with the current user that is logged in data.

This is the code that is on the web form that has the Crystalreportviewer on it.

using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using CrystalDecisions.Web;
using System.Web.UI.WebControls.WebParts;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Xml.Linq;
using System.Web.SessionState;


namespace SACSCOCLogin1._1
{
    public partial class ReportFormA : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CrystalReportViewer1.Visible = true;
            TextBoxINST_ID.Text = Session["inst_id"].ToString();
        }
        
    }
}

推荐答案

我们无法提供您的描述。请发布您的代码,报告的数据来源等。您提供的详细信息将为我们提供更好的帮助。
We cannot help from just your description. Please post your code, the data source for the report, etc. The more details you provide the better help we can give.


这篇关于Crystal Report为所有用户显示相同的报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆