Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Thursday, March 29, 2012

Distributed query & OLE DB provider

Hi,

I hope I'm in correct forum..

I'm working on simple OLE DB provider that should be usable in SQL server as a linked server. The provider should provide some support for SQL (certain SELECTs for now) and therefore I'd like the SQL server to delegate portions of query processing to the provider instead of fetching all rows and doing SELECT on its own.

Alas, I'm no OLE DB expert and my provider apparently doesn't implement enough things to actually make SQL server pass the query to it. My provider's session currently implements mandatory interfaces + couple of others (IDBCreateCommand, IDBSchemaRowset) and via provider properties, I 'claim' to have full support for SQL92. I'm testing the provider with SQL Server 2005 ('Express edition').

I'd like to know what am I missing in the implementation, or whether/how can I find out what makes SQL server decide between fetching full rowset and creating a command to let rthe query run in provider.

Thanks,

L.

In general, if you use 4-part name query, the processing is done at the local server. That means the remote data is pulled to the local server before work is done. However, if openquery/openrowset/opendatasource() is used the remote processing is done on the remote server. This is what we often call as pass-through query.

If you're creating a custom oledb provider, what would be more important is the distributed transaction implementation. I suggest you check msdn on this.

|||

I just begun reading on the transactions yesterday evening, so I certainly shall dig into it bit deeper as you suggest, thanks Smile.

Regarding 4-part name query, you wrote 'in general'. Is the processing 'always' done locally, or is there a way to make even 4-part name queries run remotely?

|||

If you have a remote filter and your provider is delegateable (see http://msdn2.microsoft.com/en-us/library/ms180972.aspx) only the filtered rows are returned.

e.g.

Code Snippet

select a.name,b.name
from master..sysdatabases a join remotesrv.master.dbo.sysdatabases b on a.status=b.status
where b.name like 'D%'

What going on here is the local engine delegates the following work to the remote server

Code Snippet

select name from master.dbo.sysdatabases

where name like 'D%'

instead of asking the remote server to return the entire table then do join and filter locally.

Note that the join is still done locally!

|||

Well, according to description available at the link, my provider 'should be' delegateable as it claims to support SQL 92 and supports the command. I suppose there's nothing like a tool to tell me 'yes' or 'no, you fail here and here to be SQL command provider'..?

However, I guess I might have a problem with collation rules as I haven't cared about them at all. I'll check it later today.

Thanks for help!

Sunday, March 25, 2012

DISTINCT query issue

I'm familiar with MySQL and recently started working with MSSQL.
I have a general understanding of how the DISTINCT command works, but would like to expand on that a bit.

I need to do a DISTINCT query on a record's 'name' column, but i need all of the values for each of those returned records. So, I need the query to only apply the DISTINCT command to the 'name' column, not the other columns of the received records.

Can someone explain a bit how to word this

Many thanks in advance.

EDIT: Upon reflection, I realize now that this request is counter to the way DISTINCT works. D'oh. Move along, nothing to see here. :(

Hi,

As you have wrote at the end of your message, you can not get such a list.

But if you want to get records of having same specific column value, you can run a select and order by over that column also can add a criteria to filter returned data.

DISTINCT not working

I'm using the last version of JDBC driver, and the following query is
returning duplicate values:
SELECT DISTINCT COMPANY_ID C1 FROM COMPANY_WORKERS
By if i make de following query, it works:
SELECT A.C1 FROM (SELECT DISTINCT COMPANY_ID C1 FROM COMPANY_WORKERS ) A
Both queries work ok in the SQL Analyzer, but in the code only the second
one works as espected.
Thanks
Gon?alo
Gonalo,
I ran a quick test with the MS driver using SELECT DISTINCT and it worked.
Can you post the code that you are using? Perhaps there is something else
that is happening.
Thanks.
SuePurkis
DataDirect Technologies
"Gonalo" <Gonalo@.discussions.microsoft.com> wrote in message
news:B3FCD484-53E7-42E3-AD22-26236C9F3927@.microsoft.com...
> I'm using the last version of JDBC driver, and the following query is
> returning duplicate values:
> SELECT DISTINCT COMPANY_ID C1 FROM COMPANY_WORKERS
> By if i make de following query, it works:
> SELECT A.C1 FROM (SELECT DISTINCT COMPANY_ID C1 FROM COMPANY_WORKERS ) A
> Both queries work ok in the SQL Analyzer, but in the code only the second
> one works as espected.
> Thanks
> Gonalo
sql

Thursday, March 22, 2012

DISTINCT doesnt seem to be working

Hi all,

I am using SQLEXPRESS 2005 and can't figure out why my SQL query is not working.

Select DISTINCT ads.clientid, ads.ad, ads.adid, ads.cost, ads.description, ads.bold, ads.info, ads.contact, ads.coupon, ads.logo, ads.map, ads.webpage, ads.weburl, tclients.clientname, tclients.clientphone, tclients.addNumber, tclients.addStreet, tclients.addsuite, tclients.addcity, tclients.addstate, tclients.addzipfrom tclients, adswhere tclients.clientid=ads.clientidAND AdActive=1ORDER BY COSTDESC

I expect only one row to be returned for each ads.clientid. However, every single record that matches the query is being returned, which results in multiple records with the same clientid.

This happens if it isads.clientid ortclients.clientid.

Martin

DISTINCT returns unique rows based on all columns in the query, not just the first column (clientid) that you've specified.|||

Ah - I'm glad it it working as intended and I am not going mad...

How would I go about getting what I wanted then? Just one clientid.

|||

Can't answer that.

You said what you wanted.

You showed the query you have and the columns that you want.

The two don't mix, or the distinct would have worked anyhow. You obviously have multiple records with the same clientid, and differing data. WHICH of the differing data would you like when a clientid has multiple?

Assuming your fingers have names (index,middle,ring,pinky,thumb), and your hands have names (left, right).

Please tell me the length of your finger on each hand. And I only want one 2 entries, one for each hand. And if you are left scratching your head, it's because the question doesn't match the data, and you can't answer it. If I said, tell me the length of the longest finger on each hand, NOW you can answer, or I could say tell me the length of your index finger on each hand, etc.

|||

Thanks for that post - it helped me realize what I am doing wrong in my query.

I assumed because I was ordering by COST that it would take the first record for each clientid. In your example, it would order all my fingers by length, then take the longest one from each hand.

Since I know this is not the case, I know have to figure out how to re-write the query.

|||

Motley,

This SEEMS to work, but I'm not a SQL expert, so I can't be sure it will in real data. Does it look good to you? The bolded part is what I added.

Select DISTINCT ads.clientid, ads.ad, ads.adid, ads.cost, ads.description, ads.bold, ads.info, ads.contact, ads.coupon, ads.logo, ads.map, ads.webpage, ads.weburl, tclients.clientname, tclients.clientphone, tclients.addNumber, tclients.addStreet, tclients.addsuite, tclients.addcity, tclients.addstate, tclients.addzipfrom tclients, adswhere tclients.clientid=ads.clientidAND AdActive=1AND costin (select max(ads.cost)from adsgroup by clientid)ORDER BY COSTDESC

Wednesday, March 21, 2012

Displayong "Empty string" to a textbox on the report

Hi All!

I was checking the value of a field and if it is empty sending empty string to the textbox if not only the first few values and it is working but on the empty field something like "#Error" is being displayed.

here is the code:

=Iif(Fields!Lname.Value <>””, Fields!Lname.Value.ToString().Substring(0,10),"")

What I want to acheve is : If it is not zero to take the first 10 characters and if not to send an epmity string to the textbox.

Any help plz?

Thank you in advance!

In your expression, you are making the assumption that the string will be at least 10 characters. If it isn't 10 characters you will get an error. I am not sure what you are trying to accomplish but see the expression below. It will truncate the field if it is over 10 characters.

=Iif(Fields!Lname.Value.ToString().Length() > 10, Fields!Lname.Value.ToString().Substring(0,10), Fields!Lname.Value)

|||

here is the code:

=Iif(Fields!Lname.Value <>””, Fields!Lname.Value.ToString().Substring(0,10),"")

What I want to acheve is : If it is not zero to take the first 10 characters and if not to send an epmity string to the textbox

Thank you.The one that you send to me is not doing what i was looking for. Thank you very much.

|||

My expression does the exact same thing as yours except when there are less than 10 characters it will not attempt to truncate.

Input and output for my expression:

"" -> "" "foo" -> "foo" "bar" -> "bar" "SomeReallyLongString" -> "SomeReally"

Input and output for your expression

"" -> "" "foo" -> "#Error" "bar" -> "#Error" "SomeReallyLongString" -> "SomeReally"

|||

If I am getting it right, the problem I think is that when that field is empty or NULL, it returns an error:

So in your code actually, the first line for input and output would be:

"" --> #Error

I dunno how to resolve this in RS as I tried various things and they didn't work (like length = 0 etc.), only thing I can think of for now is to modify your query itself to return the substring instead of the field and then use this new field..

e,g,

select .....,..,.., substring(ISNULL(OldFieldName,''), 0, 10) as NewFieldName
from TableName

Ryan Ackley MSFT wrote:

My expression does the exact same thing as yours except when there are less than 10 characters it will not attempt to truncate.

Input and output for my expression:

"" -> "" "foo" -> "foo" "bar" -> "bar" "SomeReallyLongString" -> "SomeReally"

Input and output for your expression

"" -> "" "foo" -> "#Error" "bar" -> "#Error" "SomeReallyLongString" -> "SomeReally"

|||

Thank you very much. This is exactly what the problem that I am facing now let me try to see some other things and I will do as you suggest. Thank you.If you find anything new plz let me know.

Ephi

Monday, March 19, 2012

Displaying selected parameters in a report

Hi,

In the report I'm working on, I want to display a list of the parameters selected by the user, as in:

Selected Cars:
Toyota Camry
Ford Taurus
Chevy Corvette
Saturn Ion

Note that these are selected items from a multi-value parameter. How can I go about doing this with Reporting Services 2005? In ASP.NET, I'd just use the parameter array as the datasource for a repeater/datagrid/gridview. Could I do something similar with SSRS? I'd really like to use the format specified above, whether or not it is in a table; I really don't want to do the following:

Selected Cars: Toyota Camry, Ford Taurus, Chevy Corvette, Saturn Ion.

Thanks,
MarkOkay, I figured out how to do this using the following expression:

=Join(Parameters!parameter_name.Value, vbNewLine)

My question now is, can I use the parameter label instead of the value? Or, alternatively, is there a way to trim a character off the end of the value when displaying it? In my stored proc, I had to append a delimiter (a | in my case) to the value, but I don't want this to appear in the report.

Right now, it looks like:

Selected Cars:
Toyota Camry|
Ford Taurus|
Chevy Corvette|
Saturn Ion|

Thanks,
Mark|||

To show the Parameter label, use the .Label property instead of .Value:

Parameters!parameter_name.Label

For multi-value parameters, the Label property (like the Value property) will return an array of values so you will have to Join() them.

|||I tried that earlier and got an error, but I must have done something else wrong because I just tried it again and it works. Thanks!

displaying reports w/o having to login

Hey guys, I finally got my report working and connections working to my webhost. Only problem is when I navigate to my reportserver, it prompts me for a username and password that corresponds to the system login. After that I have people enter their credentials that are cross referenced with the db. However, I don't want to give out the system password, otherwise other people who know the report manager url can get in and mess around. How do I avoid having the report server prompt me for the system user/pass?

Thanks.

Set an ASP.NET web site with the ReportViewer control on one of the pages. Grant run report to the ASP.NET user and then any user who can run the web site, can run a given report.|||

If you are using the report viewer, you can impersonate a user. You need to set it in the web.config of the application. It falls under the System.Web section of the web.config and looks something like this:

<identity impersonate="true" userName="UserName" password="PassWord"/>

This way when someone accesses the web application they are impersonating the user and they are not promted. What I would do if possible is setup a seperate user then admin of course that has access to the report server though for security reasons. That user should just need to be able to access the report server, and any other credentials he may need to run your application. Just my thoughts...

Dapanther99

|||

Thing is I cannot add that to the web.config where the reportserver resides. Otherwise, If I add that to the web.config where my asp files are located wouldn't that interfere with my existing scripts such as login pages?

Also, when you guys say report viewer, are you referring to the reportserver that allows me to view my reports but not manage them? Or is reportviewer as seperate item?

|||

The report viewer is a control in ASP.NET 2.0. I resides under the data controls. In respect to the impersonated user, we have applications here that use impersonation without any issues. What you need to do is put it in the web.config of you application, not with the report server. If you have access to create additional users then you would create a user that has access to the report server. You will also need to impersonate this same user in the dataset the report uses. As well as make sure that he has DB access. The good thing about doing it this way is you create a trail in case you are using audit tables in your DB...

Dapanther99

|||

ah ok, so by your definition, I am not using the report viewer, I'm using the direct url to the report server given to me by my hosting company,

(e.g.http://sqlserver/reportserver)

So I need to create an asp.net page that utilizes report viewer to access the reports from the report server. Am I correct up to this point?

Also, I did a search on my hosting company's KB, and they suggest using the following script:

<%
dim objHTTP
set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
url = "http://sqlreport01.mysite4now.com/ReportServer/Pages/ReportViewer.aspx?%2mysite%2fmyreport&rs:Command=Render"
objHTTP.open "get", url, false, "username", "password"
objHTTP.send
response.write objHTTP.responsetext
%>

Is this something I can skip? and just proceed to look up articles regarding the report viewer? (I've tried using that script in an asp page and I got nothing, thats why im asking)

Thanks

|||

If you are writing it in .NET 2.0 I would go with the report viewer. You might want to check with the hosting company to make sure that it is installed on the servers because if I remember correctly we had to manually install it on our servers when we deployed our first reports using it...

Dapanther99

|||

Great, I got the report viewer to work, now to get passed the iis authentication. I tried impersonate, but it's not working. When I do just <identity impersonate="true" /> the script runs, but the moment I add username and password, i get a run time error. Also, the script that I wrote above, from what i'm getting at is, that script opens up that page and inputs the username and password but doesn't display the page so in a sense you're opening a session. Am I correct?

I'd like to implement that if I can't get this impersonate thing to work but when I add that to my asp.net page, i also get a run time error.

any ideas guys?

|||

Does the error display or do you have access to the error logs? Let me know what you are getting and I'll try to figure it out. It sounds like you may have the impersonate tag in the wrong place. Also, make sure you have the authentication mode set to forms. Let me know...

Dapanther99

|||

Ok I added the line that gives me the actual error. It's saying that my username or password is incorrect. Now I'd like to get the concept straight.

I have a sql report server.
I have an asp page with the report viewer on another server. In that same folder I have a web.config file that has

<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="forms" />
<identity impersonate="true" userName="myuser" password="mypw" />
</system.web>

</configuration
1) Isn't it suppose to be windows auth? since the popup is IIS auth. (not that changing it to windows worked)
2) I'm getting the impression that it's looking for a local username on that server and not forwarding the request over to the report server.
3) This folder in which I have my asp.net page does not have user authentication.
4) This server and the report server both have the same user name and pw.

