Simple DataRow Navigation Question
Sep 7, 2005
Hi. I am new to ADO.NET and I can't seem to figure out how to populate a row that is a layer lower than the instantiated row. I am populating and XML file called Users.xml:
Code:
<user>
<registerDate>9/6/2005</registerDate>
<firstName>TempUser</firstName>
<lastName>TempUser</lastName>
<emailAddress>TempUser</emailAddress>
<password>5F4DCC3B5AA765D61D8327DEB882CF99</password>
<securityQuestion>TempUser</securityQuestion>
<securityAnswer>TempUser</securityAnswer>
<zipCode>TempUser</zipCode>
<uniqueID>TempUser</uniqueID>
<alternateEmail>TempUser</alternateEmail>
<gender>TempUser</gender>
<industry>TempUser</industry>
<occupation>TempUser</occupation>
<jobtitle>TempUser</jobtitle>
<maritalstatus>TempUser</maritalstatus>
<birthDay>
<month>TempUser</month>
<day>TempUser</day>
<year>TempUser</year>
</birthDay>
<homelocation>...
and, i am using the below code to access and populate the rows based on the users registration input:
Code:
Dim NewLogin As Data.DataRow = LoginDS.Tables(0).NewRow
I am able to access all the rows that are one layer into the xml file with the following code:
Code:
NewLogin("someNode") = _someNode.Text
but, how do i populate nodes that are "further down" such as "birthDay". Do i have to reinstantiate NewLogin as ...Tables(1).NewRow? I have tried various forms of this and it doesnt work. Suggestions appreciated... thanks.
View 1 Replies
ADVERTISEMENT
Jan 24, 2007
Hi all,
I'm trying to design a website with my old MS Access Application as a template, because my users know that style. I use textboxes to display data from the MSSQL 2005 database, one record and 20 fields per page ....and i would like to navigate through the records with 4 buttons: first, last, next and prior, placed on the page.I tried a lot of things, and my last attemt was a Stored Procedure with a Cursor to do the trickbut.... it did not work
It's very easy to do this in MS Access.
Can anyone tell me a simple way to do this ?
View 5 Replies
View Related
Feb 7, 2007
command.CommandText = “SELECT UserName from Users WHERE UserID = “ = userID
Executing this command returns one table with one column with one row. What is the syntax for getting that value into a variable? I can get the information into a dataSet but I can’t get it out. Should I be using a dataSet for this operation?
The rest of the code so far:
SqlDataAdapter dataAdapter = new SqlDataAdapter();
dataAdapter.SelectCommand = command;
dataAdapter.TableMappings.Add("Table", "Users");
dataSet = new DataSet();
dataAdapter.Fill(dataSet);
View 3 Replies
View Related
Jan 16, 2008
Hi,
i m pretty new to this forum and c#.net
i m doin a project in c#.net
I have four values in my datarow array
for example
DataRow[] cmb;
cmb=dsResult.Tables[0].Select("Controls Like 'cmb%'");// Here i m getting four Rows
for(i=0;i<cmb.Length;i++)
{
cmb[i]=Session["cmb'+i].ToString().Trim()//Here i m getting error;Cannot implicitly convert type 'string' to 'System.Data.DataRow'
}
How to assign my session values to them.
I want to assign my value stored in the session variable to that array.Is there any way i can do it.Can i convert datarow array to string array! Please can any one help
me.
View 6 Replies
View Related
May 14, 2007
In my BLL I have a method that adds a new row to a table in the database...
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public bool AddContact(string firstname, string lastname, string middleinit, bool active, Guid uid, bool newsletter) { ContactsDAL.tblContactsDataTable contacts = new ContactsDAL.tblContactsDataTable(); ContactsDAL.tblContactsRow contact = contacts.NewtblContactsRow();
contact.FirstName = firstname; contact.LastName = lastname; contact.MiddleName = middleinit; contact.Active = active; contact.UserID = uid; contact.Newletter = newsletter;
contacts.AddtblContactsRow(contact); int rowsAffected = Adapter.Update(contact);
return rowsAffected == 1; }
The primary key in this table is a BigInt set as an identity column....How do I capture the value of the primary key that gets created when the new row is added?
View 3 Replies
View Related
Jul 23, 2005
Hi,I have a client/server app. that uses a windows service for the server and asp.net web pages for the client side. My server class has 3 methods that Fill, Add a new record and Update a record. The Fill and Add routines work as expected but unfortunately the update request falls at the 1st hurdle.I pass two params to the remote(server) method for the update, one is the unique ID and the other is a string that is the name of the table in the database. See code below. I need the SelectedRow method to return a datarow that will then populate textbox's on another page. When the method is called I get an 'internal system error.....please turn on custom errors in the web.config file on the server for more info.(unfortunately my server is not s web server so I don't have a web.config file!!).Can anyone see anything obvious.Cheers. >>Calling routine:Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadSystem.Threading.Thread.CurrentThread.CurrentCultu re = New CultureInfo("en-GB")hsc = CType(Activator.GetObject(GetType(IHelpSC), _"tcp://192.168.2.3:1234/HelpSC"), IHelpSC)Dim drEdit As DataRowDim intRow As Integer = CInt(Request.QueryString("item"))strDiscipline = Request.QueryString("discipline")drEdit = hsc.SelectedRow(intRow, strDiscipline) <<Call the remote methodstrRecord = drEdit.Item(0)txtLogged.Text = drEdit(1)txtEngineer.Text = drEdit.Item(3)End SubRemote Class Function:Public Function SelectedRow(ByVal id As Integer, ByVal discipline As String) As System.Data.DataRow Implements IHelpSC.SelectedRowstrDiscipline = Trim(discipline)Dim cmdSelect As SqlCommand = sqlcnn.CreateCommandDim drResult As DataRowDim strQuery As String = "SELECT * FROM " & strDiscipline & _" WHERE CallID=" & idcmdSelect.CommandType = CommandType.TextcmdSelect.CommandText = strQuerysqlda = New SqlDataAdaptersqlda.SelectCommand = cmdSelectds = New DataSetsqlda.Fill(ds, "Results")drResult = ds.Tables(0).Rows(0)Return drResultEnd Function
View 3 Replies
View Related
Mar 14, 2008
I have in SQL Table1 the following values in Field1:
ABC
ABc
AbC
abc
aBc
abC Select Field1 From Table1 Where Field1 = "AbC"
I get all six records, not just the one record (AbC) that I want to retrieve. How do I tell the select statement to be case sensitive?
my asp.net statement is given below DataRow dr1 = ds.Tables["Login"].Select("UserId ='" + txtUserId.Text + "'And Passwords ='" + txtPassword.Text + "'")[0]; i m using datarowso i need a helpi have quary but i don;t know how can use DataRow dr1 = ds.Tables["Login"].Select("UserId ='" + txtUserId.Text + "'And Passwords ='" + txtPassword.Text + "'where CONVERT(binary(5),Userid)=CONVERT(binary(5),'" + txtUserId.Text + "')'" )[0]; this give me error "Where condiction need operator"waiting for reply
View 2 Replies
View Related
Sep 24, 2007
Hi guys,
I have a question regarding a locking scheme in MSSQL I hope you guys can help. In Sybase, I am able to specify datarow locking in DDL (ex. create table, alter table). Can I do the same in MSSQL or is there an equivalent option in CREATE TABLE statement in MSSQL? I came across a few articles in MSDN about datarow locking and it seems to me that MSSQL only allows locking through DML... Is that true? Thanks.
View 2 Replies
View Related
Feb 15, 2005
Heys
a while back i had to do a project with an access database, one of the biggest problems i had back then was gettting the primary key
of a datarow you had just inserted into the database.
After a long set of trial and error i came up with the following:
- add the tablemappings of a table
- call the dataadapte.fillschema method
then after inserting a new row into the database the primary key gets filled in automatically!
now thing is
i was hoping to duplicate this in sql server
but it doesn't seem to work at all
so after i insert a row into my datatable
and update it
the row is in the database
but in vb the datarow primary key is not filled in!
anyone have an idea?
prefereabely one that does not resort to stored procedures with return parameters etc
thx a million in advance!
View 1 Replies
View Related
May 2, 2008
I will attempt to explain my situation more clearly.
I need to get data from a data source using a DataFlow Task (which pushes the DataSet into a Variable) and process the data row by row in a ForNext (ADO Enumerated) Container. I don't want to map the columns into variables because the number of columns and the data types vary considerably and I want to make my package as "generic" as possible.
Is there a way, in Script, to read the current row of the ForEach Container from into an ADO DataRow so that thie names and values of each column can be accessed?
I know how to read the entire DataSet object from a Variable into an ADO DataSet and iterate through the rows in the normal way but this doesn't suit my purpose. It would be really useful if there was a way to do somehing similar with the current DataRow in the ForEach Container.
To explain what I am doing, the idea is to use the Column Names and Values for each row to construct an xml fragement, store it in a string Variable and (in the next step) use the Web Services Task to call a Web Method with the xml fragment (from the Variable) as one of the inputs.
A less attarctive alernative would be to use a Scipt outside a ForEach Container and loop through the rows of teh DataTable as descibed above and perhaps call the Web Service Task from teh Script. The proble is that I don't know how to do this either and it woudl be much "neater" anyway to use the ForEach Container.
Any ideas?
View 7 Replies
View Related
Oct 16, 2006
Add parameter to "navigation" url -
Hello,
I'm trying to add a parameter to my JUMP TO URL but it doesn't work.
basiclly i'm useing javascript there:
javascript:window.open('http:www.a.com?num=XXX');
i want to change the XXX with a value from the dataset.
I tried - javascript:window.open('http:www.a.com?num= + Fields!ME.Value ');
or - javascript:window.open('http:www.a.com?num= & Fields!ME.Value ');
it didn't worked :(
any help?
View 9 Replies
View Related
Jan 5, 2007
I have created a one-page client summary report. My problem is that I can only get the report to show one client and there are many. How do I add record navigation functionality to my report?
View 4 Replies
View Related
Mar 16, 2007
Hello
I have a link on the header to jump to another report. It was working fine on test server but when deployed to production, is giving the followin error. Any suggestions
Thanks
Inder
The path of the item "(null)" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath)
View 4 Replies
View Related
Jan 25, 2007
Hi everyone I stumbled across this problem recently and have tried to figure out a good solution and have come up with nothing.
Environment: ADO.NET, ASP.NET 2.0, MS SQL 2000, C#
Problem: I have a set of data which I order according to two columns of data in the set. One column is a varchar or a date value (depending on what the user has chosen from GUI controls) and the other is an identity column. This dataset contains lots of data so its not feasible to pull the entire dataset to the client, also everything must be performed via ADO.net (no stored procedures). When the user selects one of the records I load another page and drill down into the record details (think of this as the record details page). This is fine and easy but on this record details page I would like to keep a Next and Previous button so users can move to the next record in the set (remember this set is sorted somehow on the previous page). My question is how can I know what next record should be? It would seem I need to attach a sequential number to the rows of data so I can easily grab the next one in the set. Solutions to this seem to make use of a temp table which I dont think is possible via ado.net.
Is there a decent performing way to do this through ado.net?
Thanks for all insight.
View 4 Replies
View Related
Jan 30, 2007
Here's a sample matrix:
Men Women Total
Full Professor 36 12 48
Assoc. Professor 16 9 25
Assistant Professor 11 14 25
Total 63 35 98
Now, it's easy enough to make the values clickable so that somebody can drill down to a report that shows detail about the people. I have also discovered how to turn off clickability on the totals. However, what I really want is for the totals to be clickable so that, for example, if I click on the 63, I see a report that shows all men. Likewise, If I click on the 48, I want to see a report that shows all Full Professors. What currently happens when the totals are clickable is that if I click on the 63, I get all men who are full professors (36 records instead of 63). If I click on the 48, I get all Full Professors who are men. (36 records instead of 48).
Is there any way to send different parameters (or even no parameters) to the secondary report if the subtotals are clicked instead of the regular results?
Thanks in advance!
View 16 Replies
View Related
Sep 11, 2007
Can I have a report that is nothing more than a parameter and when the user selects from the list it will jump to another report based on which parameter was selected?
I can create a report with a text box that I can click to jump. I'd like to be able to eliminate the click on text box if possible and jump directly from parameter select pull down box.
Thanks.
View 3 Replies
View Related
Sep 14, 2007
I have a report with a Matrix table. When it€™s fully populated I have 5 rows. These rows are different categories in a CRM system. In these categories there are a lot of Opportunities listed. The thing here is that category 1-4 exist in one table, really a view, and category 5 exist in another different view. So to gather all the information into one single Matrix table to later have subtotals and stuff I just made a little Union of the two select queries.
Now one the column in the table is of course Topic. And from here my client wants to be linked to the right CRM card. The problem I have encountered is that how can I have to different addresses on one single cell in the table?
In the Navigation pane in the cell that corresponds to the Topic, for now I have an address like this:
=string.Format("http://{0}/SFA/opps/edit.aspx?id={1}", Parameters!srv.Value, Fields!objectid.Value)
What I need to change when it€™s a category 5 Opportunity is €œopps€? to €œcat5€?and add €œ&etc=10008€? to the end of the address. Any ideas?
PS. {0} and {1} are parameters, one server parameter and one opportunity ID parameter.
Kind Regards
View 3 Replies
View Related
Feb 20, 2007
Hi all,
I have got a report with external hyperlink.
When I put this link in TextBox properties >> Navigation >> Jump URL of my gridView : http://www.micheldegremont.com it works.
However, if I put "http://www.micheldegremont.com?id=" + Fields!ID.Value it doesn't work. I haven't not link in my report.
And if I put http://www.micheldegremont.com?id=Fields!ID.Value my report create a hyperlink to http://www.micheldegremont.com?id=Fields!ID.Value and no http://www.micheldegremont.com?id=1
Thanks for you help.
View 2 Replies
View Related
Dec 27, 2006
Hi,
I have a doubt regarding use of navigation controls in a report and exporting the report. For example using a drilldown functionality in a report. After the report is generated one can export the report in whatever format he wants (PDF,TIFF, XML,...).
In this case, with the drill down functionality in the report, the details of the report are visible only when the plus sign is clicked. Suppose now the plus sign is not clicked and one exports the report in a PDF or TIFF format.
In the PDF file, the navigation or the drill down functionality is now not useful right ? There is no way to view the detail fields of the report now, using the PDF file right?
Thanks in advance,
View 1 Replies
View Related
Apr 11, 2007
Anyone know why my navigation buttons on my reports is always dimmed so that I can only see the very first page of every report? I even spent some time with a Microsoft SQL Server engineer trying to figure this one out and he wasn't able to figure out why?
I tried to attach a picture but I guess pictures aren't allowed. The first page, previous page, next page and last page buttons displayed as arrows on the top left of the reports are always dimmed on every report even though they have multiple pages.
Has this happened to anyone and how did you get it fixed?
Thanks
View 4 Replies
View Related
Apr 21, 2008
Hi guys,
I have a matrix report, which has one row group and one column group. The value is a Count of some field coming from the dataset. So the difficulties that I'm having is that when I click on zero(i.e. 0) values from the main report, the detail report doesn't ran and it through an error message : The 'X' parameter is missing a value. When the value is positive(other than zero) then the detail report works fine.
Any idea on this?
Thank you!
--Amde
View 5 Replies
View Related
Dec 9, 2005
I have a report with a hyperlink. When I go to the navigation tab, it does not give me any options to open the link in a new window. I have a link to show help and I do not want the user to actually move away from the reports
View 18 Replies
View Related
May 14, 2008
Year
May April March Feb
Site
Manager
Direct Report A 1
Direct Report B 2
Direct Report Unknown 3
Total 6
Total
Hi everyone,
I know this question has been asked several times in the forum, and I've tried to use the examples given, however, I cannot make them work for myself so I'm finally posting my question. I hope someone can help me out as well
Report Name: Passive Theft - Summary
Report: This is a rolling 12 months report (it is a matrix).
Row Groups: site (location), manager, direct report (for each manager)
Column Groups: Year, month > this is for all work orders
Overview: The counts showing on the report summary shows how many passive theft audits were found, in a period of time (year and month) on a person's work orders (which where the Direct report information is derived from)
Just like prior posts, I need to be able to drill down from the summary report (which shows counts of audits) to a detail report that will show the individual work orders depending on the number clicked (non-subtotal and subtotal in the matrix). My detail report is called "Passive Theft - Detail", and this is the report I'm pointing to in the navigation option - jump to report.
What I have done so far is that if I just pass the year, month, site, and direct report as parameters to detail report and I get the correct detail (in the report, this would be clicking on 6, any of the aggregates by the manager line). However, if I click on 1, 2 or 3, I obviously just get the result for the whole manager group again, which is just 6.
Can you please show me a code on how I can accomplish passing on the correct values an getting the right detail?
Second dilemma: We have a lot of contractors employee information that have been purged from the system, which could possibly still have work orders attached to them, but their name just wont show up in the report. In my SQL, I use the ISNULL function to show these purged contractors as "Unknown". So say for the Sample above on Direct Report Unknown which = 3, if I click on that, I may click on that and only get 2 details in the Detail Report because 1 other detail has been purged out of the system. But if 2 are available, I would still like for them to show for the unknown contractor.
Third dilemma: An employee may still be present in the system, but the work order information could be purged already and so if you click on Direct Report A, as an example, he woudln't have a detail for that work order even though he has a count of 1. How do I resolve this?
I know this is such a long question but I really need help I hope someone can enlighten me Thank you!
View 1 Replies
View Related
Oct 2, 2007
We have reports that runs fine in our developing and test inviroment. But
when I deployed to the production server so comes the problem when navigating
reports with multiple pages. It works fine when reports loads for the first
time or click the refresh button, it show the first page of the report. Then
we get "An internal error occurred on the report server. See the error log
for more details. (rsInternalError) " when we try to go to next page or back
to the previous page.
Thanks for any help!
View 1 Replies
View Related
Nov 21, 2007
All,
Is there a way to combine the Bookmark and report link functionalities in reporting services. For example, I have two reports. When I click a link in first report, I would like to be able to navigate to second report but not at the top of the report but at a particular report item way down in the second report, sort of like an anchor on an HTML page. Can I do this?
Thanks.
View 1 Replies
View Related
Mar 27, 2008
Hi,
I've got a problem with paging and the ReportViewer. Here's how it goes:
First, I got the ReportViewer set to "print layout" and my reports having the correct size for each layout (landscape or portrait). Everything is fine with this since the number of page in the report reflects perfectly the number of page you can navigate with.
However, there seem to be a problem with displaying the correct number of page at the loading of the report. In fact, if the report contains 5 pages, the navigation header with often only shows 4 pages total. But once I click "next page", the correct number of page is then computed.
I didn't have any problem with that until I got a 2 pages report. The problem is, the navigation header is showing 1 total page and the "next page" button is disabled. So I cannot click it. I can, however, "scroll" down with the mouse wheel. But, this isn't a viable solution since some of our clients don't have mice with wheels.
Is there an option to tell the ReportViewer to complet the page count before showing any data on screen?
Thanks
EDIT: I'm using WinForm ReportViewer.
View 4 Replies
View Related
Mar 5, 2007
Hi Everyone,I'm drawing a blank here and I am hoping someone can point me in the right direction. I have a table with the following columns (some omitted)IDGUIDPageNameParentPageID I want to build a hierarchical navigation system (2-tier). The conceptual problem that I am running into was getting this information from the same table. Initially I was going to use a nested repeater but I am thinking a treeview would be better. Anyway, the problem is the query. How would I start with something like this? Let's use the following as an exampleRows(ID '1', GUID '888....', PageName 'Page A', ParentPageID '-1')(ID '2', GUID '111....', PageName 'Page B', ParentPageID '-1')(ID '3', GUID '222....', PageName 'Page C', ParentPageID '-1')(ID '4', GUID '375....', PageName 'Page 1', ParentPageID '1')(ID '5', GUID '562....', PageName 'Page 2', ParentPageID '1')(ID '6', GUID '874....', PageName 'Page 3', ParentPageID '2')
(ID '7', GUID '388....', PageName 'Page 4', ParentPageID '3') So, I want to be able to build a query so that I can do the followingPage A Page 1 Page 2Page B Page 3Page C Page 4 Any help would be greatly appreciated. Thanks!
View 4 Replies
View Related
Nov 27, 2007
Hi need to create navigation that gets populated via database and is role based. below is the sql
CREATE TABLE [TopMenu] (
[MenuID] [int] IDENTITY (1, 1) NOT NULL ,
[Text] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ParentID] [int] NULL ,CONSTRAINT [PK_Menu] PRIMARY KEY CLUSTERED
(
[MenuID]
) ON [PRIMARY] ) ON [PRIMARY]
GO
INSERT INTO TopMENU
Select 'Property','Property', NULL
UNION ALL Select 'Portfolio','Portfolio', NULL
UNION ALL Select 'Capital Expenditure','PortfolioCapex', 1
UNION ALL Select 'Depreciation','PortfolioDepreciation', 1
UNION ALL Select 'Condition Audit','PortfolioCondition', 1
UNION ALL Select 'Historical Expenditure','PortfolioHisEx', 1
UNION ALL Select 'Property Details','PropertyDetail', 2
UNION ALL Select 'Assets','PropertyAsset', 2
UNION ALL Select 'Depreciation','PropertyDepreciation', 2
UNION ALL Select 'Capital Expenditure','PropertyExpenditure', 2
UNION ALL Select 'Insurance','PropertyInsurance', 2
UNION ALL Select 'Documents','PropertyDocuments', 2
UNION ALL Select 'Capex','PortfolioCapex', 3
UNION ALL Select 'Graph','PortfolioCapexGraph', 3
UNION ALL Select 'Graph','PortfolioDepreciationGraph', 4
UNION ALL Select 'Current Depreciation','PortfolioDepreciation', 4
UNION ALL Select 'WDV & Depreciation','PortfolioDepreciationWDV', 4
UNION ALL Select 'Assets','PropertyAsset', 8
UNION ALL Select 'Capex','PropertyCapex', 8
UNION ALL Select 'Depreciation','PropertyDepreciation', 8
UNION ALL Select 'Condition','PropertyCondition', 8
UNION ALL Select 'Expenditure','PropertyExpenditure', 8
UNION ALL Select 'Disposed','PropertyDisposed', 8
UNION ALL Select 'Capital Ex','PropertyExpenditure', 10UNION ALL Select 'Capital Ex Graph','PropertyExpenditureGraph', 10
GO
now clearly, I will have two top level navigation
property and portfolio. both property will have subsequent navigation and those subsequest navigation may or may not have another sets of navigation.
I need to display in a row style not in a drop down style for eg. If I am in portfolio link the navigation structure should be as below
Portfolio
Capital Expenditure | Depreciation | Condition Audit | Historical Expenditure
Capex | Graph
by default Capex should be selected. it should also highlight Portfolio, Capital Expenditure and Capex as Capex's parent is Capital Expenditure and Portfolio
I was thinking of using a 3 level datagrid. could someone please help me I am using asp.net 2.0 web application project with vb.net and sql server 2005
thanks in advance
View 9 Replies
View Related
Dec 13, 2006
hi experts,
i'm working in building new reports from an existing database. the report i'm working in is to save the path of the visitor through a web site(this is neede for the statistics web site), i have the siteId, commid, maintab, subtab.
the site id is dtored in site table, maintab and subtab are stored in article(they are mixed in one columns called title) i have also sessionid stored in session table.
i want a query that show the flow of the visitor through a web site, which tab he clicked first then second tab then third tab and in this tab he clicked subtab and the last tab he clicked on before leaving the web page.
is this possible and if not, what are the other approches that can i make to get the report i want.
also i want to ask if it is possible to create the report where it will show you the visitors for the first time and the returned visitors.
thanks
View 12 Replies
View Related
Mar 24, 2006
HiI'm trying to convert some verbose SQL Server 2000 T-SQL code that useslots temp tables and the like into a SQL Server 2005 only version,possibly using CTE.What I want to achieve is a menu like that onhttp://www.cancerline.com/cancerlin...9801_6_3_3.aspxNotice how you have the top level menu items, and then child nodesexpanded down to the low level page that link sends you to.Table sql:CREATE TABLE [dbo].[NavigationNode]([NodeId] [int] primary key nonclustered,[Text] [nvarchar](150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[AlternativeText] [nvarchar](250) COLLATE SQL_Latin1_General_CP1_CI_ASNULL,[Level] [int] NULL,[ParentNodeId] [int] constraint fk_parent_navnodeforeign key references [NavigationNode] ([NodeId]))Table data:1HomeNULL1NULL2SolutionsNULL113Solutions child1NULL224Solutions child2NULL225ContactNULL116solutions child1 child1NULL337solutions child1 child2NULL338solutions child1 child3NULL339solutions child1 child4NULL3310contact child1NULL25I have started to write some code with the common table expressionsyntax:declare @root int;set @root = 2;WITH Nav([NodeId],[ParentNodeId], [Text], [Level]) AS(SELECT [NodeId], [ParentNodeId], [Text], [Level]FROM [dbo].[NavigationNode]WHERE [ParentNodeId] = @rootUNION ALLSELECT n1.[NodeId], n1.[ParentNodeId], n1.[Text], n1.[Level]FROM [dbo].[NavigationNode] n1INNER JOIN Nav n2ON n1.[ParentNodeId] = n2.[NodeId])SELECT *FROM NavWhich returns:32Solutions child1242Solutions child2263solutions child1 child1373solutions child1 child2383solutions child1 child3393solutions child1 child43However I would prefer to the childnode, and then get parents of thatchild recursively. Doing that would leave me with a result set thatcould add the top level menu items to and have all the data required.Any help is greatly appreciated.-Brian
View 1 Replies
View Related
Jan 17, 2008
I am using a ReportViewer Control inside of a Windows Form and ran into an issue with the page navigation failing to update upon refresh (the report itself does refresh - the page navigation does not). If the initial report has one page and the subsequent refresh produces five pages, the page navigation window only shows one page. If you manually type in page two or three, nothing happens.
Here is a code snippet:
private void adpTaxServicesForm_Load(object sender, EventArgs e)
{
this.reportViewer.RefreshReport();
}
private void button1_Click(object sender, EventArgs e)
{
this.reportViewer.SuspendLayout();
this.reportViewer1.RefreshReport();
this.reportViewer.ResumeLayout();
}
Any help would be greatly appreciated...
Thanks,
-Fernando
View 1 Replies
View Related
Sep 15, 2006
I am embedding the ReportViewer in an aspx page and the report comes up fine, but when I press the "Next Page" or "Last Page" buttons, I get the error: "Page navigation is out of range".
The application has session state turned off.
The problem occurs whether or not the viewstate for ReportViewer is turned on or off.
How can I fix this problem?
View 15 Replies
View Related
Sep 17, 2007
I am experimenting with SQL Reporting Services on a machine with SQL Server 2005 loaded and deploying
reports to a different server. both servers are equivalent in resources.
In the browser on the Reports machine when I first go to the Reports address, it takes a very long time
to build and load the page. it then takes a long time for each drilled down page. Subsequent calls to the same
pages are very fast if done within a certain amount of time. This implies that there must be some form of
caching going on and that the cache expires after a period of time. I have seen in the RSReportserver.config
file that there are parameters relating to report caching, but they all appear to reference the actual reports being
generated. My issue is simply being able to build the start page and other navigation more quickly and to
keep it active so it does not have to perform that build each time.
Any information related to managing this situation would be very much appreciated..
Thank you, Ray
View 13 Replies
View Related