Archive for Juli, 2010

Session Timeout Reporting Service ändern

Daniel Snellen

In einem Projekt mit sehr sensiblen Daten und einem externen Zugriff auf die Reports, kam die Anforderung auf den Session Timeout anzupassen um die Datensicherheit zu erhöhen.

Der Session Timeout im Reporting Server ist nach der Installation 600 Sec = 10 Min.

Diesen kann man jedoch ändern.

Als erstes erstellt man die Datei sessionTimeout.rss mit folgendem Inhalt

Public Sub Main()
    Dim props() as [Property]
    props = new [Property] () { new [Property]()}

    props(0).Name = "SessionTimeout"
    props(0).Value = timeout

    rs.SetSystemProperties(props)
End Sub

 

Als nächstes führt man folgenden Befehl aus dem Verzeichnis aus, in dem die sessionTimeout.rss gespeichert wurde.

rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="300"

Die Angabe des Timeoutwertes ist in Sekunden.

RS.exe ist das Scripting Tool für den Reporting Service nähere Infos HIER

  • Share/Bookmark

Firefox und Windows integrierte Anmeldung

Daniel Snellen

Wenn man mit dem Firefox auf einen Webserver zugreifen möchte, welcher mit Windows Integrierter Anmeldung arbeitet, wird man zur Eingabe des Benutzernamen und Passwort aufgefordert.

Sobald mit Reporting Service und Datenquellen mit Windows Integrierter Authentifizierung gearbeitet werden soll, sind diese Einstellungen notwendig.

Man kann den Firefox so konfigurieren, das er den Angemeldeten Domain Benutzer an die Webseite übergibt.

1. In der Adresszeile des Firefox muss about:config eingegeben werden.

2. Es erscheint als erstes eine Warnung in dieser wird man auf mögliche Risiken hingewiesen
image

3. Es müssen zwei Parameter angepasst werden.

  • network.negotiate-auth.delegation-uris
  • network.negotiate-auth.trustes-uris

Durch einen Doppelklick auf den jeweiligen Parameter öffnet sich das Eingabefenster.
Hier muss die URL des Webservers eingetragen werden.
image

Durch Komma getrennt können auch mehrere Webserver eingetragen werden.

Der Eintrag sollte bei beiden Parametern identisch sein.

  • Share/Bookmark

ClickOnce Anwendungen im Firefox

Daniel Snellen

Um eine sogenannte ClickOnce Anwendungen im Firefox zu starten wird ein Addon benötigt.

Eine ClickOnce Anwendungen ist z.B. der Report Builder (2.0 und 3.0), dabei kann man die Anwendung aus der Webseite heraus starten, ohne diese vorher installiert zu haben.

Das nach bisherigen Erkenntnissen beste Addon wurde von Microsoft bereitgestellt.

https://addons.mozilla.org/de/firefox/addon/9449

Addon Installieren

Zum installieren des Addons öffnet man den Firefox und ruft dort die URL des Addon auf.
https://addons.mozilla.org/de/firefox/addon/9449

image

Als nächstes muss die Schaltfläche Continue to Download betätigt werden.

Nun noch die Lizenzbedingungen bestätigen.

image
und die Installation starten.

Abschließend muss der Firefox neugestartet werden
image

Als Systemvoraussetzung setzt das Addon .NET Framework 3.5 SP1 voraus.
Leider lässt es sich aber auch Installieren wenn die Voraussetzung nicht erfüllt ist, es erscheint auch keine Fehlermeldung.

  • Share/Bookmark

Alternierende Hintergrundfarbe für Detail- und Gruppenzeilen

Arno Cebulla

Alternierende Hintergrundfarben für Detailzeilen lassen sich mit folgendem Ausdruck in die Hintergrund-Eigenschaft der Zeile darstellen:

=IIF(RowNumber(NOTHING) Mod 2,"WhiteSmoke","Transparent")
 

Auch Gruppen lassen sich mit wechselnden Hintergrundfarben darstellen. Hierfür wird der Ausdruck

=IIF(RunningValue(<Gruppenfeld>,CountDistinct,Nothing) MOD 2,"Gainsboro","Silver")
 

in der Hintergrundeigenschaft des Gruppenfeldes gesetzt. <Gruppenfeld> wird dann durch die entsprechende Feldbezeichnung der Gruppe ersetzt.

Beispiel: Eigenschaft Hintergrund in Subcategory:

=IIF(RunningValue(Fields!Subcategory.Value,CountDistinct,Nothing) MOD 2,"Gainsboro","Silver")

Eigenschaft Hintergrund in Product: sh. oben

Ergebnis:

 

Matrix mit alternierendem Hintergrund für Subcategory (Gruppe) und Product (Details)

  • Share/Bookmark

