Showing posts with label collection. Show all posts
Showing posts with label collection. Show all posts

Friday, February 24, 2012

Adding Global Parameters

Is there a way to access global parameters in Reporting Services Reports?..currently all we can usee is the Globals collection...is there a way to add keys to global collection?
can we write something in web.config ( as ReportServer is also a web application) and use the ConfigurationManager class?. The ConfigurationManager class did not work for me when I used it in the expression editor as the editor did not recognise it.

Any help is appreciated (or pointers for that matter).

Thanks.

Hello, have you found any solution yet? I'd like to use shared parameter of whole .net solution or project too. I could imagine to write assembly that expose a constant, but I wish it would exist an easier way. Jirka Nouza

Adding Global Parameters

Is there a way to access global parameters in Reporting Services Reports?..currently all we can usee is the Globals collection...is there a way to add keys to global collection?
can we write something in web.config ( as ReportServer is also a web application) and use the ConfigurationManager class?. The ConfigurationManager class did not work for me when I used it in the expression editor as the editor did not recognise it.

Any help is appreciated (or pointers for that matter).

Thanks.

Hello, have you found any solution yet? I'd like to use shared parameter of whole .net solution or project too. I could imagine to write assembly that expose a constant, but I wish it would exist an easier way. Jirka Nouza

Thursday, February 9, 2012

Adding a XML schema to XML schema collection

I used SSEUtil to add a schema to my database but I am having problems.

Used these steps:
SSEUtil -c
> USE "c:\Rich.mdf"
> GO

>!RUN Resume.SQL
//indicates success
>SELECT * FROM SYS.XML_SCHEMA_COLLECTIONS
>GO
//schema not shown in list

> USE master
>GO
>SELECT * FROM SYS.XML_SCHEMA_COLLECTIONS
>GO
//schema is shown in the query

It appears that the schema is not added to the desired database, so when I try to use the schema in Visual Studio, the schema does not appear when I connect to the Rich.mdf database. Any ideas on what I am doing wrong or why this might be happening?

Thanks

Kevin

Really strange. Maybe there is some statement in the Resume.SQL that switch database to master when creating the schema?

|||Shouldn't, this is the script file:

CREATE XML SCHEMA COLLECTION ResumeXSD AS
N'<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" >
<xs:element name="Name" type="xs:string"></xs:element>
<xs:element name="Objective" type="xs:string"></xs:element>
<xs:element name="Address">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="Street" type="xs:string"/>
<xs:element name="City" type="xs:string"/>
<xs:element name="StateProv" type="xs:string" />
<xs:element name="Country" type="xs:string" />
<xs:element name="PostCode" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="WorkExperience">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="ExpText" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Reference">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="RefText" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>'
GO|||Well,

I accomplished my task of adding an XML Schema Collection. I logged into SSMSE and attached the database, then did a USE on the database, pasted SQL file into a new query and it worked.

I did notice after I got his working, that the book instructed me to do this:
CREATE XML SCHEMA COLLECTION ResumeXSD AS <snipped\
but in the sample it uses dbo:
CREATE XML SCHEMA COLLECTION dbo.ResumeXSD AS <snipped\
Maybe I'll try that later and see if it works.

-Kevin