开发者

SQL reporting services datasource not visible in designer. Why? and How do I fix it?

开发者 https://www.devze.com 2023-02-13 11:07 出处:网络
So Im maintaining some reports in a VS2005 .NET project. The reports use object classes from a business layer as datasets but they arent listen in the menu in the report designer. I have no clue why n

So Im maintaining some reports in a VS2005 .NET project. The reports use object classes from a business layer as datasets but they arent listen in the menu in the report designer. I have no clue why not but it makes dealing with them a pain. To add or manipulate the datasets I am forced to use notepad to edit the nodes to add fields and whatnot. We are using that microsoft report viewer tool instead of a reports server (not that that has anything to do with it). But anyway, Why cant I see the datasets in the designer tool. Im guessing maybe the person who initialy developed the reports might have used a newer version of visual studio and then just added them to the TFS project. I get the benefits of business layer objects and whatn开发者_JAVA百科ot in the appcode but im ready to start just referencing the DB Procs directly from the reports and chop the current datasouces out of the report code. BUT... finding a way to at least view them from within vs2005 would be awesome for me actually meeting some of these deadlines.

Thoughts?


That has happened to me when a data-source named/referenced in the datasets doesn't exist. (I did a find and replace in the code and I forgot that the text was also included in the name of my primary data-source for the report, so it changed the name referenced in all of those datasets.... It didn't change the name of the actual data-source because I hadn't highlighted it in my find/replace selection)....

<DataSet Name="Facility">
  <Fields>
    <Field Name="facility_id">
      <DataField>Facility_ID</DataField>
      <rd:TypeName>System.Guid</rd:TypeName>
    </Field>
    <Field Name="facName">
      <DataField>facName</DataField>
      <rd:TypeName>System.String</rd:TypeName>
    </Field>
  </Fields>
  <Query>
    <DataSourceName>Database</DataSourceName>
    <CommandText>select distinct name facName, Facility_ID<br>from Location<br>where<br>Facility_ID = Location.FacilityId and<br>facility_ID = upper(@fac)<br></CommandText>
    <QueryParameters>
      <QueryParameter Name="@fac">
        <Value>=Parameters!fac.Value</Value>
        <rd:UserDefined>true</rd:UserDefined>
      </QueryParameter>
    </QueryParameters>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
  </Query>
</DataSet>

<DataSourceName>Database</DataSourceName>

"Database" needs to be a data-source that actually exists, meaning... you see it in design view? If this doesn't help please give some more details.

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消