any ideas?

Sunday, March 11, 2012

Displaying Parent / Child / Grandchild data

I am working on an ASP.NET site to display information about authors and books. I'm working on the Author page right now and I'm having trouble getting it to display the data I want.

I'm trying to do everything with declarative controls and as little code-behind as possible.

I have a datasource on the main page that selects the Author data and provides this to a FormView. Inside the FormView is another datasource that takes the AuthorID as a parameter and selects the list of books, which is provided to a DataList.

Inside the DataList I display some limited Book information. I also want to display some child items of the Book (grandchildren of the author), for example other authors who contributed to that book, or alternative titles. I have tried using datasources in each DataList row with a parameter set to the BookID, and it works just great, but the response time is just not acceptable. Each datasource of possible several dozen is making its own call to the database and it's just too slow.

If I use code I can grab all the data in one operation and use relations in the DataBinding event (I believe) to select the data I want, but this is a bit cumbersome and I expect will cause trouble if I want to eventually use an ObjectDataSource.

Incidentally, on a display-only page I use the XMLDataSource and it works great, but I need read-write access on the Edit page.

Is there a good way to do what I'm trying to do?

Thanks,

Graham

Here's an alternative:

Instead of putting the books in a datalist you could put them in a gridview. Handle the row selected event of the gridview and programatically bind only the 'grandchild' details specific to the selected book.

|||

That's probably what I'll end up doing, but I'm trying to avoid code as much as possible. In code it's pretty simple to avoid many trips to the database when fetching information, at the cost of some added complexity. I'm just looking to see if there's an equivalent way to do that declaratively.

It would be nice if you could bind to a datasource, specify a data member, and also throw in some selection criteria - filter it at the bound control, not at the datasource level. That's similar to what you can do with the XMLDataSource and XPathSelect.

|||

Yeah I see what you're saying.I've never managed to getsomething like that working entirely declaratively though with asp.netcontrols. Even so, if you just do the grandchild stuff programaticallyit should only be a couple of lines of code.

You could take a look at some third party grid controls made by ComponentArt, Infragistics, Telerik etc.

Wednesday, March 7, 2012

Displaying data using correct culture

I'm working on a report that displays datetime columns and no matter what I set as my currentculture the datetime columns always use the US format: mm/dd/yyyy.

On the report designer I see there's a "Language" property but I cannot find how to set this from the code.

Note that I'm not talking about localizing the report interface. I know there's adowloadable language pack for this.
What I need is the that the data is displayed using the correct formating for numbers and dates for the current active locale.

Any idea?

Yeah, that's Globalization (as you know)... are you returning a DateTime field in a GridView and supplying the DataFormatString yourself... or are you doing a CONVERT(VARCHAR, MyDate, 101) in SQL? (Because if SQL is the one formatting it, you're getting a string... not a DateTime)

Thanks,

|||

I'm using a ReportViewer in LocalMode and the stored proc that returns data does not format it in any way:

select
a.Date,...
from table a
where ...

Where a.Date is a datetime field.

|||

HI,vmasanas :

As localization is not a built-in feature for Reporting Services, people have tried a a variety of techniques for localizing reports. One technique is to use the LocID propertie to create a version of the RDL in each language. Another approach is to have a single report and create a custom assembly to load the strings for each label. Here is an relatively easy technique for providing localized reports using hidden parameters.

First, you will need to create a table to hold the translations. The following T-SQL will create the table and add a few labels for translating the Product Line Sales sample that is included with the product.

CREATE TABLE [dbo].[Translations](
[Label] [nvarchar](150) NOT NULL,
[Language] [nvarchar](10) NOT NULL,
[Translation] [nvarchar](150) NOT NULL
)
GO
INSERT [dbo].[Translations]
VALUES ('Top Stores','fr-fr','Les meilleurs magasins')
INSERT [dbo].[Translations]
VALUES ('Top Employees','fr-fr','Les meilleurs employés')
INSERT [dbo].[Translations]
VALUES ('Top Stores','en-US','Top Stores')
INSERT [dbo].[Translations]
VALUES ('Top Employees','en-US','Top Employees')
INSERT [dbo].[Translations]
VALUES ('Top Stores','de-DE','Oberseite Speicher')
INSERT [dbo].[Translations]
VALUES ('Top Employees','de-DE','Obere Angestellte')
GO

Now, create a query that will return the set of labels for a given language. Add a dataset named 'Labels' that has the following query:

SELECT Label, Language, Translation
FROM Translations
WHERE (Language = @.Language)

By default, a new report parameter will be created named Language. If you would like to automatically bind the translations to the user's language, you can delete this parameter and bind it to User!Language in the dataset properties dialog. However, for testing purposes it is easier to just type it in for preview.

Next, you will need to create a hidden, multi-valued parameter called 'Labels'. Set the Available Values to the Labels dataset, the Value field to 'Labels' and the Label field to 'Translation'. Set the default values to the same dataset and the Value field to 'Labels'. This is important as you don't have access to the available values from within the report, only the actual values. When the user runs the report, the parameter value will contain all of the labels.

Now, add a function to the report (from the code tab of the Report->Report Properties menu item)

Public Function GetLabel(P as Parameter, Label as String) as String
Dim i As Integer
For i = 0 to Ubound(P.Value)
If (P.Value(i) = Label) Then Return P.Label(i)
Next i
Return Label
End Function

This function will find the translated label within the supplied multi-valued parameter. If the label is not found, the passed in value is returned. This is important as you may have a user language for which you have not created the translations.

The only thing left is to change the static labels in your report to use this new function. For example, to translate the Top Employees label, use the function

=Code.GetLabel(Parameters!Labels,"Top Employees")

If i misunderstand you about your question, please feel free to correct me and i will try to help you with more information.

I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be

of assistance

|||

Rex,

thanks for you comments, but what I was asking for is slightly different. What I need is that special data types are formated accordingly to the current culture. For example if I get this data:

SELECT aDate, aNumber FROM ...

I'd expect that when the user is using a en-US locale the date is displayed as mm/dd/yyyy and the number "##,###.##". Otherwise, if current culture is es-ES I'd expect to see dd/mm/yyyy and "##.###,##" respectively.

Either I'm doing something wrong or I'm missing a point because this does not work for me. I have a language selector on the page and no matter what I use I always see the data formated as en-US. And, no, I don't do any formating, convertion or modification on these fields. They come right from the db.

|||

As for theReportingService 2005, it does support some localization
features, they include:

1)the localization of the built-in UI components, such as SSRS's
htmlviewer, report designer

2) some simple localization on the SSRS report's data

For 1), the SSRS has done the work for us already, for example, when we
visit the html report, the UI elements on the htmlviewer(button or other UI
element's text) will render the localized representation according to
client-side browser's user-language setting.

For 2), if we want to do some simple localization on the static data/text
displayed on our report, we can dynamically format them according to the
"User!Language" parameter in our report expression. Or you can even build
custom assembly that has custom code logic to generate localizaed text(from
net resource ) accordin to this parameter.

You can find all the localization support of SSRS 2005 in the BOL:

#International Considerations forReporting Services
http://msdn2.microsoft.com/en-us/library/ms156493.aspx


While leveraging User!Language certainly will work in terms of allowing you localize your reports, doing so is admittedly a pain in the tail – you essentially have to replace all your label text with expressions that call into code that you write to do "label localization" ala:

= MyNameSpace.MyConvertingClass.MyConverter("someLabelName", User!Language)

Your code takes the name of a label and the language to use, then convert the date or the symbol to be the the currect one and return it

|||

HI,vmasanas:

We are marking this issue as "Answered". If you have any new findings or concerns, please feel free to unmark the issue.
Thank you for your understanding!

|||

Rex,

thanks for your support but I think we are talking of different things here.

What I'm trying to get is that a datetime column displays it's data using a format accordingly to the current culture selected by the user at the time.

When I'm designing a report I see a property called "Language" when, if changed, displays data correctly. What I would need is access to this property at runtime so the report is configured dinamically depending on the user preferences.

I've not been able to figure where in the object hierarchy I can get access to this property.

|||

I had a similar problem and here is how to solve it:

CultureInfo ci;
// Format the current date and time in various ways.

// Display the thread current culture, which is used to format the values.
ci = Thread.CurrentThread.CurrentCulture;
ci = new CultureInfo("en-IE");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci; //I guess you did'nt set this one

Hanin

|||

I wish you were right but no :(

Protected Overrides Sub OnInit(ByVal eAs System.EventArgs)
' Set the current culture
Thread.CurrentThread.CurrentUICulture = PageCulture
Thread.CurrentThread.CurrentCulture = PageCulture
' Localize portalsettings
Services.Localization.Localization.LocalizePortalSettings()
MyBase.OnInit(e)
End Sub

I'm trying to use this inside aDotNetNuke module but seems there's something missing here since I've never had any problem with localization inside DNN.

Displaying data across the page rather than down

Hi All

I am currently working on a report where the data needs to be displayed across the width of the page rather than repeating as you go down the page. Is this possible using a table or would I need to go about it another way?

Thanks

Look at the Horizontal Tables example in Chris Hays' blog http://blogs.msdn.com/chrishays/archive/2004/07/23/HorizontalTables.aspx

Displaying AS hierarchy in ASP.Net

Hi,

I'm currently working on a project where we're building a custom UI , pretty soon, we're going to have to build in the ability to browse an AS hierarchy. We would like to use a traditional treeview control or similar. I know this is comig down the line so I'm trying to pre-empt any problems we might have by trying to sort them ahead of time before I go on vacation (which is tomorrow - yeay :) ).

