Wednesday, March 30, 2005

Reporting Services Filtering

I am on security doubt on how to design a report that must show the accounts
of a customer.
I have an aspx page showing the customer info , then he must push a button a
see its accounts on a report generated by Reporting Services.
Obviously the report can not be accesed via a Customer parameters because
another users could see any customer 's accounts.

I am looking for a soolution for it and I am thinking in generating a temp table with a random Id/Ticket/GUID/whatever an pass it by parameter.

Tuesday, March 22, 2005

Reporting Services Security

Last week i needed to design some reports with Microsoft Sql Server Reporting Services.
These reports 'll be shown on a demo and prefered not to show login windows when a report needed to de displayed, so that i have to way to make it. One was to use the viewer using the SOAP API published at http://www.codeproject.com/useritems/SQLRSViewer.asp.
The another one was to configure Reporting Services so as to work with a "hardcoded user".
To do that you must :

Open Internet Information Server Manager
Go to ReportServer Website properties
Go to Directory Security Tab
Edit the authentication methods
Enable Anonymous Access
Write a valid user/password for Reporting Services




Then on the web.config of ReportServer WebSite add/modify theses tags




add/modify the authentication mode Tag with the value "Windows"

add/modify the "autorization" Tag
add/modify the "allow users" Element with the value "*"
close the "autorization" Tag

add/modify the "identity impersonate" Tag with the value "true"



Restart your ReportServer Web Site, and now you can see your reports without being asked for a user/password login window.



Any question email me to fhunth@hotmail.com





Fernando Hunth
Senior Developer
3DCE Microsoft Certified Developer
fernando@huddle.com.ar



Huddle Group S.A. Enterprise Technology Services Microsoft Certified Partner

Ciudad de Buenos Aires ยท Argentina
www.huddle.com.ar

Thursday, March 17, 2005

rsReportServerDatabaseUnavailable on Reporting Services

Today i wanted to publish some reports i have designed for Microsoft SqlServer Reporting Services and i begin to experiment some errors.

I got the error that server doesn't exist or access is denied.

The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable) Get Online Help
SQL Server does not exist or access denied.

Before two hours i realized that the server ip had changed, so that affected the Reporting Services Configuration.

I firstly solved it modifying my Hosts file a c:\windows\system32\drivers\etc with the new ip number.

Then i found that it can be solved with the rsconfig Utility

You can read its usage at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSUIREF/htm/cpu_rsconfig_v1_5f1e.asp?frame=true

So that i left my hosts file as was, and tested the solution with the rsconfig utility.
I opened the Command Prompt

and executed a line like this

rsconfig -c -sMyServerName -dReportServer -awindows -uDomain\Account -pMyPassword

And all becomes working fine.

DataGrid FAQ

I had thought to publish each item of the FAQ separately, but I 'll publish the complete list.

That is the complete list about Winforms Datagrid FAQ.


