Collapse Button In SQL Reports
Jun 23, 2007
I am working with SQL reporting services, I am getting the data dispalyed...
the only problem is that I am not able to collapse, ie (+) button next to the row header and the cloum header.
Can any one let me know, how to get that....
Thnks in adv.
View 1 Replies
ADVERTISEMENT
Jul 9, 2015
In my report i have more than 10 sub reports each should be displayed when we click on some label but my requirement is to expand all the sub reports at a time or collapse the sub reports.URL.....problem here is it is a genius solution working beautifully in my local machine but in the client server if i click on the Expand/Collapse radio button it is asking for the parameters again.
View 9 Replies
View Related
May 12, 2007
Hello,
In the sharepoint site from the main report when i go to my drill down report i see no back button, Is there a way to provide back button in the toolbar. I dont want to use the page back button. or is there any way by which if i click for my drill down report the report will be opened in a new window?
Thanks & Regds,
View 2 Replies
View Related
Dec 12, 2006
Hi there,
I'm using the reportviewer control to display a drill-through serverreport. Here is the code in my code-behind file:
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Dim strReportPath As String = "/Public Reports/adfront/dealermodel/myreportname"
Dim paramUniqueID As New ReportParameter()
If Not Page.IsPostBack And Me.ReportViewer1.ServerReport.IsDrillthroughReport = False Then
Session("uniqueid") = Request.QueryString("uniqueid").ToString
'Set the report server URL and report path
Me.ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://localhost/reportserver")
Me.ReportViewer1.ServerReport.ReportPath = strReportPath
Me.ReportViewer1.SizeToReportContent = True
Me.ReportViewer1.AsyncRendering = False
Me.ReportViewer1.ShowBackButton = True
Me.ReportViewer1.ShowFindControls = False
Me.ReportViewer1.ShowPageNavigationControls = False
Me.ReportViewer1.ShowParameterPrompts = False
Me.ReportViewer1.ShowPromptAreaButton = False
Me.ReportViewer1.ShowZoomControl = True
Me.ReportViewer1.ZoomMode = ZoomMode.FullPage
'Set the processing mode for the ReportViewer to Remote
Me.ReportViewer1.ProcessingMode = ProcessingMode.Remote
'Set the report parameters for the report
paramUniqueID.Name = "uniqueid"
paramUniqueID.Values.Add(Session("uniqueid"))
Dim parameters() As ReportParameter = {paramUniqueID}
Me.ReportViewer1.ServerReport.SetParameters(parameters)
End If
Me.ReportViewer1.ServerReport.Refresh()
End Sub
Protected Sub ReportViewer1_Drillthrough(ByVal sender As Object, ByVal e As Microsoft.Reporting.WebForms.DrillthroughEventArgs) Handles ReportViewer1.Drillthrough
While (Me.ReportViewer1.ServerReport.IsDrillthroughReport)
Me.ReportViewer1.PerformBack()
End While
'Me.ReportViewer1.ServerReport.ReportPath = e.ReportPath
'Me.ReportViewer1.ServerReport.GetParameters()
Me.Label1.Text = Me.ReportViewer1.ServerReport.ReportPath
End Sub
When I drill-through the report and hit the (browser) back button and try to drill-trough again I get the following error:
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)
When I hit back again and try to export the report to eg. PDF, I get this error:
Execution 'mly2yj555oen0o45oowe1e55' cannot be found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Execution 'mly2yj555oen0o45oowe1e55' cannot be found
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: Execution 'mly2yj555oen0o45oowe1e55' cannot be found]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +553
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +941
Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, String& mimeType, String& fileNameExtension) +97
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +126
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +202
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
It looks like my executionid is lost on the reportserver. Does anybody knows how to fix this, so my users can use the browser back button?
Many thanx!
Ralph
View 1 Replies
View Related
Apr 17, 2007
We are using Reporting Services 2000.
The print button that is present in the browser is working just fine for some users.
But some users are complaining that on clicking the print button their system restarts.
Some other users are also getting the error "An error occurred during printing. (0x80004005)"
However on closing the browser and opening the report in it again this issue is resolved.
So, the main concern is "Restart of the machine on click of the PRINT icon in reports viewed in some application browser."
Please help!!
View 2 Replies
View Related
Nov 3, 2015
I have several reports in a Power View Gallery. In Gallery view, most of the reports show the "Open New Excel Workbook", the "Create Power View Report", and the "Manage Data Refresh" buttons on the right side of the report list. Why would some reports not have these buttons available? In the attached image you can see one report with the buttons and one without the buttons.
View 5 Replies
View Related
Apr 17, 2008
Hi,
I have 3 textboxes going down.
box1
box2
box3
Is there a way to hide the box2 (with some condition) and shift up the box3 when displaying the result?
like this:
box1
box3
I know how to use the hidden property but it leave a blank space between box1 and box3.
FYI. I'm trying to do this in the PAGE HEADER section.
thank you for your help.
jib
View 4 Replies
View Related
Nov 6, 2014
Table created
declare @t table
(
Qtr VARCHAR(1000),visittype VARCHAR(1000),
CMSContractID VARCHAR(1000,memid VARCHAR(1000),
CarrierMemID VARCHAR(1000),HeadOfHouse VARCHAR(1000),
dobdatetime ,FullName VARCHAR(1000),minstartdt datetime,maxenddt datetime
[Code] ....
Expected output:
QtrvisittypeCMSContractIDmemidCarrierMemIDHeadOfHousedobFullNameminstartdtmaxenddt
06/01/2014 - 08/31/2014EDH8677CA140812115 1000000039546468-Apr-54TOM5-Jul-146-Jul-14
06/01/2014 - 08/31/2014EDH8677CA140812115 1000000039546468-Apr-54TOM9-Jul-149-Jul-14
View 3 Replies
View Related
Mar 28, 2007
I posted last year about getting and Expand All/Collapse All link working in reports, and it does work perfectly for on-demand reporting. I was able to get these working using the boolean report parameter and then the Jump to Report option going back to itself changing that parameter.
The issue that I have just discovered is that when a report with these Expand All/Collapse All links are in a report snapshot, clicking those links will cause it to re-render the report from the datasource at the time the link is clicked. This is an issue for one of the datasources we are using because the data is always changing, so when it goes back to re-render the counts and data returned are completely different then they were when the snapshot was first created. As time goes on the data will no longer even be in the datasource since it can only maintain 4 months of data.
Is there another way to get all detail groups to expand/collapse at once that does not require the report to be completely re-rendered from the datasource?
View 1 Replies
View Related
Oct 4, 2006
I'm relatively new to this, so bear with me here. (SQL Server 2005 Express, Datatypes are all varchar, int or money, nothing crazy...)
I currently have a table (not designed by me...) which looks like this:
ProjectID Months Expenses
3214 JAN 45.67
3214 MAR 56.78
1234 JAN 78.99
4567 MAY 43.56
And so on.... And I need this:
Project ID Jan Feb Mar Apr May Jun etc....
3214 45.67 56.78
1234 78.99
4567 43.56
I had attempted to do it using this code (really sloppy... I know. Beginner's attempt...)
DECLARE @Months varchar(4)
DECLARE @Counter int
DECLARE @Rowcount int
EXEC @RowCount=dbo.ReturnRowCount
SET @Counter = 0
WHILE @Counter <= @RowCount
BEGIN
SET @Counter=@Counter+1
SET @Months=(SELECT Months FROM TestData WHERE RowNum=@Counter)
SELECT @Months
WHILE @Months='JAN'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Jan)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='FEB'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Feb)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='MAR'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Mar)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='APR'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Apr)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='MAY'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, May)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='JUN'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Jun)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='JUL'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Jul)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='AUG'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Aug)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='SEP'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Sep)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='OCT'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Oct)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='NOV'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Nov)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
WHILE @Months='DEC'
BEGIN
INSERT INTO SusansOutputTable (ProjectID, Dec)
SELECT ProjectID, Expenses FROM TestData WHERE @Counter=TestData.RowNum
SET @Months=''
END
SET @Months=''
END
SELECT RowNum, ProjectID, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec FROM SusansOutputTable
I also tried using IF statement instead of the imbedded WHILE statement and had the same result. What it's returning is 98,765 results of the same thing, with the exception of the last 25 rows, which return what I expected (which still needs to be collapsed...) I know there HAS to be an easier way to do this, I'm afraid it might be a bit beyond me though, any help?
Ps. ReturnRowCount function just returns the row count of the base table, assuming a rowid column with an IDENTITY int variable, which I can safely assume in this case. Also, the counter seems to work fine, but something is wrong in my internal portion of the while loop I think...
View 3 Replies
View Related
May 21, 2008
Hello -
I am having a difficult time trying to generate a result set that collapses multiple rows into one. However, I am also getting some of the columns that I am trying to SUM, to double their value.
I have two tables as:
Table 1
EmpID (int), AcctID (int), ActivityDate(datetime), Process (nvarchar 20), Cost (money)
Table 2
EmpID (int), AcctID (int), ActivityDate(datetime), Process (nvarchar 20), Duration (smallint)
Some sample data:
Table 1
501, 7998, 04-2-2008, Process1, $100
501, 7998, 04-2-2008, Process2, $75
Table 2
501, 7998, 04-2-2008, Process2, 3
Result i need is:
501, 7998, 04-02-2008, $175, 3
What I am getting is:
501, 7998, 04-02-2008, $175, 6
Any suggestions or help will be appreciated.
Thank you
- will
View 3 Replies
View Related
May 27, 2008
Hi Guys,
I have created a report where I have Z-Index all set correctly, but I cannot see the desired effect of toggling as can be seen in the AdventureWorks sample of SalesOrder report that gets shipped with SSRS. What am I missing?
View 1 Replies
View Related
Dec 21, 2007
Hi All,
I have a report that is grouping phone calls by "Category" (Outgoing, Incoming, Voicemail, etc). When the report is rendered, each category (along with totals) is shown and the details (each actual call) are hidden. Using toggling, I allow the user to burst open any category to view all of the call details.
I join the query for this report so that even if a category has 0 calls for the day, it is still shown. When expand a category with no calls I get a blank record (as I should, because there are no call details).
The question I have is ... Can I have the toggle be conditional? Can I have the ability to toggle thr group only when there are call details? Can I have the + to the left of the category name not be shown?
Thanks in advance for any help!
Merry Christmas!!!
-Matt
View 5 Replies
View Related
Feb 27, 2007
On one of my reports, the +/- for expand/collapse of groups is reversed -- i.e. when the group is expanded it displays "+" and when the group is collapsed it displays "-". The display of the document map is correct.
Has anyone else had this problem?
thx
Helen
View 9 Replies
View Related
Feb 27, 2007
I have a relatively simple problem.
I have a db-query that returns quite a few rows which I must show in a table.
At initial load the report only shows the row group heading for the detailed data, and when clicked the detailed data for a group expands.
My problem is that reporting services assumes that when collapsed it should summarize everything in each column and display it.
Here is an illustration of the problem.
First the detailed view of my data (Notice the 5th and 6th rows which are simply the values in the 1st through 4th rows divided into groups - and the "Total" row shows the actual total for Row 1 Group Header:
[-] "Row 1 Group Header" "Detail data 1" "10" "Detail data 2" "10" "Detail data 3" "4" "Detail data 4" "6" "Row 1 group 1" "20" "Row 1 group 2" "10" "Total" "30"
The detailed view is just as I want it - no problems there.
However, when the detailed view is collapsed, reporting services calculates the sum for the column - which is 90 - not 30 as is the actual total:
[+] "Row 1 Group Header" "90"
Is there any way I can redefine the formula/insert filters used for calculating the "collapsed-total" for each column when the row is collapsed? Or maybe simply prevent it from showing a "collapsed-total" altogether? Or can you think of another way to structure the data so the "collapsed-totals" gives me the actual value (30)?
I thought about splitting the values into a column for each data-group, so that I'd have a column for the "Detail data n" values, a 2nd column for the "Row 1 group n" values and a 3rd column for the "Total" values - this would yield correct "collapsed-total" values. But is really a plan B - I really do not want to do that unless it is the only way out of my dilemma.
View 2 Replies
View Related
Jun 11, 2007
Hi'
I have a problem with collapsing of groups. It seems that the reports saves the expand/collapse state of groups between renderings ... bug or feature?
In my report I have a dataset which contains some numerical data over time.
The report is designed to show data from a selected month as well as January to selected month.
A parameter is used to select the month.
The presentation looks like the following:
Company total
Department
Employee
Employee
...
Department
Emplyee
...
...
The employees have their initial state set to hidden, with their respective department as toggler.
This works perfectly ... within Visual Studio.
When I deploy this report to my web server strange things happens.
Fx
1) If I expand one department to see the data for the employees for may and then decide to look at data from another month.
2) I change the month parameter and click 'View report' to render the report again.
3) The report renders as it should. All departments are collapsed.
4) If I then expand some other department than before, both the newly selected department and the old one are expanded ... a behavior that is not that practical
It seems that the report saves the expand/collapse state for the groups between renderings. So when I click expand for the second time it expands the one I just clicked and the department which was expanded before rendering.
What to do?
View 3 Replies
View Related
Jul 7, 2006
Is there a way to expand/collapse all items in the documentmap ?
I know there is an option DocumentMapCollapsed but this is to collapse/expand the documentmap panel. I would like to control the collapse state of the items into the document map ...
thanks in advane
View 3 Replies
View Related
Feb 29, 2008
Hello all,
I have a report with some groups which can all be expanded/collapsed by clicking on a textbox with an action attached to it.
The example I used can be found here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=600583&SiteId=1
But I want to hide the row containing this textbox (or the textbox itself) on the actual printed report.
Is there any report item that can tell me if the report is in preview phase, or can it be solved in any other way?
Kind regards,
Dirk Holland
View 1 Replies
View Related
Dec 6, 2007
has anyone out there found a way to get the best of both recursive hierarchy and drill down in the same report, ie without needing to know how many levels there are in your hierarchy, still being able to report them like a tree view with collapse and expand capability at each level?
View 3 Replies
View Related
Aug 7, 2007
Hi,
How do I programmatically check a row group's Visibility or Expand/Collapse flag in a matrix table? For example, I have a matrix table contains the following groups:
Row groups: Facility --> Category Type --> Category
Column groups --> year, quarter, month
I want to be able to programmatically update the table content if Category rows are not visible (Category Type row group is collapsed).
Thanks.
SouBee
View 3 Replies
View Related
Nov 5, 2007
Hello SQL Server Experts, Data Analysts, and Report Writers et al:
re: Reporting Options with SQL Server
I wanted to propose an offshoot to the pryor thread:
Would anyone take a stab at comparing Access Reports, Crystal Reports,
Cognos or other options to all the Reporting Services and its components offered as part ofSQL Server, especially as to extracting data from SQL Server into a report format?
I guess this is a far as capabilites, ease of use, limitations, and especially formatting
or presentation of the end report product?
Thank you to all, and I hope this is a beneficial discussion to others.
Hal1490
Hal9000
View 4 Replies
View Related
Mar 18, 2008
I have an already published application running several MS SQL Server 2000 Reporting Services report.
I need a way to find from either the reporting services log or the application server (IIS) logs or windows log
to know the frequency of each report being used.
Based on this info, the business needs to know which reports are being used and to what extend?
How can I acheive this?
I have already got the IIS logs and it did not give the required info.
I have looked into the Reporting Services logs but it does not provide the info either.
Any help is appreciated
View 2 Replies
View Related
Mar 18, 2008
I have an already published application running several MS SQL Server 2000 Reporting Services report.
I need a way to find from either the reporting services log or the application server (IIS) logs or windows log
to know the frequency of each report being used.
Based on this info, the business needs to know which reports are being used and to what extend?
How can I acheive this?
I have already got the IIS logs and it did not give the required info.
I have looked into the Reporting Services logs but it does not provide the info either.
Any help is appreciated
View 1 Replies
View Related
Jan 23, 2007
Hi does anyone know how to do the above with out going through reportserver url?
Preferably by using a cmd tool ? such rs.exe
or through the backend in the reportserver DB?
Thanks
Dave
View 2 Replies
View Related
Feb 13, 2008
Hi Friends,
Could I migrate the reports which are developed on SQL 2000 to SQL 2005. If Yes then How ...
Could anyone explain me. How it works.
Thanks
sqlferns
View 2 Replies
View Related
Mar 27, 2008
My issue is with converting multi-value parameters:
In Crystal Reports, you can set a parameter to accept multiple vales (Discrete, Range or Discrete and Range).
As an example:
I have a database table with a column called ID.
I can create a parameter called param_id and set the options of the parameter to "Allow multiple range values".
With this setup, I can limit the result set of the report by comparing the param_id parameter to the ID column in the database. Because param_id is a multi-value range parameter, I can pass it the following data:
1 - 50
60 - 80
150 - 127
This will only return results within those ranges.
Does anyone know if SSRS provides this kind of functionality?
Thanks,
Patrick Conway
View 9 Replies
View Related
Aug 7, 2007
Is there a way to copy reports from other users "My reports" folder? I am logging onto the management studio reporting services using an administrative account and I am able to view the reports from all users' "My Reports" folder. But I am not able to export them as an rdl file. I am able to export reports from other common folders, but not from the "My Reports" folder.
The reason I need to do this is some of the users have created some reports in one environment and the reports are available in their respective "My Reports" folder. I need to move these reports to their corresponding "My Reports" folder in another environment.
Is there a way to do this?
Thanks for your help.
View 3 Replies
View Related
Mar 7, 2008
Hey Guys,
I'm not sure if anyone can help me with this but I am trying to achieve the following:
I have a row (In this case it is information on a fix) and on a button click I am trying to get it to "archive" it. At the moment I have it so that it it takes the current information and adds it to the archive table adding an archive date. The thing that I am struggling with is incrementing the version number. So, I need it to (in these steps I think) - Look for existance of the other entires of that ID, look for the version number that is related to the newest date of those knowledgeIDs and then add 1 to it. If that knowledgeID doesnt exist then add it as one.
My current code is below:
Thanks in Advance =)
C# Codeprotected void Page_Load(object sender, EventArgs e)
{UserName = (string)Session["UserName"];
Label4.Text = UserName + " Is Current Logged In";UserType = (string)Session["UserType"];if ((Session["UserName"] != null) & (UserType == "Helpdesk"))
{Response.Redirect("Accessrights.aspx");
}else if (Session["UserName"] == null)
{Response.Redirect("Login.aspx");
}
FixName = "default";Description = "default";File = "default";
ADate = myCalendar.TodaysDate.ToShortDateString();
AddDate = Convert.ToDateTime(ADate);myConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\inetpub\wwwroot\HOF\App_Data\HOF.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;";
}protected void Button1_Click(object sender, EventArgs e)
{SqlConnection myConnection = new SqlConnection(myConnectionString);
try
{
FixName = TextBox1.Text;
SqlCommand myCommand = new SqlCommand("select * from Knowledge WHERE FixName like '%" + FixName + "%'", myConnection);
myConnection.Open();SqlDataReader myReader = myCommand.ExecuteReader();if (myReader.HasRows)
{while (myReader.Read())
{
TextBox1.Text = myReader["FixName"].ToString();TextBox2.Text = myReader["Description"].ToString();
File = myReader["Location"].ToString();if (File != null)
{
TextBox3.Text = File;
}
else
{TextBox3.Text = "There is no script avaliable";
}KnowledgeID = myReader["KnowledgeID"].ToString();Add = myReader["DateAdded"].ToString();
}
myConnection.Close();
}
else
{TextBox1.Text = FixName + "Does not Exist. Please try again.";
}
}catch (Exception ex)
{
myConnection.Close();
}
try
Description = TextBox2.Text;File = Convert.ToString(FileUpload1.FileName);if (CheckBox1.Checked == true)
{SAPPS = "True";
}
else
{SAPPS = "False";
}
{SqlCommand mycommand2 = new SqlCommand("INSERT INTO Knowledge (FixName, Description, Location, DateAdded, DateArchived, Version, KnowledgeID) SET ('" + FixName + "','" + Description + "','" + File + "','" + Add + "','"+AddDate+"','" + SAPPS + "','"+I NEED A VALUE HERE+"','"+KnowledgeID+"')", myConnection);SqlDataAdapter myDataAdapter = new SqlDataAdapter(mycommand2);
sa = mycommand.ExecuteNonQuery();
myConnection.Close();
}catch (Exception ex)
{
myConnection.Close();
}
}
View 2 Replies
View Related
Sep 24, 2004
I need to make a query to a SQLserver db passing values from a dropdownlist and two text boxes as my criteria. Now if nothing is selected and the button is pressed, I would like to return everything that is part of my Select statement. I am having trouble making my sql statement work.
Im sending you my code as an attachment. I've put * around the area i really need help with.
Even if you could just point me in the right direction as to where to look for a good web forms book using VB.NET and ASP.NET I would really appreciate it.
Thanks,
Jose
AIM- RangerBud249
Yahoo- RangerBud249
Imports System.Data.OLEDB
Imports System.Data
Imports System.Data.SqlClient
Public Class Test
Inherits System.Web.UI.Page
Public dbConn As SqlConnection
Public da As SqlDataAdapter
Protected WithEvents txtStart As System.Web.UI.WebControls.TextBox
Protected WithEvents txtEnd As System.Web.UI.WebControls.TextBox
Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents img_cal1 As System.Web.UI.WebControls.ImageButton
Protected WithEvents img_cal2 As System.Web.UI.WebControls.ImageButton
Public ds As DataSet
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'the TailNumber is the first thing that will load
If Not Page.IsPostBack Then
lstAircraft.DataSource = GetAircraft() 'this function will load the Tail Numbers
lstAircraft.DataValueField = "TailNumber"
lstAircraft.DataTextField = "TailNumber"
lstAircraft.DataBind()
End If
End Sub
Function GetAircraft() As System.Data.DataSet
'this function will load the Tail Numbers
Dim connectionString As String = "connection info"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Aircraft].[TailNumber] FROM [Aircraft]"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)
Return dataSet
End Function
******************************************************************************************************************
this is the area I really need help with
Sub btm_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim connectionString As String = "connection info"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
dbConnection.Open()
dbConnection.Close()
Dim selection As String
Dim startTime As String
Dim landingTime As String
Dim flights As String
Dim selString As String = "SSELECT AircraftID, fromLocation, startTime, toLocation, landingTime, ID, Filename, VSU, local_1 FROM Flights, tbl_FileNames, tbl_VSU"
Dim commandString As String = "SELECT [Flights].AircraftID, [Flights].fromLocation, [Flights].startTime, [Flights].toLocation, [Flights].landingTime, [tbl_FileNames].ID, [tbl_FileNames].Filename, [tbl_FileNames].VSU, [tbl_FileNames].local_1 FROM Flights, tbl_FileNames, tbl_VSU"
selection = "where " & Me.lstAircraft.SelectedValue.ToString & " " & startTime = Me.txtStart.Text & " " & Me.txtEnd.Text = landingTime & " " & [Flights].[ID] = [tbl_VSU].[flight_id]) AND [tbl_VSU].[filename_id] = [tbl_FileNames].[ID]"
If Me.txtStart.Text <> "" Then
selString = selString & selection
End If
Session("SelStr") = selString
Dim dbCommand As New OleDbCommand(commandString, dbConnection)
DataGrid1.DataSource = GetFlights(lstAircraft.SelectedValue)
DataGrid1.DataBind()
End Sub
*********************************************************************************************************************
Function GetFlights(ByVal ID As Integer) As System.Data.DataSet
Dim connectionString As String = "connection info"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Flights].[toLocation], [Flights].[startTime], [tbl_FileNames].[ID], [Flig" & _
"hts].[fromLocation], [tbl_FileNames].[filename], [tbl_FileNames].[Local_1], [Fli" & _
"ghts].[AircraftID], [Flights].[landingTime], [tbl_FileNames].[VSU] FROM [Flights" & _
"], [tbl_FileNames], [tbl_VSU] WHERE (([Flights].[ID] = [tbl_VSU].[flight_id]) AN" & _
"D ([tbl_VSU].[filename_id] = [tbl_FileNames].[ID]))"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)
Return dataSet
End Function
Private Sub img_cal1_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles img_cal1.Click
'this will make the calendar for start visible when clicked and not visible if clicked again
Session("Cal1") = True
Session("Cal2") = False
Me.Calendar1.Visible = True
End Sub
Private Sub img_cal2_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles img_cal2.Click
'this will make the calendar for end visible when clicked and not visible if clicked again
Session("Cal2") = True
Session("Cal1") = False
Me.Calendar1.Visible = True
End Sub
Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
'this will put the date selected in my text box as a short date
If Session("Cal1") = True Then
txtStart.Text = Calendar1.SelectedDate.ToShortDateString
Session("Cal1") = False
ElseIf Session("Cal2") = True Then
txtEnd.Text = Calendar1.SelectedDate.ToShortDateString
Session("Cal2") = False
End If
Me.Calendar1.Visible = False
End Sub
End Class
View 1 Replies
View Related
Jun 2, 2008
Hello.
When I'm useing a report in reportViewer I have a "back button" in the the viewer which let me go back to my parent report after jumping to another report.
I wanted to make a bigger button like that on the report so I tried to simulate it by creating my own textback and use a javascript to go back one page.
This doesn't work since the javascript doesn't work as well as the built in bottun.
Is there a way to simulate this button any way?
Thanks.
View 2 Replies
View Related
Jan 30, 2008
I just installed and registered SQL Server Express but I don't see any shortcuts or Start -> Programs links. I found the new folder it created C:Program FilesMicrosoft SQL ServerMSSQL.2 and I tried to run this file:
C:Program FilesMicrosoft SQL ServerMSSQL.2MSSQLBinnsqlservr.exe
Nothing happens. Nada. Do I have to restart my computer?
PS: Is there a QuickStart tutorial on using its Reporting Services?
View 5 Replies
View Related
Oct 15, 2007
Hi everyone, Im using SSRS 2000 and I was wondering is there a way to create a click button??? I have 2 reports linked with hyperlinks but I wanted to make it look more presentable. So, instead of just clicking on the words, I want them to click the button.
Thanks in advance,
Abner
View 3 Replies
View Related
Feb 1, 2006
Print button is disabled for some users. Don't know why it is doing so? Works fine for most of the users in the same group.
Any help is much appreciated.
SQL SERVER Reporting Services 2000
Win XP
View 10 Replies
View Related