Does anyone know of any technical resources/whitepapers/etc... that may help us in doing this? Any sample code? Any issues to be aware of

Any information would be greatly received.

Thanks

Jamie

Hello Jamie.

You want to use ADOMD.NET to access multidimensional data. You can download it from:

http://www.microsoft.com/downloads/details.aspx?FamilyID=790d631b-bff9-4f4a-b648-e9209e6ac8ad&DisplayLang=en

There is a very good sample app there, and you can see how they build treeviews to display dimensional information. OK, it is a windows forms app, but it shouldn't be too difficult to apply the same concepts to an ASP.NET 2.0 Treeview control.

Hope this help,

Santi

|||

It helps alot. Thank you Santi!

-Jamie

Displaying 'ALL' - Multivalue Parameter

Now that the Select All feature is working, I need to be able to display the
text ALL when the end user checks select all (in a textbox that is designed
to show values chosen for the parameter). Is this possible?
I am able to do this when I add an all value to the drop down selection, but
that gives you a value of ALL and a value of Select All. I am certain that
this will confuse the end user.
We need to be able to turn the Select All off.
Thanks!
--
blesrptdevOn Mar 8, 2:02 pm, blesrptdev <blesrpt...@.discussions.microsoft.com>
wrote:
> Now that the Select All feature is working, I need to be able to display the
> text ALL when the end user checks select all (in a textbox that is designed
> to show values chosen for the parameter). Is this possible?
> I am able to do this when I add an all value to the drop down selection, but
> that gives you a value of ALL and a value of Select All. I am certain that
> this will confuse the end user.
> We need to be able to turn the Select All off.
> Thanks!
> --
> blesrptdev
I don't believe that turning 'Select All' off is possible; however,
you can either take a count of the options selected by the user and
compare it to the total possible options in the query and return a
separate field to the report showing that 'Select All' was selected.
Or if you know that the total options will not exceed a certain
quantity, you could use something like the following:
=iif(Parameters!ParameterName.Count > 20, "Select All",
"SomeDefaultText")
Where 20, in this example, is the maximum number of options to select
in the drop-down list box. Sorry I could not be of more assistance.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Thanks Enrique! This creatively worked.
--
blesrptdev
"EMartinez" wrote:
> On Mar 8, 2:02 pm, blesrptdev <blesrpt...@.discussions.microsoft.com>
> wrote:
> > Now that the Select All feature is working, I need to be able to display the
> > text ALL when the end user checks select all (in a textbox that is designed
> > to show values chosen for the parameter). Is this possible?
> >
> > I am able to do this when I add an all value to the drop down selection, but
> > that gives you a value of ALL and a value of Select All. I am certain that
> > this will confuse the end user.
> >
> > We need to be able to turn the Select All off.
> >
> > Thanks!
> > --
> > blesrptdev
> I don't believe that turning 'Select All' off is possible; however,
> you can either take a count of the options selected by the user and
> compare it to the total possible options in the query and return a
> separate field to the report showing that 'Select All' was selected.
> Or if you know that the total options will not exceed a certain
> quantity, you could use something like the following:
> =iif(Parameters!ParameterName.Count > 20, "Select All",
> "SomeDefaultText")
> Where 20, in this example, is the maximum number of options to select
> in the drop-down list box. Sorry I could not be of more assistance.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>
>

Displaying ADO MDX query results in reports

