小编Eri*_*icG的帖子

C#:类型'Microsoft.Reporting.WebForms.ReportViewer'存在于ReportingServicesWebUserInterface.dll和Microsoft.ReportViewer.WebForms.dll中

搜索了很多类似的帖子,解决方法,我决定自己发帖子.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0433: 
The type
    'Microsoft.Reporting.WebForms.ReportViewer' 
exists in both 
    'c:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\reportmanager\Bin\ReportingServicesWebUserInterface.dll'
and
    'c:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'
Run Code Online (Sandbox Code Playgroud)


更新:

大多数similair帖子的问题是他们的2个冲突的DLL有8.0.0.0和9.0.0.0版本左右.或者它们位于TEMPORARY文件夹中.我不认为我的问题可以通过此类帖子类似地解决.

在我们的ReportServer上有一个Report.aspx,它呈现一个报告.我想用我自己的文件替换这个文件,修改页面布局,如下所示:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report.aspx.cs" Inherits="WebApplication._Default" %>

<%@ Register 
    Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms"
    TagPrefix="rsweb" %>

<!DOCTYPE>
<html>
    <head runat="server"></head>
    <body>
        <div>
            <form id="reportform" runat="server">
                <div>
                    <rsweb:ReportViewer
                        ID='ReportViewerRoot'
                        runat='server' …
Run Code Online (Sandbox Code Playgroud)

asp.net reportviewer reporting-services

11
推荐指数
2
解决办法
8万
查看次数

在表格中显示多对多关系的额外字段

我一直在寻找,但没有找到任何解决方案来做以下事情.

我试图显示一个包含让我们说用户列表的表.显示来自用户的字段并不是什么大问题,但对于关联字段来说它更复杂.假设我有以下表格:User,Post和UserPosts,在UserPosts中我们有一个标志main来指示给定帖子是否是用户的主要位置.

在我的数据表中,我必须显示用户的信息,它表示用户表中的字段+他/她的主要帖子.

到目前为止,我有这样的事情:

<table> 
    <thead> 
    <tr> 
        <th>name</th> 
        <th>FrstName</th>
        <th>Age</th> 
        <th>Main position</th>
        <th>Action</th> 
    </tr> 
        <tbody> 
           <c:forEach items="${listUsers}" var="user" varStatus="status">
            <tr>
                <td><c:out value="${user.name}" /></td> 
                <td><c:out value="${user.firstName}" /></td>
                <td><c:out value="${user.age}" /></td> 
                <td><c:out value="Position here" /></td> 
                <td>
                Delete
                <a href="/myAppli/user/${user.idUser}">Update</a>
                </td> 
            </tr> 
            </c:forEach>
        </tbody> 
</thead> 
Run Code Online (Sandbox Code Playgroud)

我认为对于位置我将不得不从给定列中给定用户的数据库主位置检索,但是如何设置此值(javascript,ajax?)

我是否以错误的方式思考,我应该使用关联类.我的意思是,检索main field = true的所有UserPosts?然后迭代userPosts而不是用户,在这种情况下,我会有这样的事情:

<c:forEach items="${listUserPosts}" var="userPost" varStatus="status">
        <tr>
            <td><c:out value="${userPost.user.name}" /></td> 
            <td><c:out value="${userPost.user.firstName}" /></td>
            <td><c:out value="${userPost.user.age}" /></td> 
            <td><c:out value="${userPost.post.postName}" /></td> 
            <td>
            Delete
            <a href="/myAppli/user/${userPost.user.idUser}">Update</a>
            </td> 
        </tr> 
</c:forEach>
Run Code Online (Sandbox Code Playgroud)

这对我来说似乎很奇怪,也许我错了.

javascript datatable jsp many-to-many jstl

5
推荐指数
1
解决办法
279
查看次数