How can I programatically set the rowheight of a row in my Datagrid?
How can I autosize the rowheights in my datagrid?
How do I prevent sorting a single column in my Datagrid?
How do I programmatically select a row in Datagrid?
How can I translate a point to a cell in the datagrid?
I lost the settings in my Datagrid set during design-time?
How do I prevent a click into the grid highlighting a cell?
How do I prevent the datagrid from displaying its append row (the row at the end with an asterisk)?
How can I put a combobox in a column of a datagrid?
How can I catch a double-click into a column header cell?
How can I select the entire row when the user clicks on a cell in the row?
How can I get text from a column header in a MouseUp event?
How do I hide a column?
How do I color a individual cell depending upon its value or some external method?
How can I put a checkbox in a column of my Datagrid?
How can I restrict the keystrokes that will be accepted in a column of my datagrid?
How do I make a field auto increment as new rows are added to my datagrid?
How can I prevent a particular cell from being editable?
How do I move columns in a datagrid?
How can I do cell by cell validation in a datagrid?
How do I programmatically determine the selected rows in a datagrid?
How can I move rows by dragging the row header cell?
I want to do custom handling of special keys such as the Tab key or F2 in the TextBox of a column in the Datagrid. How do I subclass this TextBox to get at it virtual members?
How can I have a column of icons in my datagrid?
How can I tell if the current row has changed and whether I am on the AddNew row or not?
How do I hide the gridlines or set them to a particular color?
How can I get the selected text in an active gridcell?
How do I determine whether a checkbox in my datagrid is checked or not?
How can I bind the datagrid to a datasource without using any wizards?
How can I bind two datagrids in a Master-Detail relationship?
How do I get the row or column that has been clicked on?
How do I add an unbound column to my bound datagrid?
How do I get the row and column of the current cell in my datagrid?
How can I prevent the Enter key from moving to the next cell when the user is actively editing the cell and presses Enter?
How do I set the width of a column in my Datagrid?
How can I implement OLE Drag & Drop between a Datagrid and another OLE DnD object that supports the Text format?
How can I make my Datagrid support a single select mode, and not the default multiselect mode?
How can I get celltips or tooltips to vary from cell to cell in my Datagrid?
How can I get notification of the changing of a value in a column of comboboxes within my datagrid?
How can I make the datagrid have no currentcell?
How can I make my grid never have an active edit cell and always select whole rows (as in a browser-type grid)?
I have hidden (column width = 0) columns on the right side of my datagrid, but tabbing does not work properly. How can I get tabbing to work?
How can I get the number of rows in my Datagrid?
How do I format a date column in a datagrid?
How can I change the width of the row headers or hide them?
How do I catch a doubleclick in my datagrid?
How can I make my last column wide enough to exactly occupy all the client area of the datagrid?
How can I prevent my user from sizing columns in my datagrid?
How can I catch the bool values changing in a DataGridBoolColumn?
When I click on a row header, the row is selected and no cell is active. How can I do this programmatically?
How can I force the vertical scrollbar in my Datagrid to always be visible?
How can I autosize a column in my datagrid?
How can I get rid of the error icon that appears when there is an editing error?
How do I find the top-left visible cell in a datagrid?
I want to display negative values with a CR suffix, instead of a minus sign. How can I perform custom formatting on the cells in my datagrid?
I want to do sort of a database join of two tables. How can I use data from two DataTables in a single Datagrid?
How do I display a column of buttons such as pushbuttons or combobox buttons?
How can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key?
How can I enable column selections in my datagrid?
How do I programmatically scroll the datagrid to a particular row?
How can I place text in the rowheader column of my datagrid?
How do I set default values for new rows in my datagrid?
How do I iterate through all the rows and columns in my datagrid?
How can I specially color only the currentcell of my readonly datagrid?
How can I make the Enter Key behave like the Tab Key and move to the next cell?
How do I use the DataColumn.Expression property to add a computed/combined column to my datagrid?
How can I change the font used in a grid cell on a cell by cell or row by row basis?
How can I use a mouse to select cell ranges in my datagrid?
How can I control the cursor over my Datagrid?
How can I programatically add and remove columns in my Datagrid without modifying the DataTable datasource?
How can I have a column of bitmaps in a Datagrid?
How can I add my custom columnstyles to the designer so I can use them in my Datagrid at design time?
After scrolling with the mouse wheel on a selected row in a Datagrid I cannot get it back into view. Is there a work around?
How can I make the Datagrid column be blank and not display (null) as the default value?
How can I add a DateTimePicker column style to the Datagrid?
How do I determine the DataGridTableStyle MappingName that should used for a Datagrid to make sure the grid uses my tablestyle?
I have a derived DataGridColumnStyle. From within my Paint override, how can I get at other values in the Datagrid?
How do I retrieve the current row from a DataTable bound to a Datagrid after the grid has been sorted?
How can I catch when the user clicks off the grid, say to close the form?
How can I get a CheckBox column in a Datagrid to react to the first click?
How can I use events to restrict key input to grid cells?
How can I format columns in my Datagrid without explicilty adding DataGridColumnStyles?
How can I auto-adjust keyboard input? For example, make typing 12312002 be taken as a valid date, 12/31/2002.
Can I display the rows in my datagrid in a free-form layout using textboxes on a panel?
How can I tell whether a scrollbar is visible in my Datagrid is visible?
How do I autosize the columns in my Datagrid so they always fill the the grid's client area?
How can I prevent all the cells in my Datagrid from being edited without deriving GridColumnStyle?
How can I prevent the plus-minus icon that appears next to the row header when I have a datagrid displayed bound to a datasource that has a relation defined?
How can I display master-details-details in three separate grids?
In my datagrid, if I press tab to enter a column using a derived columnstyle, the column does not receive focus. Why?
How can I detect when a cell starts being edited, not when it becomes current?

Wednesday, March 16, 2005

How can I programatically set the rowheight of a row in my Datagrid?

How can I programatically set the rowheight of a row in my Datagrid (Winforms)?

One way you can change the height of a row is to use reflection to access the Datagrid internal row objects which are not publicly exposed.
Here are both VB and C# sample projects showing how you might do this.
The sample provides a class that you can instantiate by passing a Datagrid, creating a rowHeights object.
Once you create this object, you can use an indexer on the object to set and get the rowheights.

That was originally published at SyncFusion but it is no more available.