I'm working on an application to display sales data using sql server
2000 reporting services.
The data is in an MS Analysis Services cube, so I'm using MDX queries
in the data set.
The queries all have a similar format of the form:
SELECT
{[Measures].Members} ON COLUMNS,
{ MyDimension.members} ON ROWS
FROM MyCube
where the items in the COLUMNS clause are allways the same and
MyDimension might be SalesBranch, ProductCategory, etc.
When Reporting services works out the fields for the returned data set
it appears to be flattening out the MyDimension structure and using the
dimension level names for field names.
eg
<Fields>
<Field Name="Manufacturer">
<DataField>[Manufacturer_Model].[Manu].[MEMBER_CAPTION]</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Measures_Oe_Id">
<DataField>[Measures].[Oe Id]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
<Field Name="Measures_Oe_Realval_A">
<DataField>[Measures].[Oe Realval A]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
</Fields>
In the report layout I can select these fields and display them as
expected.
However the drawback is that since dimension level names are encoded
into report field names I have to have a separate report for each
dimension I want to put on the ROWS. ie one .RDL file for SalesBranch,
one for ProductCategory etc.
If this was SQL it would not be a problem because in the SQL SELECT
statement the column names could be fixed using "SELECT colname AS
othercolname ", but, being new to MDX, I can't find how to do this.
Does anyone know how to achieve this in MDX / ADO MD ? ie how to give
an MDX column an alias
Thanks
SteveHi Steve. I'm not quite clear on what you're trying to do. If, for
example, you had StateCode, CountryCode on your rows, you'd want them both
to be in the same column? Can you be more specific? From your
explanation, I can't think of a business reason why I'd want to do this.
-T
"steve caa" <steve_caa@.hotmail.co.uk> wrote in message
news:1147778689.038349.64180@.j33g2000cwa.googlegroups.com...
> I'm working on an application to display sales data using sql server
> 2000 reporting services.
> The data is in an MS Analysis Services cube, so I'm using MDX queries
> in the data set.
> The queries all have a similar format of the form:
> SELECT
> {[Measures].Members} ON COLUMNS,
> { MyDimension.members} ON ROWS
> FROM MyCube
> where the items in the COLUMNS clause are allways the same and
> MyDimension might be SalesBranch, ProductCategory, etc.
> When Reporting services works out the fields for the returned data set
> it appears to be flattening out the MyDimension structure and using the
> dimension level names for field names.
> eg
> <Fields>
> <Field Name="Manufacturer">
> <DataField>[Manufacturer_Model].[Manu].[MEMBER_CAPTION]</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Measures_Oe_Id">
> <DataField>[Measures].[Oe Id]</DataField>
> <rd:TypeName>System.Object</rd:TypeName>
> </Field>
> <Field Name="Measures_Oe_Realval_A">
> <DataField>[Measures].[Oe Realval A]</DataField>
> <rd:TypeName>System.Object</rd:TypeName>
> </Field>
> </Fields>
> In the report layout I can select these fields and display them as
> expected.
> However the drawback is that since dimension level names are encoded
> into report field names I have to have a separate report for each
> dimension I want to put on the ROWS. ie one .RDL file for SalesBranch,
> one for ProductCategory etc.
> If this was SQL it would not be a problem because in the SQL SELECT
> statement the column names could be fixed using "SELECT colname AS
> othercolname ", but, being new to MDX, I can't find how to do this.
> Does anyone know how to achieve this in MDX / ADO MD ? ie how to give
> an MDX column an alias
> Thanks
> Steve
>|||Hi Tim
Thanks for the reply.
I'm really trying to be lazy and reuse the same RDL for a number of
different reports.
I'm generating the MDX query from parameters in a form that contains a
report viewer. The items selected to appear along columns will always
be the same but the dimension that appears on the rows will vary
depending on whether the user wants to see sales by branch or by
product. The depth of the dimension on the rows will allways be same ie
I'm only showing branch name, not branch name and region.
If the user selects performance by sales branch the MDX looks like
SELECT
{[Measures].Members} ON COLUMNS,
{ [Branch].members} ON ROWS
FROM MyCube
and the report displays the branch name in the first column and the
measures along the other columns
similarly if the user selects performance by product the MDX looks like
SELECT
{[Measures].Members} ON COLUMNS,
{ [Product].members} ON ROWS
FROM MyCube
and the report displays the product name in the leftmost column and the
measures along the other columns
Now, the reports are identical apart from the first column, so I
thought if there was a way to make the columns have defined names I
could reuse the same RDL for any number of reports.
In the reporting services designer, on the data tab, executing a query
fills the data grid and displays field names in the first row.
The field names appear to be based on the column or row names in the
MDX query eg when I select the performance by branch report, the column
in the data grid that displays the branch name is called
"[Branch].[Branch ID].[MEMBER CAPTION]", when I select the performance
by product report, the column in the data grid that displays the
product name is called "[Product].[Product ID].[MEMBER CAPTION]" .
In the designers layout tab these field names are linked to the cells
they are to be displayed in, but since the field names are different
for the different MDX queries I'm generating I need to have a different
RDL file for each query.
In SQL I'd be able to alias the columns so they had the same name eg
SELECT SalesBranch as FirstColumn, MeasureA, MeasureB From Sales
and
SELECT ProductName as FirstColumn, MeasureA, MeasureB From Sales.
So my question is :
is there a way for MDX to do what the SQL statements above are doing?
ie make the recordsets returned by ADO allways have predefined field
names.
Thanks
Steve|||Oh! Well in that case, create a custom set and use it in a dynamic query...
Build it first in the query builder to get the columns, then change the text
to this:
= "WITH SET [Branch] AS
'" & Parameters!TheBranchToShow.Value & ".ALLMEMBERS'
SELECT {[Measures].Members} ON COLUMNS,
{ [Branch] } ON ROWS
FROM MyCube"
HTH
"steve caa" <steve_caa@.hotmail.co.uk> wrote in message
news:1147871527.003112.157400@.38g2000cwa.googlegroups.com...
> Hi Tim
> Thanks for the reply.
> I'm really trying to be lazy and reuse the same RDL for a number of
> different reports.
> I'm generating the MDX query from parameters in a form that contains a
> report viewer. The items selected to appear along columns will always
> be the same but the dimension that appears on the rows will vary
> depending on whether the user wants to see sales by branch or by
> product. The depth of the dimension on the rows will allways be same ie
> I'm only showing branch name, not branch name and region.
> If the user selects performance by sales branch the MDX looks like
> SELECT
> {[Measures].Members} ON COLUMNS,
> { [Branch].members} ON ROWS
> FROM MyCube
> and the report displays the branch name in the first column and the
> measures along the other columns
> similarly if the user selects performance by product the MDX looks like
> SELECT
> {[Measures].Members} ON COLUMNS,
> { [Product].members} ON ROWS
> FROM MyCube
> and the report displays the product name in the leftmost column and the
> measures along the other columns
> Now, the reports are identical apart from the first column, so I
> thought if there was a way to make the columns have defined names I
> could reuse the same RDL for any number of reports.
> In the reporting services designer, on the data tab, executing a query
> fills the data grid and displays field names in the first row.
> The field names appear to be based on the column or row names in the
> MDX query eg when I select the performance by branch report, the column
> in the data grid that displays the branch name is called
> "[Branch].[Branch ID].[MEMBER CAPTION]", when I select the performance
> by product report, the column in the data grid that displays the
> product name is called "[Product].[Product ID].[MEMBER CAPTION]" .
> In the designers layout tab these field names are linked to the cells
> they are to be displayed in, but since the field names are different
> for the different MDX queries I'm generating I need to have a different
> RDL file for each query.
>
> In SQL I'd be able to alias the columns so they had the same name eg
> SELECT SalesBranch as FirstColumn, MeasureA, MeasureB From Sales
> and
> SELECT ProductName as FirstColumn, MeasureA, MeasureB From Sales.
> So my question is :
> is there a way for MDX to do what the SQL statements above are doing?
> ie make the recordsets returned by ADO allways have predefined field
> names.
> Thanks
> Steve
>|||Good idea.
This seems to work in the MDX Sample query tool, but in Reporting
Services designer it still mangles the structure of the underlying
dimension into the column headings, not the MDX SET name. I tried a
simple vb.NET app and it does the same so it's an ADO MDX issue, not
Reporting Services
Looks like I'll have to do it the long way.
Thanks
Steve|||The trick is to return the dimension names as measures, and then use the
measures in your report instead of the dimension names.
You start out with a usual query, and add Currentmember.Name,
currentmember.Level.Ordinal and Currentmember.UniqueName as measures.
with member [Measures].[MyMeasure] as '[Store].currentmember.name' member
[Measures].[MyMeasure2] as '[Store].currentmember.Level.Ordinal' member
[Measures].[MyMeasure3] as '[Store].currentmember.UniqueName'
Then add x number of columns, for measures that you want to reuse.
member [Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
[Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
[Measures].[MyMeasure6] as '[Measures].[Store Sales]'
Then select all the measures (both the dimension name ones, and the ones
based on the old measures)
I added a filter to mine, you don't need to do that.
The resulting MDX query looks like this:
with member [Measures].[MyMeasure] as '[Store].currentmember.name' member
[Measures].[MyMeasure2] as '[Store].currentmember.Level.Ordinal' member
[Measures].[MyMeasure3] as '[Store].currentmember.UniqueName' member
[Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
[Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
[Measures].[MyMeasure6] as '[Measures].[Store Sales]' select
{[Measures].[MyMeasure], [Measures].[MyMeasure2], [Measures].[MyMeasure3],
[Measures].[MyMeasure4], [Measures].[MyMeasure5], [Measures].[MyMeasure6]}
on columns, {filter([Store].members, [Measures].[Store Cost]> 25000) } on
rows from [Sales]
After you've generated all the fields, change it as usual to a parameterized
query:
="with member [Measures].[MyMeasure] as '[" & Parameters!Dimension.Value &
"].currentmember.name' member [Measures].[MyMeasure2] as '[" &
Parameters!Dimension.Value & "].currentmember.Level.Ordinal' member
[Measures].[MyMeasure3] as '[" & Parameters!Dimension.Value &
"].currentmember.UniqueName' member [Measures].[MyMeasure4] as
'[Measures].[Unit Sales]' member [Measures].[MyMeasure5] as
'[Measures].[Store Cost]' member [Measures].[MyMeasure6] as
'[Measures].[Store Sales]' select {[Measures].[MyMeasure],
[Measures].[MyMeasure2], [Measures].[MyMeasure3], [Measures].[MyMeasure4],
[Measures].[MyMeasure5], [Measures].[MyMeasure6]} on columns, {filter([" &
Parameters!Dimension.Value & "].members," & Parameters!Measure.Value & " > "
& Parameters!Amount.Value & ") } on rows from [Sales]"
And now you just add the dimensions you need as a set of report parameters
( drop down list with all the dimension unique names) and other parameters
you need, and try it out. :)
The drawback is that it gets kind of flat, but you can do quite a lot of
tricks with formating the different levels.
This is a sample that works against Foodmart2000:
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<rd:GridSpacing>0.25cm</rd:GridSpacing>
<RightMargin>2.5cm</RightMargin>
<Body>
<ReportItems>
<Textbox Name="textbox4">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<Top>0.25cm</Top>
<rd:DefaultName>textbox4</rd:DefaultName>
<Height>0.63492cm</Height>
<Width>13.25cm</Width>
<CanGrow>true</CanGrow>
<Value>="Generic report based on " & Parameters!Dimension.Value</Value>
</Textbox>
<Table Name="table1">
<Height>1.90476cm</Height>
<Style />
<Header>
<TableRows>
<TableRow>
<Height>0.63492cm</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Bottom>Solid</Bottom>
<Top>Solid</Top>
<Left>Solid</Left>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>11</ZIndex>
<rd:DefaultName>textbox1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>= Parameters!Dimension.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Bottom>Solid</Bottom>
<Top>Solid</Top>
<Right>Solid</Right>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>10</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Unit sales</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Bottom>Solid</Bottom>
<Top>Solid</Top>
<Right>Solid</ight>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>9</ZIndex>
<rd:DefaultName>textbox3</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Store Cost</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox10">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Bottom>Solid</Bottom>
<Top>Solid</Top>
<Right>Solid</Right>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>8</ZIndex>
<rd:DefaultName>textbox10</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Store Sales</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
<RepeatOnNewPage>true</RepeatOnNewPage>
</Header>
<Details>
<TableRows>
<TableRow>
<Height>0.63492cm</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="Measures_MyMeasure">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>=IIF(Fields!Measures_MyMeasure2.Value = "0", "LightBlue",
IIF(Fields!Measures_MyMeasure2.Value = "2", "LightGreen",
IIF(Fields!Measures_MyMeasure2.Value = "3", "LightYellow",
"White")))</BackgroundColor>
<BorderStyle>
<Left>Solid</Left>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>Measures_MyMeasure</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Measures_MyMeasure.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Measures_MyMeasure4">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<Format>N0</Format>
<BackgroundColor>=IIF(Fields!Measures_MyMeasure2.Value = "0", "LightBlue",
IIF(Fields!Measures_MyMeasure2.Value = "2", "LightGreen",
IIF(Fields!Measures_MyMeasure2.Value = "3", "LightYellow",
"White")))</BackgroundColor>
<BorderStyle>
<Right>Solid</Right>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>Measures_MyMeasure4</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Measures_MyMeasure4.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Measures_MyMeasure5">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<Format>N0</Format>
<BackgroundColor>=IIF(Fields!Measures_MyMeasure2.Value = "0", "LightBlue",
IIF(Fields!Measures_MyMeasure2.Value = "2", "LightGreen",
IIF(Fields!Measures_MyMeasure2.Value = "3", "LightYellow",
"White")))</BackgroundColor>
<BorderStyle>
<Right>Solid</Right>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>Measures_MyMeasure5</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Measures_MyMeasure5.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Measures_MyMeasure6">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<Format>N0</Format>
<BackgroundColor>=IIF(Fields!Measures_MyMeasure2.Value = "0", "LightBlue",
IIF(Fields!Measures_MyMeasure2.Value = "2", "LightGreen",
IIF(Fields!Measures_MyMeasure2.Value = "3", "LightYellow",
"White")))</BackgroundColor>
<BorderStyle>
<Right>Solid</Right>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>Measures_MyMeasure6</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Measures_MyMeasure6.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
<Grouping Name="table1_Details_Group">
<GroupExpressions>
<GroupExpression>=Fields!Measures_MyMeasure3.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</Details>
<DataSetName>DataSet1</DataSetName>
<Top>1.25cm</Top>
<Width>13.63624cm</Width>
<Footer>
<TableRows>
<TableRow>
<Height>0.63492cm</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Top>Solid</Top>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>7</ZIndex>
<rd:DefaultName>textbox7</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Top>Solid</Top>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>6</ZIndex>
<rd:DefaultName>textbox8</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Top>Solid</Top>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>5</ZIndex>
<rd:DefaultName>textbox9</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox12">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Top>Solid</Top>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox12</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
<RepeatOnNewPage>true</RepeatOnNewPage>
</Footer>
<TableColumns>
<TableColumn>
<Width>5.33333cm</Width>
</TableColumn>
<TableColumn>
<Width>2.75cm</Width>
<Visibility>
<Hidden>=IIF( Parameters!ShowAll.Value = False, IIF(Parameters!Measure.Label
= "Unit Sales", False, True), False)</Hidden>
</Visibility>
</TableColumn>
<TableColumn>
<Width>2.77645cm</Width>
<Visibility>
<Hidden>=IIF( Parameters!ShowAll.Value = False, IIF(Parameters!Measure.Label
= "Store Cost", False, True), False)</Hidden>
</Visibility>
</TableColumn>
<TableColumn>
<Width>2.77646cm</Width>
<Visibility>
<Hidden>=IIF( Parameters!ShowAll.Value = False, IIF(Parameters!Measure.Label
= "Store Sales", False, True), False)</Hidden>
</Visibility>
</TableColumn>
</TableColumns>
</Table>
</ReportItems>
<Style />
<Height>15cm</Height>
<ColumnSpacing>1cm</ColumnSpacing>
</Body>
<TopMargin>2.5cm</TopMargin>
<DataSources>
<DataSource Name="FoodMart 2000">
<rd:DataSourceID>8a442390-ee54-4c51-b68a-8a19b447060d</rd:DataSourceID>
<DataSourceReference>FoodMart 2000</DataSourceReference>
</DataSource>
</DataSources>
<Width>16cm</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="Store_Store_Country">
<DataField>[Store].[Store Country].[MEMBER_CAPTION]</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Store_Store_State">
<DataField>[Store].[Store State].[MEMBER_CAPTION]</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Store_Store_City">
<DataField>[Store].[Store City].[MEMBER_CAPTION]</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Store_Store_Name">
<DataField>[Store].[Store Name].[MEMBER_CAPTION]</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Measures_MyMeasure">
<DataField>[Measures].[MyMeasure]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
<Field Name="Measures_MyMeasure2">
<DataField>[Measures].[MyMeasure2]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
<Field Name="Measures_MyMeasure3">
<DataField>[Measures].[MyMeasure3]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
<Field Name="Measures_MyMeasure4">
<DataField>[Measures].[MyMeasure4]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
<Field Name="Measures_MyMeasure5">
<DataField>[Measures].[MyMeasure5]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
<Field Name="Measures_MyMeasure6">
<DataField>[Measures].[MyMeasure6]</DataField>
<rd:TypeName>System.Object</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>FoodMart 2000</DataSourceName>
<CommandText>="with member [Measures].[MyMeasure] as '[" &
Parameters!Dimension.Value & "].currentmember.name' member
[Measures].[MyMeasure2] as '[" & Parameters!Dimension.Value &
"].currentmember.Level.Ordinal' member [Measures].[MyMeasure3] as '[" &
Parameters!Dimension.Value & "].currentmember.UniqueName' member
[Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
[Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
[Measures].[MyMeasure6] as '[Measures].[Store Sales]' select
{[Measures].[MyMeasure], [Measures].[MyMeasure2], [Measures].[MyMeasure3],
[Measures].[MyMeasure4], [Measures].[MyMeasure5], [Measures].[MyMeasure6]}
on columns, {filter([" & Parameters!Dimension.Value & "].members,"
& Parameters!Measure.Value & " > " & Parameters!Amount.Value
& ") } on rows from [Sales]"</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<LeftMargin>2.5cm</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<PageHeight>29.7cm</PageHeight>
<rd:DrawGrid>true</rd:DrawGrid>
<PageWidth>21cm</PageWidth>
<rd:ReportID>247133a5-6ff9-4041-b398-bb2f76911f3e</rd:ReportID>
<BottomMargin>2.5cm</BottomMargin>
<ReportParameters>
<ReportParameter Name="Dimension">
<DataType>String</DataType>
<Prompt>Choose dimension</Prompt>
<ValidValues>
<ParameterValues>
<ParameterValue>
<Value>Store</Value>
</ParameterValue>
<ParameterValue>
<Value>Store Type</Value>
</ParameterValue>
<ParameterValue>
<Value>Store Size in SQFT</Value>
</ParameterValue>
<ParameterValue>
<Value>Time</Value>
</ParameterValue>
<ParameterValue>
<Value>Product</Value>
</ParameterValue>
<ParameterValue>
<Value>Gender</Value>
</ParameterValue>
<ParameterValue>
<Value>Promotions</Value>
</ParameterValue>
</ParameterValues>
</ValidValues>
</ReportParameter>
<ReportParameter Name="Measure">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>="[Measures].[Unit Sales]"</Value>
</Values>
</DefaultValue>
<Prompt>Choose measure</Prompt>
<ValidValues>
<ParameterValues>
<ParameterValue>
<Value>[Measures].[Unit Sales]</Value>
<Label>Unit Sales</Label>
</ParameterValue>
<ParameterValue>
<Value>[Measures].[Store Cost]</Value>
<Label>Store Cost</Label>
</ParameterValue>
<ParameterValue>
<Value>[Measures].[Store Sales]</Value>
<Label>Store Sales</Label>
</ParameterValue>
</ParameterValues>
</ValidValues>
</ReportParameter>
<ReportParameter Name="Amount">
<DataType>Integer</DataType>
<DefaultValue>
<Values>
<Value>0</Value>
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>More than</Prompt>
</ReportParameter>
<ReportParameter Name="ShowAll">
<DataType>Boolean</DataType>
<DefaultValue>
<Values>
<Value>true</Value>
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Show all</Prompt>
</ReportParameter>
</ReportParameters>
<Language>nb-NO</Language>
</Report>|||Hi Kaisa,
I want same what steve want. I have two column in my report. First is
Dimension and second is measure. I have tryed what you suggested but not
working. can you please check where i am doing wrong?
I have two dimension:
[Dim Station].[Station Name].[Station Name]
[Dim Free Test].[Free Test].[Free Test]
and one measure:
[Measures].[Total Test Count]
My Cube Name is:
[OLAP Test Cube]
I want [Dim Station] and [Dim Free Test] dimension dynamically. I don't want
any filter if it require for Dynamic queyr then ok.
when i execute following query in Query builder then it giving me error. can
you please check this where i am wrong?
Query:
with member [Measures].[MyMeasure] as '[Dim Station].currentmember.name'
member [Measures].[MyMeasure2] as '[Dim Station].currentmember.Level.Ordinal'
member [Measures].[MyMeasure3] as '[Dim Station].currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
[Measures].[MyMeasure3],
[Measures].[MyMeasure4]}
on columns, {filter([Dim Station].members, [Measures].[Total Test Count]]>
0) } on
rows from [OLAP Test Cube]
Regards,
Dinesh Patel
"Kaisa M. Lindahl Lervik" wrote:
> The trick is to return the dimension names as measures, and then use the
> measures in your report instead of the dimension names.
> You start out with a usual query, and add Currentmember.Name,
> currentmember.Level.Ordinal and Currentmember.UniqueName as measures.
> with member [Measures].[MyMeasure] as '[Store].currentmember.name' member
> [Measures].[MyMeasure2] as '[Store].currentmember.Level.Ordinal' member
> [Measures].[MyMeasure3] as '[Store].currentmember.UniqueName'
> Then add x number of columns, for measures that you want to reuse.
> member [Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
> [Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
> [Measures].[MyMeasure6] as '[Measures].[Store Sales]'
> Then select all the measures (both the dimension name ones, and the ones
> based on the old measures)
> I added a filter to mine, you don't need to do that.
> The resulting MDX query looks like this:
> with member [Measures].[MyMeasure] as '[Store].currentmember.name' member
> [Measures].[MyMeasure2] as '[Store].currentmember.Level.Ordinal' member
> [Measures].[MyMeasure3] as '[Store].currentmember.UniqueName' member
> [Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
> [Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
> [Measures].[MyMeasure6] as '[Measures].[Store Sales]' select
> {[Measures].[MyMeasure], [Measures].[MyMeasure2], [Measures].[MyMeasure3],
> [Measures].[MyMeasure4], [Measures].[MyMeasure5], [Measures].[MyMeasure6]}
> on columns, {filter([Store].members, [Measures].[Store Cost]> 25000) } on
> rows from [Sales]
>
> After you've generated all the fields, change it as usual to a parameterized
> query:
> ="with member [Measures].[MyMeasure] as '[" & Parameters!Dimension.Value &
> "].currentmember.name' member [Measures].[MyMeasure2] as '[" &
> Parameters!Dimension.Value & "].currentmember.Level.Ordinal' member
> [Measures].[MyMeasure3] as '[" & Parameters!Dimension.Value &
> "].currentmember.UniqueName' member [Measures].[MyMeasure4] as
> '[Measures].[Unit Sales]' member [Measures].[MyMeasure5] as
> '[Measures].[Store Cost]' member [Measures].[MyMeasure6] as
> '[Measures].[Store Sales]' select {[Measures].[MyMeasure],
> [Measures].[MyMeasure2], [Measures].[MyMeasure3], [Measures].[MyMeasure4],
> [Measures].[MyMeasure5], [Measures].[MyMeasure6]} on columns, {filter([" &
> Parameters!Dimension.Value & "].members," & Parameters!Measure.Value & " > "
> & Parameters!Amount.Value & ") } on rows from [Sales]"
> And now you just add the dimensions you need as a set of report parameters
> ( drop down list with all the dimension unique names) and other parameters
> you need, and try it out. :)
> The drawback is that it gets kind of flat, but you can do quite a lot of
> tricks with formating the different levels.
> This is a sample that works against Foodmart2000:
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> <rd:GridSpacing>0.25cm</rd:GridSpacing>
> <RightMargin>2.5cm</RightMargin>
> <Body>
> <ReportItems>
> <Textbox Name="textbox4">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>1</ZIndex>
> <Top>0.25cm</Top>
> <rd:DefaultName>textbox4</rd:DefaultName>
> <Height>0.63492cm</Height>
> <Width>13.25cm</Width>
> <CanGrow>true</CanGrow>
> <Value>="Generic report based on " & Parameters!Dimension.Value</Value>
> </Textbox>
> <Table Name="table1">
> <Height>1.90476cm</Height>
> <Style />
> <Header>
> <TableRows>
> <TableRow>
> <Height>0.63492cm</Height>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox1">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BorderStyle>
> <Bottom>Solid</Bottom>
> <Top>Solid</Top>
> <Left>Solid</Left>
> </BorderStyle>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> </Style>
> <ZIndex>11</ZIndex>
> <rd:DefaultName>textbox1</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>= Parameters!Dimension.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox2">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BorderStyle>
> <Bottom>Solid</Bottom>
> <Top>Solid</Top>
> <Right>Solid</Right>
> </BorderStyle>
> <TextAlign>Right</TextAlign>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> </Style>
> <ZIndex>10</ZIndex>
> <rd:DefaultName>textbox2</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>Unit sales</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox3">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BorderStyle>
> <Bottom>Solid</Bottom>
> <Top>Solid</Top>
> <Right>Solid</ight>
> </BorderStyle>
> <TextAlign>Right</TextAlign>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> </Style>
> <ZIndex>9</ZIndex>
> <rd:DefaultName>textbox3</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>Store Cost</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox10">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BorderStyle>
> <Bottom>Solid</Bottom>
> <Top>Solid</Top>
> <Right>Solid</Right>
> </BorderStyle>
> <TextAlign>Right</TextAlign>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> </Style>
> <ZIndex>8</ZIndex>
> <rd:DefaultName>textbox10</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>Store Sales</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>|||I am working with AS2005 and RS2005 I have created one report also. can you
please check this code.
I am trying to change query to below but giving error:
="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
".currentmember.name'
member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
".currentmember.Level.Ordinal'
member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
".currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
[Measures].[MyMeasure3],
[Measures].[MyMeasure4]}
on columns, {" & Parameters!Dimension.Value & ".members} on
rows from [OLAP Test Cube]"
my report code is below:
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="SLCTestDB">
<DataSourceReference>SLCTestDB</DataSourceReference>
<rd:DataSourceID>44e60797-bd99-4681-9499-7e848244229e</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<ReportParameters>
<ReportParameter Name="Dimension">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>[Free Test]</Value>
</Values>
</DefaultValue>
<Prompt>Dimension</Prompt>
<ValidValues>
<ParameterValues>
<ParameterValue>
<Value>[Station Name]</Value>
<Label>station</Label>
</ParameterValue>
<ParameterValue>
<Value>[Free Test]</Value>
<Label>Free</Label>
</ParameterValue>
</ParameterValues>
</ValidValues>
</ReportParameter>
</ReportParameters>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>20pt</FontSize>
<Color>SteelBlue</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>0.36in</Height>
<Value>Report3</Value>
</Textbox>
<Table Name="table1">
<DataSetName>SLCTestDB</DataSetName>
<Top>0.36in</Top>
<TableGroups>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="MyMeasure">
<rd:DefaultName>MyMeasure</rd:DefaultName>
<ZIndex>3</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontWeight>700</FontWeight>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#6e9eca</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!MyMeasure.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox5">
<rd:DefaultName>textbox5</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontWeight>700</FontWeight>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#6e9eca</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>
</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.21in</Height>
</TableRow>
</TableRows>
</Header>
<Sorting>
<SortBy>
<SortExpression>=Fields!MyMeasure.Value</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
<Grouping Name="table1_MyMeasure">
<GroupExpressions>
<GroupExpression>=Fields!MyMeasure.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</TableGroup>
</TableGroups>
<Width>4.5in</Width>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>
</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="MyMeasure4">
<rd:DefaultName>MyMeasure4</rd:DefaultName>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!MyMeasure4.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.21in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>SteelBlue</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>My Measure</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<rd:DefaultName>textbox4</rd:DefaultName>
<ZIndex>4</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>SteelBlue</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>My Measure4</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.22in</Height>
</TableRow>
</TableRows>
<RepeatOnNewPage>true</RepeatOnNewPage>
</Header>
<TableColumns>
<TableColumn>
<Width>2.875in</Width>
</TableColumn>
<TableColumn>
<Width>1.625in</Width>
</TableColumn>
</TableColumns>
</Table>
</ReportItems>
<Height>1in</Height>
</Body>
<rd:ReportID>be7b0e20-a01a-40a4-8c2a-23748db01c34</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<DataSets>
<DataSet Name="SLCTestDB">
<Query>
<rd:SuppressAutoUpdate>true</rd:SuppressAutoUpdate>
<CommandText>with member [Measures].[MyMeasure] as '[Free
Test].currentmember.name'
member [Measures].[MyMeasure2] as '[Free Test].currentmember.Level.Ordinal'
member [Measures].[MyMeasure3] as '[Free Test].currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
[Measures].[MyMeasure3],
[Measures].[MyMeasure4]} on columns,
{[Free Test].members} on
rows from [OLAP Test Cube]</CommandText>
<DataSourceName>SLCTestDB</DataSourceName>
<rd:MdxQuery><QueryDefinition
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="<CommandType>MDX</CommandType><Type>Query</Type><QuerySpecification">http://schemas.microsoft.com/AnalysisServices/QueryDefinition"><CommandType>MDX</CommandType><Type>Query</Type><QuerySpecification
xsi:type="MDXQuerySpecification"><Select><Items><Item><ID
xsi:type="Level"><DimensionName>Dim Free
Test</DimensionName><HierarchyName>Free
Test</HierarchyName><HierarchyUniqueName>[Dim Free Test].[Free
Test]</HierarchyUniqueName><LevelName>Free Test</LevelName><UniqueName>[Dim
Free Test].[Free Test].[Free Test]</UniqueName></ID><ItemCaption>Free
Test</ItemCaption></Item><Item><ID
xsi:type="Measure"><MeasureName>MyMeasure</MeasureName><UniqueName>[Measures].[MyMeasure]</UniqueName></ID><ItemCaption>MyMeasure</ItemCaption><FormattedValue>true</FormattedValue></Item><Item><ID
xsi:type="Measure"><MeasureName>MyMeasure2</MeasureName><UniqueName>[Measures].[MyMeasure2]</UniqueName></ID><ItemCaption>MyMeasure2</ItemCaption><FormattedValue>true</FormattedValue></Item><Item><ID
xsi:type="Measure"><MeasureName>MyMeasure3</MeasureName><UniqueName>[Measures].[MyMeasure3]</UniqueName></ID><ItemCaption>MyMeasure3</ItemCaption><FormattedValue>true</FormattedValue></Item><Item><ID
xsi:type="Measure"><MeasureName>MyMeasure4</MeasureName><UniqueName>[Measures].[MyMeasure4]</UniqueName></ID><ItemCaption>MyMeasure4</ItemCaption><FormattedValue>true</FormattedValue></Item></Items></Select><From>OLAP
Test Cube</From><Filter><FilterItems /></Filter><Calculations /><Aggregates
/><QueryProperties /></QuerySpecification><Query><Statement>with member
[Measures].[MyMeasure] as '[Free Test].currentmember.name'
member [Measures].[MyMeasure2] as '[Free Test].currentmember.Level.Ordinal'
member [Measures].[MyMeasure3] as '[Free Test].currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
[Measures].[MyMeasure3],
[Measures].[MyMeasure4]} on columns,
{[Free Test].members} on
rows from [OLAP Test Cube]</Statement><ParameterDefinitions
/></Query></QueryDefinition></rd:MdxQuery>
</Query>
<Fields>
<Field Name="Free_Test">
<rd:TypeName>System.String</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Level"
UniqueName="[Dim Free Test].[Free Test].[Free Test]" /></DataField>
</Field>
<Field Name="MyMeasure">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
UniqueName="[Measures].[MyMeasure]" /></DataField>
</Field>
<Field Name="MyMeasure2">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
UniqueName="[Measures].[MyMeasure2]" /></DataField>
</Field>
<Field Name="MyMeasure3">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
UniqueName="[Measures].[MyMeasure3]" /></DataField>
</Field>
<Field Name="MyMeasure4">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
UniqueName="[Measures].[MyMeasure4]" /></DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>5in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>
"Dinesh Patel" wrote:
> Hi Kaisa,
> I want same what steve want. I have two column in my report. First is
> Dimension and second is measure. I have tryed what you suggested but not
> working. can you please check where i am doing wrong?
> I have two dimension:
> [Dim Station].[Station Name].[Station Name]
> [Dim Free Test].[Free Test].[Free Test]
> and one measure:
> [Measures].[Total Test Count]
> My Cube Name is:
> [OLAP Test Cube]
> I want [Dim Station] and [Dim Free Test] dimension dynamically. I don't want
> any filter if it require for Dynamic queyr then ok.
> when i execute following query in Query builder then it giving me error. can
> you please check this where i am wrong?
> Query:
> with member [Measures].[MyMeasure] as '[Dim Station].currentmember.name'
> member [Measures].[MyMeasure2] as '[Dim Station].currentmember.Level.Ordinal'
> member [Measures].[MyMeasure3] as '[Dim Station].currentmember.UniqueName'
> member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> [Measures].[MyMeasure3],
> [Measures].[MyMeasure4]}
> on columns, {filter([Dim Station].members, [Measures].[Total Test Count]]>
> 0) } on
> rows from [OLAP Test Cube]
> Regards,
> Dinesh Patel
> "Kaisa M. Lindahl Lervik" wrote:
> > The trick is to return the dimension names as measures, and then use the
> > measures in your report instead of the dimension names.
> >
> > You start out with a usual query, and add Currentmember.Name,
> > currentmember.Level.Ordinal and Currentmember.UniqueName as measures.
> >
> > with member [Measures].[MyMeasure] as '[Store].currentmember.name' member
> > [Measures].[MyMeasure2] as '[Store].currentmember.Level.Ordinal' member
> > [Measures].[MyMeasure3] as '[Store].currentmember.UniqueName'
> >
> > Then add x number of columns, for measures that you want to reuse.
> > member [Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
> > [Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
> > [Measures].[MyMeasure6] as '[Measures].[Store Sales]'
> >
> > Then select all the measures (both the dimension name ones, and the ones
> > based on the old measures)
> > I added a filter to mine, you don't need to do that.
> >
> > The resulting MDX query looks like this:
> >
> > with member [Measures].[MyMeasure] as '[Store].currentmember.name' member
> > [Measures].[MyMeasure2] as '[Store].currentmember.Level.Ordinal' member
> > [Measures].[MyMeasure3] as '[Store].currentmember.UniqueName' member
> > [Measures].[MyMeasure4] as '[Measures].[Unit Sales]' member
> > [Measures].[MyMeasure5] as '[Measures].[Store Cost]' member
> > [Measures].[MyMeasure6] as '[Measures].[Store Sales]' select
> > {[Measures].[MyMeasure], [Measures].[MyMeasure2], [Measures].[MyMeasure3],
> > [Measures].[MyMeasure4], [Measures].[MyMeasure5], [Measures].[MyMeasure6]}
> > on columns, {filter([Store].members, [Measures].[Store Cost]> 25000) } on
> > rows from [Sales]
> >
> >
> > After you've generated all the fields, change it as usual to a parameterized
> > query:
> >
> > ="with member [Measures].[MyMeasure] as '[" & Parameters!Dimension.Value &
> > "].currentmember.name' member [Measures].[MyMeasure2] as '[" &
> > Parameters!Dimension.Value & "].currentmember.Level.Ordinal' member
> > [Measures].[MyMeasure3] as '[" & Parameters!Dimension.Value &
> > "].currentmember.UniqueName' member [Measures].[MyMeasure4] as
> > '[Measures].[Unit Sales]' member [Measures].[MyMeasure5] as
> > '[Measures].[Store Cost]' member [Measures].[MyMeasure6] as
> > '[Measures].[Store Sales]' select {[Measures].[MyMeasure],
> > [Measures].[MyMeasure2], [Measures].[MyMeasure3], [Measures].[MyMeasure4],
> > [Measures].[MyMeasure5], [Measures].[MyMeasure6]} on columns, {filter([" &
> > Parameters!Dimension.Value & "].members," & Parameters!Measure.Value & " > "
> > & Parameters!Amount.Value & ") } on rows from [Sales]"
> >
> > And now you just add the dimensions you need as a set of report parameters
> > ( drop down list with all the dimension unique names) and other parameters
> > you need, and try it out. :)
> >
> > The drawback is that it gets kind of flat, but you can do quite a lot of
> > tricks with formating the different levels.
> >
> > This is a sample that works against Foodmart2000:
> > <?xml version="1.0" encoding="utf-8"?>
> >
> > <Report
> > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
> > xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> >
> > <rd:GridSpacing>0.25cm</rd:GridSpacing>
> >
> > <RightMargin>2.5cm</RightMargin>
> >
> > <Body>
> >
> > <ReportItems>
> >
> > <Textbox Name="textbox4">
> >
> > <Style>
> >
> > <PaddingLeft>2pt</PaddingLeft>
> >
> > <PaddingBottom>2pt</PaddingBottom>
> >
> > <PaddingTop>2pt</PaddingTop>
> >
> > <PaddingRight>2pt</PaddingRight>
> >
> > </Style>
> >
> > <ZIndex>1</ZIndex>
> >
> > <Top>0.25cm</Top>
> >
> > <rd:DefaultName>textbox4</rd:DefaultName>
> >
> > <Height>0.63492cm</Height>
> >
> > <Width>13.25cm</Width>
> >
> > <CanGrow>true</CanGrow>
> >
> > <Value>="Generic report based on " & Parameters!Dimension.Value</Value>
> >
> > </Textbox>
> >
> > <Table Name="table1">
> >
> > <Height>1.90476cm</Height>
> >
> > <Style />
> >
> > <Header>
> >
> > <TableRows>
> >
> > <TableRow>
> >
> > <Height>0.63492cm</Height>
> >
> > <TableCells>
> >
> > <TableCell>
> >
> > <ReportItems>
> >
> > <Textbox Name="textbox1">
> >
> > <Style>
> >
> > <PaddingLeft>2pt</PaddingLeft>
> >
> > <BorderStyle>
> >
> > <Bottom>Solid</Bottom>
> >
> > <Top>Solid</Top>
> >
> > <Left>Solid</Left>
> >
> > </BorderStyle>
> >
> > <PaddingBottom>2pt</PaddingBottom>
> >
> > <PaddingTop>2pt</PaddingTop>
> >
> > <PaddingRight>2pt</PaddingRight>
> >
> > <FontWeight>700</FontWeight>
> >
> > </Style>
> >
> > <ZIndex>11</ZIndex>
> >
> > <rd:DefaultName>textbox1</rd:DefaultName>
> >
> > <CanGrow>true</CanGrow>
> >
> > <Value>= Parameters!Dimension.Value</Value>
> >
> > </Textbox>
> >
> > </ReportItems>
> >
> > </TableCell>
> >
> > <TableCell>
> >
> > <ReportItems>
> >
> > <Textbox Name="textbox2">
> >
> > <Style>
> >
> > <PaddingLeft>2pt</PaddingLeft>
> >
> > <BorderStyle>
> >
> > <Bottom>Solid</Bottom>
> >
> > <Top>Solid</Top>
> >
> > <Right>Solid</Right>
> >
> > </BorderStyle>
> >
> > <TextAlign>Right</TextAlign>
> >
> > <PaddingBottom>2pt</PaddingBottom>
> >
> > <PaddingTop>2pt</PaddingTop>
> >
> > <PaddingRight>2pt</PaddingRight>
> >
> > <FontWeight>700</FontWeight>
> >
> > </Style>
> >
> > <ZIndex>10</ZIndex>
> >
> > <rd:DefaultName>textbox2</rd:DefaultName>
> >
> > <CanGrow>true</CanGrow>
> >
> > <Value>Unit sales</Value>
> >
> > </Textbox>
> >
> > </ReportItems>
> >
> > </TableCell>
> >
> > <TableCell>
> >
> > <ReportItems>
> >
> > <Textbox Name="textbox3">
> >
> > <Style>
> >
> > <PaddingLeft>2pt</PaddingLeft>
> >
> > <BorderStyle>
> >
> > <Bottom>Solid</Bottom>
> >
> > <Top>Solid</Top>
> >
> > <Right>Solid</ight>
> >
> > </BorderStyle>
> >
> > <TextAlign>Right</TextAlign>
> >
> > <PaddingBottom>2pt</PaddingBottom>
> >
> > <PaddingTop>2pt</PaddingTop>
> >
> > <PaddingRight>2pt</PaddingRight>
> >
> > <FontWeight>700</FontWeight>
> >
> > </Style>
> >
> > <ZIndex>9</ZIndex>
> >
> > <rd:DefaultName>textbox3</rd:DefaultName>
> >
> > <CanGrow>true</CanGrow>
> >
> > <Value>Store Cost</Value>
> >
> > </Textbox>
> >
> > </ReportItems>
> >
> > </TableCell>
> >
> > <TableCell>
> >
> > <ReportItems>
> >
> > <Textbox Name="textbox10">
> >
> > <Style>
> >|||problem was solved.
First execute following query and design the report.
with member [Measures].[MyMeasure] as '[Free Test].currentmember.name'
member [Measures].[MyMeasure2] as '[Free Test].currentmember.Level.Ordinal'
member [Measures].[MyMeasure3] as '[Free Test].currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
[Measures].[MyMeasure3], [Measures].[MyMeasure4]} on columns, {[Free
Test].members} on
rows from [OLAP Test Cube]
and then Edit Dataset using (â?¦) button and paste Dynamic query on Query
String Textbox and click ok.
="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
".currentmember.name'
member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
".currentmember.Level.Ordinal'
member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
".currentmember.UniqueName'
member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
[Measures].[MyMeasure3], [Measures].[MyMeasure4]}
on columns, {" & Parameters!Dimension.Value & ".members} on
rows from [OLAP Test Cube]"
Regards,
Dinesh Patel
"Dinesh Patel" wrote:
> I am working with AS2005 and RS2005 I have created one report also. can you
> please check this code.
> I am trying to change query to below but giving error:
> ="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
> ".currentmember.name'
> member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
> ".currentmember.Level.Ordinal'
> member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
> ".currentmember.UniqueName'
> member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> [Measures].[MyMeasure3],
> [Measures].[MyMeasure4]}
> on columns, {" & Parameters!Dimension.Value & ".members} on
> rows from [OLAP Test Cube]"
>
> my report code is below:
>
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> <DataSources>
> <DataSource Name="SLCTestDB">
> <DataSourceReference>SLCTestDB</DataSourceReference>
> <rd:DataSourceID>44e60797-bd99-4681-9499-7e848244229e</rd:DataSourceID>
> </DataSource>
> </DataSources>
> <BottomMargin>1in</BottomMargin>
> <RightMargin>1in</RightMargin>
> <ReportParameters>
> <ReportParameter Name="Dimension">
> <DataType>String</DataType>
> <DefaultValue>
> <Values>
> <Value>[Free Test]</Value>
> </Values>
> </DefaultValue>
> <Prompt>Dimension</Prompt>
> <ValidValues>
> <ParameterValues>
> <ParameterValue>
> <Value>[Station Name]</Value>
> <Label>station</Label>
> </ParameterValue>
> <ParameterValue>
> <Value>[Free Test]</Value>
> <Label>Free</Label>
> </ParameterValue>
> </ParameterValues>
> </ValidValues>
> </ReportParameter>
> </ReportParameters>
> <rd:DrawGrid>true</rd:DrawGrid>
> <InteractiveWidth>8.5in</InteractiveWidth>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <Body>
> <ReportItems>
> <Textbox Name="textbox1">
> <rd:DefaultName>textbox1</rd:DefaultName>
> <ZIndex>1</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <FontWeight>700</FontWeight>
> <FontSize>20pt</FontSize>
> <Color>SteelBlue</Color>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Height>0.36in</Height>
> <Value>Report3</Value>
> </Textbox>
> <Table Name="table1">
> <DataSetName>SLCTestDB</DataSetName>
> <Top>0.36in</Top>
> <TableGroups>
> <TableGroup>
> <Header>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="MyMeasure">
> <rd:DefaultName>MyMeasure</rd:DefaultName>
> <ZIndex>3</ZIndex>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <FontWeight>700</FontWeight>
> <BorderColor>
> <Default>LightGrey</Default>
> </BorderColor>
> <BackgroundColor>#6e9eca</BackgroundColor>
> <Color>White</Color>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!MyMeasure.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox5">
> <rd:DefaultName>textbox5</rd:DefaultName>
> <ZIndex>2</ZIndex>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <FontWeight>700</FontWeight>
> <BorderColor>
> <Default>LightGrey</Default>
> </BorderColor>
> <BackgroundColor>#6e9eca</BackgroundColor>
> <Color>White</Color>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>
> </Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.21in</Height>
> </TableRow>
> </TableRows>
> </Header>
> <Sorting>
> <SortBy>
> <SortExpression>=Fields!MyMeasure.Value</SortExpression>
> <Direction>Ascending</Direction>
> </SortBy>
> </Sorting>
> <Grouping Name="table1_MyMeasure">
> <GroupExpressions>
> <GroupExpression>=Fields!MyMeasure.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> </TableGroup>
> </TableGroups>
> <Width>4.5in</Width>
> <Details>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox3">
> <rd:DefaultName>textbox3</rd:DefaultName>
> <ZIndex>1</ZIndex>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <BorderColor>
> <Default>LightGrey</Default>
> </BorderColor>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>
> </Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="MyMeasure4">
> <rd:DefaultName>MyMeasure4</rd:DefaultName>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <BorderColor>
> <Default>LightGrey</Default>
> </BorderColor>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!MyMeasure4.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.21in</Height>
> </TableRow>
> </TableRows>
> </Details>
> <Header>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox2">
> <rd:DefaultName>textbox2</rd:DefaultName>
> <ZIndex>5</ZIndex>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <TextAlign>Right</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <FontWeight>700</FontWeight>
> <FontSize>11pt</FontSize>
> <BorderColor>
> <Default>LightGrey</Default>
> </BorderColor>
> <BackgroundColor>SteelBlue</BackgroundColor>
> <Color>White</Color>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>My Measure</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox4">
> <rd:DefaultName>textbox4</rd:DefaultName>
> <ZIndex>4</ZIndex>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <TextAlign>Right</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <FontFamily>Tahoma</FontFamily>
> <FontWeight>700</FontWeight>
> <FontSize>11pt</FontSize>
> <BorderColor>
> <Default>LightGrey</Default>
> </BorderColor>
> <BackgroundColor>SteelBlue</BackgroundColor>
> <Color>White</Color>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>My Measure4</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.22in</Height>
> </TableRow>
> </TableRows>
> <RepeatOnNewPage>true</RepeatOnNewPage>
> </Header>
> <TableColumns>
> <TableColumn>
> <Width>2.875in</Width>
> </TableColumn>
> <TableColumn>
> <Width>1.625in</Width>
> </TableColumn>
> </TableColumns>
> </Table>
> </ReportItems>
> <Height>1in</Height>
> </Body>
> <rd:ReportID>be7b0e20-a01a-40a4-8c2a-23748db01c34</rd:ReportID>
> <LeftMargin>1in</LeftMargin>
> <DataSets>
> <DataSet Name="SLCTestDB">
> <Query>|||I'm sorry I haven't replied to this earlier, but I'm happy you've solved it.
I guess I was assuming you knew you had to use a non dynamic query to build
the fields correctly. I'll remember to add this if I give advice on dynamic
mdx again.
Kaisa M. Lindahl Lervik
"Dinesh Patel" <DineshPatel@.discussions.microsoft.com> wrote in message
news:D1FC2757-F590-4881-924C-D01BE05F454F@.microsoft.com...
> problem was solved.
> First execute following query and design the report.
> with member [Measures].[MyMeasure] as '[Free Test].currentmember.name'
> member [Measures].[MyMeasure2] as '[Free
> Test].currentmember.Level.Ordinal'
> member [Measures].[MyMeasure3] as '[Free Test].currentmember.UniqueName'
> member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> [Measures].[MyMeasure3], [Measures].[MyMeasure4]} on columns, {[Free
> Test].members} on
> rows from [OLAP Test Cube]
> and then Edit Dataset using (.) button and paste Dynamic query on Query
> String Textbox and click ok.
> ="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
> ".currentmember.name'
> member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
> ".currentmember.Level.Ordinal'
> member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
> ".currentmember.UniqueName'
> member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> [Measures].[MyMeasure3], [Measures].[MyMeasure4]}
> on columns, {" & Parameters!Dimension.Value & ".members} on
> rows from [OLAP Test Cube]"
> Regards,
> Dinesh Patel
>
> "Dinesh Patel" wrote:
>> I am working with AS2005 and RS2005 I have created one report also. can
>> you
>> please check this code.
>> I am trying to change query to below but giving error:
>> ="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
>> ".currentmember.name'
>> member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
>> ".currentmember.Level.Ordinal'
>> member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
>> ".currentmember.UniqueName'
>> member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
>> select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
>> [Measures].[MyMeasure3],
>> [Measures].[MyMeasure4]}
>> on columns, {" & Parameters!Dimension.Value & ".members} on
>> rows from [OLAP Test Cube]"
>>
>> my report code is below:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <Report
>> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
>> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
>> <DataSources>
>> <DataSource Name="SLCTestDB">
>> <DataSourceReference>SLCTestDB</DataSourceReference>
>> <rd:DataSourceID>44e60797-bd99-4681-9499-7e848244229e</rd:DataSourceID>
>> </DataSource>
>> </DataSources>
>> <BottomMargin>1in</BottomMargin>
>> <RightMargin>1in</RightMargin>
>> <ReportParameters>
>> <ReportParameter Name="Dimension">
>> <DataType>String</DataType>
>> <DefaultValue>
>> <Values>
>> <Value>[Free Test]</Value>
>> </Values>
>> </DefaultValue>
>> <Prompt>Dimension</Prompt>
>> <ValidValues>
>> <ParameterValues>
>> <ParameterValue>
>> <Value>[Station Name]</Value>
>> <Label>station</Label>
>> </ParameterValue>
>> <ParameterValue>
>> <Value>[Free Test]</Value>
>> <Label>Free</Label>
>> </ParameterValue>
>> </ParameterValues>
>> </ValidValues>
>> </ReportParameter>
>> </ReportParameters>
>> <rd:DrawGrid>true</rd:DrawGrid>
>> <InteractiveWidth>8.5in</InteractiveWidth>
>> <rd:SnapToGrid>true</rd:SnapToGrid>
>> <Body>
>> <ReportItems>
>> <Textbox Name="textbox1">
>> <rd:DefaultName>textbox1</rd:DefaultName>
>> <ZIndex>1</ZIndex>
>> <Style>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <FontWeight>700</FontWeight>
>> <FontSize>20pt</FontSize>
>> <Color>SteelBlue</Color>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Height>0.36in</Height>
>> <Value>Report3</Value>
>> </Textbox>
>> <Table Name="table1">
>> <DataSetName>SLCTestDB</DataSetName>
>> <Top>0.36in</Top>
>> <TableGroups>
>> <TableGroup>
>> <Header>
>> <TableRows>
>> <TableRow>
>> <TableCells>
>> <TableCell>
>> <ReportItems>
>> <Textbox Name="MyMeasure">
>> <rd:DefaultName>MyMeasure</rd:DefaultName>
>> <ZIndex>3</ZIndex>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <FontWeight>700</FontWeight>
>> <BorderColor>
>> <Default>LightGrey</Default>
>> </BorderColor>
>> <BackgroundColor>#6e9eca</BackgroundColor>
>> <Color>White</Color>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Value>=Fields!MyMeasure.Value</Value>
>> </Textbox>
>> </ReportItems>
>> </TableCell>
>> <TableCell>
>> <ReportItems>
>> <Textbox Name="textbox5">
>> <rd:DefaultName>textbox5</rd:DefaultName>
>> <ZIndex>2</ZIndex>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <FontWeight>700</FontWeight>
>> <BorderColor>
>> <Default>LightGrey</Default>
>> </BorderColor>
>> <BackgroundColor>#6e9eca</BackgroundColor>
>> <Color>White</Color>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Value>
>> </Value>
>> </Textbox>
>> </ReportItems>
>> </TableCell>
>> </TableCells>
>> <Height>0.21in</Height>
>> </TableRow>
>> </TableRows>
>> </Header>
>> <Sorting>
>> <SortBy>
>> <SortExpression>=Fields!MyMeasure.Value</SortExpression>
>> <Direction>Ascending</Direction>
>> </SortBy>
>> </Sorting>
>> <Grouping Name="table1_MyMeasure">
>> <GroupExpressions>
>> <GroupExpression>=Fields!MyMeasure.Value</GroupExpression>
>> </GroupExpressions>
>> </Grouping>
>> </TableGroup>
>> </TableGroups>
>> <Width>4.5in</Width>
>> <Details>
>> <TableRows>
>> <TableRow>
>> <TableCells>
>> <TableCell>
>> <ReportItems>
>> <Textbox Name="textbox3">
>> <rd:DefaultName>textbox3</rd:DefaultName>
>> <ZIndex>1</ZIndex>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <BorderColor>
>> <Default>LightGrey</Default>
>> </BorderColor>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Value>
>> </Value>
>> </Textbox>
>> </ReportItems>
>> </TableCell>
>> <TableCell>
>> <ReportItems>
>> <Textbox Name="MyMeasure4">
>> <rd:DefaultName>MyMeasure4</rd:DefaultName>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <BorderColor>
>> <Default>LightGrey</Default>
>> </BorderColor>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Value>=Fields!MyMeasure4.Value</Value>
>> </Textbox>
>> </ReportItems>
>> </TableCell>
>> </TableCells>
>> <Height>0.21in</Height>
>> </TableRow>
>> </TableRows>
>> </Details>
>> <Header>
>> <TableRows>
>> <TableRow>
>> <TableCells>
>> <TableCell>
>> <ReportItems>
>> <Textbox Name="textbox2">
>> <rd:DefaultName>textbox2</rd:DefaultName>
>> <ZIndex>5</ZIndex>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <TextAlign>Right</TextAlign>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <FontWeight>700</FontWeight>
>> <FontSize>11pt</FontSize>
>> <BorderColor>
>> <Default>LightGrey</Default>
>> </BorderColor>
>> <BackgroundColor>SteelBlue</BackgroundColor>
>> <Color>White</Color>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Value>My Measure</Value>
>> </Textbox>
>> </ReportItems>
>> </TableCell>
>> <TableCell>
>> <ReportItems>
>> <Textbox Name="textbox4">
>> <rd:DefaultName>textbox4</rd:DefaultName>
>> <ZIndex>4</ZIndex>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <TextAlign>Right</TextAlign>
>> <PaddingLeft>2pt</PaddingLeft>
>> <PaddingBottom>2pt</PaddingBottom>
>> <FontFamily>Tahoma</FontFamily>
>> <FontWeight>700</FontWeight>
>> <FontSize>11pt</FontSize>
>> <BorderColor>
>> <Default>LightGrey</Default>
>> </BorderColor>
>> <BackgroundColor>SteelBlue</BackgroundColor>
>> <Color>White</Color>
>> <PaddingRight>2pt</PaddingRight>
>> <PaddingTop>2pt</PaddingTop>
>> </Style>
>> <CanGrow>true</CanGrow>
>> <Value>My Measure4</Value>
>> </Textbox>
>> </ReportItems>
>> </TableCell>
>> </TableCells>
>> <Height>0.22in</Height>
>> </TableRow>
>> </TableRows>
>> <RepeatOnNewPage>true</RepeatOnNewPage>
>> </Header>
>> <TableColumns>
>> <TableColumn>
>> <Width>2.875in</Width>
>> </TableColumn>
>> <TableColumn>
>> <Width>1.625in</Width>
>> </TableColumn>
>> </TableColumns>
>> </Table>
>> </ReportItems>
>> <Height>1in</Height>
>> </Body>
>> <rd:ReportID>be7b0e20-a01a-40a4-8c2a-23748db01c34</rd:ReportID>
>> <LeftMargin>1in</LeftMargin>
>> <DataSets>
>> <DataSet Name="SLCTestDB">
>> <Query>|||I am not expert, i received this solution from net.
Dinesh Patel
"Kaisa M. Lindahl Lervik" wrote:
> I'm sorry I haven't replied to this earlier, but I'm happy you've solved it.
> I guess I was assuming you knew you had to use a non dynamic query to build
> the fields correctly. I'll remember to add this if I give advice on dynamic
> mdx again.
> Kaisa M. Lindahl Lervik
>
> "Dinesh Patel" <DineshPatel@.discussions.microsoft.com> wrote in message
> news:D1FC2757-F590-4881-924C-D01BE05F454F@.microsoft.com...
> > problem was solved.
> >
> > First execute following query and design the report.
> >
> > with member [Measures].[MyMeasure] as '[Free Test].currentmember.name'
> > member [Measures].[MyMeasure2] as '[Free
> > Test].currentmember.Level.Ordinal'
> > member [Measures].[MyMeasure3] as '[Free Test].currentmember.UniqueName'
> > member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> > select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> > [Measures].[MyMeasure3], [Measures].[MyMeasure4]} on columns, {[Free
> > Test].members} on
> > rows from [OLAP Test Cube]
> >
> > and then Edit Dataset using (.) button and paste Dynamic query on Query
> > String Textbox and click ok.
> >
> > ="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
> > ".currentmember.name'
> >
> > member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
> > ".currentmember.Level.Ordinal'
> > member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
> > ".currentmember.UniqueName'
> > member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> > select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> > [Measures].[MyMeasure3], [Measures].[MyMeasure4]}
> > on columns, {" & Parameters!Dimension.Value & ".members} on
> > rows from [OLAP Test Cube]"
> >
> > Regards,
> > Dinesh Patel
> >
> >
> > "Dinesh Patel" wrote:
> >
> >> I am working with AS2005 and RS2005 I have created one report also. can
> >> you
> >> please check this code.
> >>
> >> I am trying to change query to below but giving error:
> >>
> >> ="with member [Measures].[MyMeasure] as '" & Parameters!Dimension.Value &
> >> ".currentmember.name'
> >> member [Measures].[MyMeasure2] as '" & Parameters!Dimension.Value &
> >> ".currentmember.Level.Ordinal'
> >> member [Measures].[MyMeasure3] as '" & Parameters!Dimension.Value &
> >> ".currentmember.UniqueName'
> >> member [Measures].[MyMeasure4] as '[Measures].[Total Test Count]'
> >>
> >> select {[Measures].[MyMeasure], [Measures].[MyMeasure2],
> >> [Measures].[MyMeasure3],
> >> [Measures].[MyMeasure4]}
> >> on columns, {" & Parameters!Dimension.Value & ".members} on
> >> rows from [OLAP Test Cube]"
> >>
> >>
> >>
> >> my report code is below:
> >>
> >>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <Report
> >> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
> >> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> >> <DataSources>
> >> <DataSource Name="SLCTestDB">
> >> <DataSourceReference>SLCTestDB</DataSourceReference>
> >>
> >> <rd:DataSourceID>44e60797-bd99-4681-9499-7e848244229e</rd:DataSourceID>
> >> </DataSource>
> >> </DataSources>
> >> <BottomMargin>1in</BottomMargin>
> >> <RightMargin>1in</RightMargin>
> >> <ReportParameters>
> >> <ReportParameter Name="Dimension">
> >> <DataType>String</DataType>
> >> <DefaultValue>
> >> <Values>
> >> <Value>[Free Test]</Value>
> >> </Values>
> >> </DefaultValue>
> >> <Prompt>Dimension</Prompt>
> >> <ValidValues>
> >> <ParameterValues>
> >> <ParameterValue>
> >> <Value>[Station Name]</Value>
> >> <Label>station</Label>
> >> </ParameterValue>
> >> <ParameterValue>
> >> <Value>[Free Test]</Value>
> >> <Label>Free</Label>
> >> </ParameterValue>
> >> </ParameterValues>
> >> </ValidValues>
> >> </ReportParameter>
> >> </ReportParameters>
> >> <rd:DrawGrid>true</rd:DrawGrid>
> >> <InteractiveWidth>8.5in</InteractiveWidth>
> >> <rd:SnapToGrid>true</rd:SnapToGrid>
> >> <Body>
> >> <ReportItems>
> >> <Textbox Name="textbox1">
> >> <rd:DefaultName>textbox1</rd:DefaultName>
> >> <ZIndex>1</ZIndex>
> >> <Style>
> >> <PaddingLeft>2pt</PaddingLeft>
> >> <PaddingBottom>2pt</PaddingBottom>
> >> <FontFamily>Tahoma</FontFamily>
> >> <FontWeight>700</FontWeight>
> >> <FontSize>20pt</FontSize>
> >> <Color>SteelBlue</Color>
> >> <PaddingRight>2pt</PaddingRight>
> >> <PaddingTop>2pt</PaddingTop>
> >> </Style>
> >> <CanGrow>true</CanGrow>
> >> <Height>0.36in</Height>
> >> <Value>Report3</Value>
> >> </Textbox>
> >> <Table Name="table1">
> >> <DataSetName>SLCTestDB</DataSetName>
> >> <Top>0.36in</Top>
> >> <TableGroups>
> >> <TableGroup>
> >> <Header>
> >> <TableRows>
> >> <TableRow>
> >> <TableCells>
> >> <TableCell>
> >> <ReportItems>
> >> <Textbox Name="MyMeasure">
> >> <rd:DefaultName>MyMeasure</rd:DefaultName>
> >> <ZIndex>3</ZIndex>
> >> <Style>
> >> <BorderStyle>
> >> <Default>Solid</Default>
> >> </BorderStyle>
> >> <PaddingLeft>2pt</PaddingLeft>
> >> <PaddingBottom>2pt</PaddingBottom>
> >> <FontFamily>Tahoma</FontFamily>
> >> <FontWeight>700</FontWeight>
> >> <BorderColor>
> >> <Default>LightGrey</Default>
> >> </BorderColor>
> >> <BackgroundColor>#6e9eca</BackgroundColor>
> >> <Color>White</Color>
> >> <PaddingRight>2pt</PaddingRight>
> >> <PaddingTop>2pt</PaddingTop>
> >> </Style>
> >> <CanGrow>true</CanGrow>
> >> <Value>=Fields!MyMeasure.Value</Value>
> >> </Textbox>
> >> </ReportItems>
> >> </TableCell>
> >> <TableCell>
> >> <ReportItems>
> >> <Textbox Name="textbox5">
> >> <rd:DefaultName>textbox5</rd:DefaultName>
> >> <ZIndex>2</ZIndex>
> >> <Style>
> >> <BorderStyle>
> >> <Default>Solid</Default>
> >> </BorderStyle>
> >> <PaddingLeft>2pt</PaddingLeft>
> >> <PaddingBottom>2pt</PaddingBottom>
> >> <FontFamily>Tahoma</FontFamily>
> >> <FontWeight>700</FontWeight>
> >> <BorderColor>
> >> <Default>LightGrey</Default>
> >> </BorderColor>
> >> <BackgroundColor>#6e9eca</BackgroundColor>
> >> <Color>White</Color>
> >> <PaddingRight>2pt</PaddingRight>
> >> <PaddingTop>2pt</PaddingTop>
> >> </Style>
> >> <CanGrow>true</CanGrow>
> >> <Value>
> >> </Value>
> >> </Textbox>
> >> </ReportItems>
> >> </TableCell>
> >> </TableCells>
> >> <Height>0.21in</Height>
> >> </TableRow>
> >> </TableRows>
> >> </Header>
> >> <Sorting>
> >> <SortBy>
> >> <SortExpression>=Fields!MyMeasure.Value</SortExpression>
> >> <Direction>Ascending</Direction>
> >> </SortBy>
> >> </Sorting>
> >> <Grouping Name="table1_MyMeasure">
> >> <GroupExpressions>
> >>
> >> <GroupExpression>=Fields!MyMeasure.Value</GroupExpression>
> >> </GroupExpressions>
> >> </Grouping>
> >> </TableGroup>
> >> </TableGroups>
> >> <Width>4.5in</Width>
> >> <Details>
> >> <TableRows>
> >> <TableRow>
> >> <TableCells>
> >> <TableCell>
> >> <ReportItems>
> >> <Textbox Name="textbox3">
> >> <rd:DefaultName>textbox3</rd:DefaultName>
> >> <ZIndex>1</ZIndex>
> >> <Style>
> >> <BorderStyle>
> >> <Default>Solid</Default>
> >> </BorderStyle>
> >> <PaddingLeft>2pt</PaddingLeft>
> >> <PaddingBottom>2pt</PaddingBottom>
> >> <FontFamily>Tahoma</FontFamily>
> >> <BorderColor>
> >> <Default>LightGrey</Default>
> >> </BorderColor>
> >> <PaddingRight>2pt</PaddingRight>
> >> <PaddingTop>2pt</PaddingTop>
> >> </Style>
> >> <CanGrow>true</CanGrow>
> >> <Value>
> >> </Value>
> >> </Textbox>
> >> </ReportItems>
> >> </TableCell>
> >> <TableCell>
> >> <ReportItems>
> >> <Textbox Name="MyMeasure4">
> >> <rd:DefaultName>MyMeasure4</rd:DefaultName>
> >> <Style>
> >> <BorderStyle>
> >> <Default>Solid</Default>
> >> </BorderStyle>
> >> <PaddingLeft>2pt</PaddingLeft>
> >> <PaddingBottom>2pt</PaddingBottom>
> >> <FontFamily>Tahoma</FontFamily>
> >> <BorderColor>
> >> <Default>LightGrey</Default>
> >> </BorderColor>
> >> <PaddingRight>2pt</PaddingRight>
> >> <PaddingTop>2pt</PaddingTop>
> >> </Style>
> >> <CanGrow>true</CanGrow>
> >> <Value>=Fields!MyMeasure4.Value</Value>
> >> </Textbox>
> >> </ReportItems>
> >> </TableCell>
> >> </TableCells>
> >> <Height>0.21in</Height>
> >> </TableRow>
> >> </TableRows>
> >> </Details>
> >> <Header>
> >> <TableRows>
> >> <TableRow>
> >> <TableCells>
> >> <TableCell>
> >> <ReportItems>
> >> <Textbox Name="textbox2">
> >> <rd:DefaultName>textbox2</rd:DefaultName>
> >> <ZIndex>5</ZIndex>
> >> <Style>
> >> <BorderStyle>
> >> <Default>Solid</Default>
> >> </BorderStyle>
> >> <TextAlign>Right</TextAlign>
> >> <PaddingLeft>2pt</PaddingLeft>
> >> <PaddingBottom>2pt</PaddingBottom>
> >> <FontFamily>Tahoma</FontFamily>
> >> <FontWeight>700</FontWeight>
> >> <FontSize>11pt</FontSize>
> >> <BorderColor>
> >> <Default>LightGrey</Default>
> >> </BorderColor>
> >> <BackgroundColor>SteelBlue</BackgroundColor>
> >> <Color>White</Color>
> >> <PaddingRight>2pt</PaddingRight>
> >> <PaddingTop>2pt</PaddingTop>
> >> </Style>
> >> <CanGrow>true</CanGrow>
> >> <Value>My Measure</Value>
> >> </Textbox>
> >> </ReportItems>
> >> </TableCell>
> >> <TableCell>