Creating your own SSRS map using Visio

Hilmar Buchta

SQL Server 2008 R2

In my last post I mentioned creating a map by yourself as one possible use case for the Visio-To-SQL-Server geo data export. In this post I will give you some details how this can be done.

First, we need some kind of a map. For this post I’m using a map of Europe which I found as a PNG file at Wikipedia: http://upload.wikimedia.org/wikipedia/commons/6/64/Europe_capitals_map_de.png

The image is then inserted into a blank Visio file. You should make it as large as possible (use landscape orientation). Then, we’re ready to begin. We’re using the freeform tool to follow the coast lines. In my case I’m creating a map for UK and Ireland. Note that you can interrupt the process at any time and continue using the freeform tool later. Also, don’t bother too much with the details by now.

image 

Finally, the curve needs to be closed. Visio shows this by actually filling the area using the default fill color:

image

If you missed the start point, it’s not a problem as you can correct every single point of your curve and also add new control points using the pencil tool. Before doing so, you should add your recently created shape to a new Visio layer and set the transparency of the layer to an appropriate value (e.g. 20%) so you can see both, the sheet and the map image. Now you should work at a higher zoom level to detail out the border lines as shown below. Note that you can CTRL+click any control point to see and modify the curve control.

image

Your final result may look somewhat like this

image

Please note that we didn’t care about the country borders in this step (as you can see from Ireland) but just about the coastlines.

Next we’re going to model the border between UK and Ireland. Therefore we need to create some kind of tool shape in order to cut out the corresponding part. To make our work easier, we’re going to hide our GEO layer, so we’re only seeing the map now. We then draw the shape of the border line. Please note that the shape is extended to the sea side as we don’t want to risk that some parts of the underlying shape are not cut out.

image

The next steps are a little bit confusing if you perform them for the first time. Here is what we are going to do:

  1. Make the hidden GEO layer visible again.
  2. We can now see all of our drawn shapes including the tool shape. As the tool shape was create at a later time it is in front of our original shapes.
  3. Mark the basic shape for Ireland first and then the tool shape while pressing CTRL. It is important to do it this way.
  4. Copy both shapes to the clipboard for later use
  5. Do a shape substract operation. Depending on your version of Excel it’s a menu entry at shape>operation>subtract or maybe you have to consult the help file
  6. This results in Ireland having the topmost part cut out
  7. Paste the two shapes from step 4 back into the sheet
  8. Do a shape intersect operation
  9. Move the resulting shape back into position (use the SHIFT key together with the arrow keys to position the shape properly)

 

The result should look somewhat like this:

image

Next we’re going to group all the shapes for UK (don’t forget the islands) together into one shape. We set the text for this shape to “United Kingdom”. Ireland consists of a single shape in my example so we just have to name it accordingly. image

These shapes are already what we need for our lines layer in the SSRS map. The lines layer will only be visible as border lines and will be on top of our map. To make this happen, we mark both shapes and create a copy (copy+paste), then move the copy to the same location as the original shapes. While the copied shapes are still marked we add them to a new layer called LINES. We can then hide the LINES layer as it would only be confusing for our next steps.

Now, by using exactly the same tools as above, we’re going to create the sales regions North, Middle and South. If you have problems with the intersection and the subtract tools, you may need to un-group your shapes before using one of the combine-tools. In my example, the sales regions do not match the country borders. I therefore first combine the two shapes on the island of Ireland together to one shape. Next I’m cutting the whole map into three pieces. In the next screenshot I colored the pieces to make it more clear:

image

All shapes with the same color are grouped together into a single shape. We name the shape according to our sales regions: North, Middle and South. Now we’re almost finished. We now move all the shapes for our sales regions to a new layer called INTERACTIVE and remove all layers except INTERACTIVE and LINES. We can now set both layers to visible again. Maybe some shapes from the INTERACTIVE layer have to be pushed into the background but then the final result should look like this:

image

Note that the sales regions do not match the border in Ireland.

Using the same macro as described in my last blog post I’m exporting the Visio data into a SQL table called UK_Map. In this case we end up with two layers (no layer 0 as we don’t have any background polygons as the park house in my last post):

Layer 1
(interactive layer)
Layer 2
(line overlay)
image image

 

In order to have the three different sales region colored by their sales we have to provide some sales data. In this case, I’m going the easy way and provide only the following three lines:

SalesRegion    SalesValue
North    400
Middle    900
South    700

 

So this is how the final report looks like. Note that the country borders do not match the sales region but are still visible (lines layer). 

image

Of course we could also add some major cities or more details but for today, I think we did enough.

  • Share/Bookmark

Druckansicht mit Kopf- und Fußzeile bei Reports im Sharepoint

Arno Cebulla

