<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Scott Booth's Blog</title><link>http://blogs.parivedasolutions.com/scott.booth/</link><description /><managingEditor>Scott Booth</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Scott Booth</dc:creator><title>Converting DateTime to Hex in C#</title><link>http://blogs.parivedasolutions.com/scott.booth/archive/2007/01/15/335.aspx</link><pubDate>Mon, 15 Jan 2007 17:44:00 GMT</pubDate><guid>http://blogs.parivedasolutions.com/scott.booth/archive/2007/01/15/335.aspx</guid><wfw:comment>http://blogs.parivedasolutions.com/scott.booth/comments/335.aspx</wfw:comment><comments>http://blogs.parivedasolutions.com/scott.booth/archive/2007/01/15/335.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.parivedasolutions.com/scott.booth/comments/commentRss/335.aspx</wfw:commentRss><trackback:ping>http://blogs.parivedasolutions.com/scott.booth/services/trackbacks/335.aspx</trackback:ping><description>&lt;P&gt;If you ever have a situation in which you need to convert a DateTime data type into hex, here's an easy way to do so:&lt;/P&gt;
&lt;P&gt;If you do this conversion often, use constant: &lt;BR&gt;&amp;nbsp; &amp;nbsp;const long ticks1970 = 621355968000000000; // .NET ticks for 1970 &lt;BR&gt;
&lt;P&gt;This constant was generated with: &lt;BR&gt;&amp;nbsp; DateTime dt70 = new DateTime( 1970, 1, 1, 0, 0, 0, 0 ); &lt;BR&gt;&amp;nbsp; long ticks1970 = dt70.Ticks; &lt;BR&gt;
&lt;P&gt;get current time:&amp;nbsp;&lt;BR&gt;&amp;nbsp;int gmt = (int) ((DateTime.UtcNow.Ticks - ticks1970 ) / &lt;B style="COLOR: black; BACKGROUND-COLOR: #ffff66"&gt;10000000L&lt;/B&gt;); &lt;BR&gt;String hexDate = gmt.ToString(&amp;#8220;X2&amp;#8220;);&lt;/P&gt;
&lt;P&gt;or you can convert back: &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;int gmt = 0x3e482b89; // sample GMT time in seconds since 1970 &lt;BR&gt;&amp;nbsp; &amp;nbsp;DateTime yourDateTime = new DateTime( ticks1970 + gmt * &lt;B style="COLOR: black; BACKGROUND-COLOR: #ffff66"&gt;10000000L&lt;/B&gt; ); &lt;/P&gt;&lt;img src ="http://blogs.parivedasolutions.com/scott.booth/aggbug/335.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Scott Booth</dc:creator><title>Adding Values From Data Set to Page Headers/Footers in Reports ASP.Net 2.0</title><link>http://blogs.parivedasolutions.com/scott.booth/archive/2006/07/18/254.aspx</link><pubDate>Tue, 18 Jul 2006 17:49:00 GMT</pubDate><guid>http://blogs.parivedasolutions.com/scott.booth/archive/2006/07/18/254.aspx</guid><wfw:comment>http://blogs.parivedasolutions.com/scott.booth/comments/254.aspx</wfw:comment><comments>http://blogs.parivedasolutions.com/scott.booth/archive/2006/07/18/254.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blogs.parivedasolutions.com/scott.booth/comments/commentRss/254.aspx</wfw:commentRss><trackback:ping>http://blogs.parivedasolutions.com/scott.booth/services/trackbacks/254.aspx</trackback:ping><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;Needing to add values from your database to the page header or footer is pretty common in reports.&amp;nbsp; Everything I've found to date has said that in Asp.Net 2.0 local reporting services, you could not add any values from your data set to the page header or footer.&amp;nbsp; The data set values can only be used within the body.&amp;nbsp; This statement is true.&amp;nbsp; However, you can use the &amp;#8220;value&amp;#8221; from a control in your report in the page header or footer.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;So if you have a textbox in the body of the report that stores a value from your data set, you can add a textbox (or any control) to the header, and type &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&amp;#8220;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;=First(ReportItems!Customer.Value)&amp;#8220; in the expression for this textbox.&amp;nbsp; The &amp;#8220;ReportItems&amp;#8220; part of the expression tells the report to find the control called &amp;#8220;Customer&amp;#8220; and retrieve the first value in it.&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;It's important to note that &amp;#8220;Customer&amp;#8220; is the name of my textbox control in the body.&amp;nbsp; Not the name of the field from the data set. You could also use &amp;#8220;Last&amp;#8220; in the expression to return the last value instead of the first.&amp;nbsp; With this expression, the customer name that is in the textbox will be printed in the header of the report.&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://blogs.parivedasolutions.com/scott.booth/aggbug/254.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Scott Booth</dc:creator><title>Tips for Creating SubReports With Reporting Services in Asp.Net 2.0</title><link>http://blogs.parivedasolutions.com/scott.booth/archive/2006/03/02/237.aspx</link><pubDate>Thu, 02 Mar 2006 12:00:00 GMT</pubDate><guid>http://blogs.parivedasolutions.com/scott.booth/archive/2006/03/02/237.aspx</guid><wfw:comment>http://blogs.parivedasolutions.com/scott.booth/comments/237.aspx</wfw:comment><comments>http://blogs.parivedasolutions.com/scott.booth/archive/2006/03/02/237.aspx#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://blogs.parivedasolutions.com/scott.booth/comments/commentRss/237.aspx</wfw:commentRss><trackback:ping>http://blogs.parivedasolutions.com/scott.booth/services/trackbacks/237.aspx</trackback:ping><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;Creating subreports in asp.net 2.0 proved to be very difficult since there is limited documentation on it.&amp;nbsp; If you don't have all the properties and necessary objects and values just right, you will receive the uninformative message &amp;#8220;Error: Subreport can not be shown.&amp;#8220;.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;This error can mean lots of things.&amp;nbsp; Check your stored procedure and data layer to insure that all the objects variables are correct.&amp;nbsp; Then check all your parameter names, data source names, and report names to ensure they match.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;The MSDN is a good starting place to see how to create subreports.&amp;nbsp; Below is some useful tips that aren't explained in the MSDN.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;In the report viewer of the main report, the subreport Name property must be the exact filename of the subreport minus the file extension.&amp;nbsp; So if your subreport is &amp;#8220;MySubReport.rdlc&amp;#8220;, you would specify the name as &amp;#8220;MySubReport&amp;#8220;.&amp;nbsp; &lt;/SPAN&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;If you subreport takes any parameters, the parameter name in your subreport rdlc file must match the parameter name in the subreport in the report viewer.&amp;nbsp; To view/create these parameters. right click on the subreport in the report viewer, click the parameter tab.&amp;nbsp; Type the name of the param and specify the value for it.&amp;nbsp; If you are using a field from the report, depending on the data type and param data type, you might need to append &amp;#8220;.ToString()&amp;#8220; in order to get an acceptable data type.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;One of the keys to using subreports is dynamically adding the data source for the subreport to use.&amp;nbsp; To do this, add an event handler in the page load for&amp;nbsp;the SubreportProcessing Event:&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt"&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(ItemsSubreportProcessingEventHandler);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;In the &amp;#8220;ItemsSubreportProcessingEventHandler&amp;#8220;, you can create your data source.&amp;nbsp; The first argument in the ReportDataSource must be the data source name specified in your rdlc file.&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;If you are passing parameters to you subreport, you must specify them in your data source as well.&amp;nbsp; The SubreportProcessEventArgs has a property that stores the parameters pased to the subreport.&amp;nbsp; You can capture these parameters and add them to your data source parameter list.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;void ItemsSubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;if (odsItems == null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;odsItems = LoadItemsData();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;if (e.Parameters.Count &amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;if (odsItems.SelectParameters.Count &amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;odsItems.SelectParameters.RemoveAt(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;odsItems.SelectParameters.Add(new Parameter("JobId", TypeCode.String, e.Parameters[0].Values[0].ToString()));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;e.DataSources.Add(new ReportDataSource("LandscapeItemsInstalledReport", odsItems));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;private ObjectDataSource LoadItemsData()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;ObjectDataSource ods = new ObjectDataSource();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;ods.TypeName = "Gpe.Operations.Business.LandscapeItemsInstalledBC";&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;ods.SelectMethod = "GetSodTicketItems";&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=1&gt;return ods;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Arial size=1&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Arial size=1&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;
&lt;P&gt;&lt;FONT face=Arial size=1&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/P&gt;&lt;img src ="http://blogs.parivedasolutions.com/scott.booth/aggbug/237.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Scott Booth</dc:creator><title>ASP.net 2.0 - Reports 101</title><link>http://blogs.parivedasolutions.com/scott.booth/archive/2006/01/23/230.aspx</link><pubDate>Mon, 23 Jan 2006 10:59:00 GMT</pubDate><guid>http://blogs.parivedasolutions.com/scott.booth/archive/2006/01/23/230.aspx</guid><wfw:comment>http://blogs.parivedasolutions.com/scott.booth/comments/230.aspx</wfw:comment><comments>http://blogs.parivedasolutions.com/scott.booth/archive/2006/01/23/230.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.parivedasolutions.com/scott.booth/comments/commentRss/230.aspx</wfw:commentRss><trackback:ping>http://blogs.parivedasolutions.com/scott.booth/services/trackbacks/230.aspx</trackback:ping><description>&lt;P&gt;To help myself remember the process to create a report in ASP 2.0, I've decided to blog it here...&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; This is only the basic steps to create a simple local report using data objects.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;1. Create Stored Procedure to capture the data for the report&lt;/P&gt;
&lt;P&gt;2. If an object does not already exist to store this data, create the class for the properties, the data layer (DAO), and business container(BC).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;3. Right click in your project, select New Item, then Report.&amp;nbsp; This will create a new RDLC file that you will use to create the report layout.&lt;/P&gt;
&lt;P&gt;4. Create your datasource for the RDLC.&amp;nbsp; In the RDLC file, click Report-&amp;gt;&amp;nbsp;Data Sources.&amp;nbsp; If you don't see &amp;#8220;Report&amp;#8220; in the menu bar, click the RDLC file.&amp;nbsp; The menu bar should refresh.&amp;nbsp; Select the BC that returns the list of your data.&amp;nbsp; Click Add to Report.&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; This seems to be kind of buggy.&amp;nbsp; There have been times when no available data sources displays.&amp;nbsp; If this happens, try recompiling your solution.&amp;nbsp; If no data sources still displays, close the solution and reopen it.&amp;nbsp; If still nothing, try rebooting your computer.&amp;nbsp; Not sure why this happens, but eventually you will see the list of data sources.&lt;/P&gt;
&lt;P&gt;Another thing to note, all data sources show in this list.&amp;nbsp; So all your BC, DAO, and Entity classes will show in this list.&amp;nbsp; Be sure to pick the BC.&amp;nbsp; There doesn't seem to be any rhyme or reason to how this list is sorted.&amp;nbsp; You just have to scroll through and pay attention.&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp; If you want to display a list of data, you will need a &amp;#8220;list&amp;#8220; in the body.&amp;nbsp; Drag the list from the toolbox onto the report.&amp;nbsp; Set the &amp;#8220;DataSetName&amp;#8220; property to the data source you created.&amp;nbsp; ASP.net has other controls besides a &amp;#8220;list&amp;#8220; to display data.&amp;nbsp; Check the MSDN for documentation on these other controls.&lt;/P&gt;
&lt;P&gt;6. Select the Web Data Sources on the left hand toolbar.&amp;nbsp; It shows all available data sources.&amp;nbsp; See above if nothing shows in the list.&amp;nbsp; Expand the correct data source that has your data list.&amp;nbsp; Drag the items you want onto the list.&amp;nbsp; The default items are only the First item in that list:&amp;nbsp; &amp;#8220;=First(Fields!Name.Value)&amp;#8220;.&amp;nbsp; Change this to &amp;#8220;=Fields!Name.Value&amp;#8220; to show all items in this field.&amp;nbsp; You can right click on the item, select properties to change how it looks and add a function to the item.&lt;/P&gt;
&lt;P&gt;7. Continue adding fields, and other controls to the report as needed.&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; One limitation with 2.0 Reporting Services is that you can not add a field to the page header or footer.&amp;nbsp; Or if you can, no one in Google has figured it out and is telling.&amp;nbsp; So your report titles must be generic.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;8.&amp;nbsp; When the report layout is done, create a new ASP page.&amp;nbsp; Drag the report viewer control onto the page.&lt;/P&gt;
&lt;P&gt;9. Create a new object data source that points to the BC for your data.&lt;/P&gt;
&lt;P&gt;10.&amp;nbsp; Run the project and see how you did.&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; If there is an error in the RDLC, you may see many errors like fields can not overlap a line and other formatting errors.&amp;nbsp; Typically there is only one error, like an invalid data source, that once you correct, all the other errors will go away.&lt;/P&gt;&lt;img src ="http://blogs.parivedasolutions.com/scott.booth/aggbug/230.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Scott Booth</dc:creator><title>Databinding dependent listboxes within a FormView</title><link>http://blogs.parivedasolutions.com/scott.booth/archive/2006/01/11/229.aspx</link><pubDate>Wed, 11 Jan 2006 14:01:00 GMT</pubDate><guid>http://blogs.parivedasolutions.com/scott.booth/archive/2006/01/11/229.aspx</guid><wfw:comment>http://blogs.parivedasolutions.com/scott.booth/comments/229.aspx</wfw:comment><comments>http://blogs.parivedasolutions.com/scott.booth/archive/2006/01/11/229.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blogs.parivedasolutions.com/scott.booth/comments/commentRss/229.aspx</wfw:commentRss><trackback:ping>http://blogs.parivedasolutions.com/scott.booth/services/trackbacks/229.aspx</trackback:ping><description>&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT color=#000000 size=3&gt;Today I ran into an issue trying to populate one dropdownlistbox from another within a formview.  I have a one dropdown called &amp;#8220;ddlCity&amp;#8220; and another called &amp;#8220;ddlSubdivision&amp;#8220;.  The city dropdown store cities retrieved from the Subdivision table in my database.  To shorten the list of subdivisions in the &amp;#8220;ddlSubdivision&amp;#8220; control, I want my users to select a city first.  The ddlSubidision control uses the selected city value as a parameter to a stored proc to retrieve it's values.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000 size=3&gt;I found out you can not use 2 way data binding to populate a dropdownlist from another dropdownlist within a formview thanks to Phillip Williams at &lt;/FONT&gt;&lt;A href="http://www.webswapp.com/"&gt;&lt;FONT size=3&gt;www.webswapp.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#000000 size=3&gt;.  If you try, you will get an error: &amp;#8220;"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000 size=3&gt;In order to populate a dropdownlist from another within a formview, you must remove the 2 way data binding from the dropdownlist that will be populated and will manually bind the items to the control.  First, in the ddlSubdivision, I removed the &amp;#8220;SelectedValue&amp;#8221; piece of code. Notice there is not a &amp;#8220;Bind&amp;#8220; or &amp;#8220;Eval&amp;#8220; tag.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;DropDownList&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ddlSubdivision"&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: red"&gt;DataSourceID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="odsSubdivisionList"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataTextField&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Name"&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: red"&gt;DataValueField&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Id"&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: red"&gt;OnDataBinding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="ddlSubdivision_DataBound"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Width&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="100%"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT color=#000000 size=3&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT color=#000000 size=3&gt;In the code behind file, there are 2 methods you need to add your customized code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;protected&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void&lt;/FONT&gt; frmvwPackage_ItemUpdating(&lt;FONT color=#0000ff&gt;object&lt;/FONT&gt; sender, &lt;FONT color=#008080&gt;FormViewUpdateEventArgs&lt;/FONT&gt; e)&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;{ e.NewValues[&lt;FONT color=#800000&gt;"City"&lt;/FONT&gt;] = ((&lt;FONT color=#008080&gt;DropDownList&lt;/FONT&gt;)((&lt;FONT color=#008080&gt;FormView&lt;/FONT&gt;)sender).FindControl(&lt;FONT color=#800000&gt;"ddlCity"&lt;/FONT&gt;)).SelectedValue;&lt;/P&gt;
&lt;P&gt;e.NewValues[&lt;FONT color=#800000&gt;"SubdivisionId"&lt;/FONT&gt;] = ((&lt;FONT color=#008080&gt;DropDownList&lt;/FONT&gt;)((&lt;FONT color=#008080&gt;FormView&lt;/FONT&gt;)sender).FindControl(&lt;FONT color=#800000&gt;"ddlSubdivision"&lt;/FONT&gt;)).SelectedValue; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;protected&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void&lt;/FONT&gt; ddlSubdivision_DataBound(&lt;FONT color=#0000ff&gt;object&lt;/FONT&gt; sender, &lt;FONT color=#008080&gt;EventArgs&lt;/FONT&gt; e)&lt;/P&gt;
&lt;P&gt;{&lt;FONT color=#008080&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;DropDownList&lt;/FONT&gt;&lt;FONT color=#000000&gt; ddl = (&lt;/FONT&gt;&lt;FONT color=#008080&gt;DropDownList&lt;/FONT&gt;&lt;FONT color=#000000&gt;)sender;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008080&gt;FormView&lt;/FONT&gt; frmV = (&lt;FONT color=#008080&gt;FormView&lt;/FONT&gt;)ddl.NamingContainer;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;if&lt;/FONT&gt; (frmV.DataItem != &lt;FONT color=#0000ff&gt;null&lt;/FONT&gt;)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt; strSubdivision = ddl.SelectedValue.ToString();&lt;FONT color=#008000&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#008080&gt;DropDownList&lt;/FONT&gt; ddlSubdivision = (&lt;FONT color=#008080&gt;DropDownList&lt;/FONT&gt;)frmV.FindControl(&lt;FONT color=#800000&gt;"ddlSubdivision"&lt;/FONT&gt;);&lt;FONT color=#008000&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;ddl.ClearSelection();&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008080&gt;ListItem&lt;/FONT&gt; lm = ddl.Items.FindByValue(strSubdivision);&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;if&lt;/FONT&gt; (lm == &lt;FONT color=#0000ff&gt;null&lt;/FONT&gt;)&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;{ ddl.SelectedIndex = 0; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;else&lt;/P&gt;&lt;/FONT&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;{ lm.Selected = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000 size=3&gt;Be sure to set the page directive for AutoEventWireup to False and the selected dropdownlist AutoPostBack property to True.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;img src ="http://blogs.parivedasolutions.com/scott.booth/aggbug/229.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>