Bei der Anzeige im Sharepoint sind Kopf- und Fußzeile in einem Report oft unerwünscht, da z.B. das Logo bereits auf der Sharepointseite angezegit wird,. Beim Ausdruck sollen die Zeilen dann wieder angezeigt werden. Hier ein Workaround:

 1. Ein Report „Sub1“ wird ohne Header und Footer, incl. Parameter für die Ansicht im Sharepoint erstellt.

 2. Dem Report wird ein Textfeld „Druckansicht“ hinzugefügt:

 

 3.  Ein Parameter“@Print“ mit Datentyp Integer wird erstellt.

 4. In den Properties der Textbox wird unter „Visibility“ der Punkt „Show or hide based on an expression“ ausgewählt und folgende Expression eingegeben:

   =Parameters!Print.Value <> 0

 5. Nun wird ein neuer Report mit Header und Footer erstellt. Dieser „Master“-Report muss die gleichen Parameter wie der o.g. Report enthalten.

 6. Dem Master-Report wird eine Matrix hinzugefügt. Die Zeile für die Spaltenüberschriften sowie die Spalte für die Zeilenbeschriftung wird gelöscht. In das verbleibende

     Feld „Data“ wird nun ein Subreport eingefügt.

 7. Als Subreport wird „Sub1“ ausgewählt. Die Parameter werden an den Report übergeben. Der Parameter „@Print“ erhält den Wert 1.

 8. Der Master-Report wird gespeichert.

 9. In der Designansicht von „Sub1“ werden die Properties der Textbox „Druckansicht“ ausgewählt.

10. Unter „Action“ wird der Punkt „Go to Report“ aktiviert. Als Report wird der „Master“-Report  ausgewählt. Die Parameter werden hinzugefügt.

 

Der Report „Sub1“ kann nun gestartet werden. Bei Klick auf „Druckansicht“ wird der Report mit Header und Footer angezeigt.

 

Sharepoint-Ansicht

 

Druckansicht

  • Share/Bookmark

How to use an Excel 2003 file as a datasource for an SSAS cube

Hilmar Buchta

SQL Server 2005 | SQL Server 2008 | SQL Server 2008R2

Ok, usually you wouldn’t want to use an Excel file directly as a datasource for an SSAS cube in real life scenarios. But just in case you’d like to set up a quick demo without bothering to create a new database using Microsoft SQL Server or maybe Microsoft Access, the ability of sourcing your cube from an Excel file could be more than welcome. Just imagine you want to try some design ideas. While working with SQL server databases you would end in a large amount of test databases or you would need to backup/restore your databases all the time to test different scenarios. With Excel as a source for your cubes you could put your test data right into your SSAS solution. In order to modify the datasource you can simple make a copy of your Excel file (for backing up the older version) or of your solution instead of caring about databases. And even if you don’t have the databases installed you can use any of your testing solutions by just opening the solution as the data becomes part of the solution.

Sounds good, doesn’t it? But how can you do so? First, when trying to set Excel as an OLE-DB source you will notice that it just isn’t there.

image

But what we can do, is to use the Microsoft Jet 4.0 OLE DB Provider. So that’s where we start. The next dialog asks us to provide the database file name.

image

If you click on the ‘Browse…’ button you will notice that the selection is limited to .mdb-files or .accdb-files as the Jet OLE-DB provider as usually used with Microsoft Access databases. So we just change our file type selection to ‘All files’ and pick our Excel file.

image

Now, if you click on ‘Test connection’ you will get an error message like the one below:

image

Our Jet OLE-DB provider still believes, that we are connecting to a Microsoft Access database file and therefore it cannot connect. So here comes the really important step. We open our connection again, click on the ‘Edit’ button to edit the connection string and then we switch to the ‘All’ tab of the connection properties.

image

As shown in the screenshot we have to set the extended properties to ‘Excel 8.0;HDR=Yes;IMEX=1;’.

Excel 8.0 stands for Excel 2003 (I couldn’t get Excel 2007 to connect properly using ‘Excel 9.0′, so I stayed with the Excel 2003 format here). ‘HDR=Yes’ means that our Excel tables contain headers.

After that, a click on ‘Test Connections’ gives the desired result:

image

Of course, we now need to build up our Excel-file. Each "source table" sits on its own sheet. You can easily build up some time dimension or use Excel functions like RAND() to create random fact data or VLOOKUP(…) to link your tables with testing data to each other.

image

Although this is not at all useful for real life situations (as we would extract the data from the Excel sheet using ETL tools or simply not storing the source data in Excel at all), this might still be useful in order to set up a quick and dirty example solution and play around by modifying the source data (add columns, use different formats etc.) without the need to work on a ‘real’ database.

  • Share/Bookmark

  • Kategorien

  • Copyright © ORAYLIS Blog. All rights reserved.