April 26, 2004 at 4:52 pm
Hi,
I am new to reporting services and .net.
Can someone pl. tell me how to call a report from an aspx page.
thanx.
SSM
April 27, 2004 at 12:01 pm
Here is a snippet of code from an aspx code behind page in VB.Net that does what you want.
Private
Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim strUrl As String
strUrl = "http://ber400/ReportServer?/TimeAndAttendance/EmpAndWoHours&period_no="
strUrl = strUrl & ddPeriod.SelectedValue & "&start_date=" & txtStartDate.Text
strUrl = strUrl & "&end_date=" & txtEndDate.Text & "&date_type=" & ddDateType.SelectedValue
strUrl = strUrl & "&filter_type=" & ddFilterBy.SelectedValue & "&filter=" & txtFilter.Text
strUrl = strUrl & "&group_by=" & ddGroupBy.SelectedValue & "&rs:Command=Render"
If Not ddFormat.SelectedItem.Text Is "Normal" Then
strUrl = strUrl & "&rs%3AFormat=" & ddFormat.SelectedValue
End If
Response.Redirect(strUrl)
End Sub
There may be a better way, but this works.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 27, 2004 at 12:53 pm
Thank You,It worked.
SSM
April 27, 2004 at 1:13 pm
Hi again,
My report is not accepting the parameter value from the url, instead it is taking the default value.CAn you tell me what mistake i am doing?
Thanx
SSM
April 28, 2004 at 7:49 am
I would have to see the url.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 28, 2004 at 11:56 am
I got it corrected.I was not accessing the report thro' the report server.That was the mistake.
I have a report using a stored Procedure.When I in include the sp I see data in the data tab but no fields are included in the fields section.Y is it?What should i do to add the columns in the fields section
SSM
April 28, 2004 at 3:03 pm
After running the sp in the data tab you click the "Refresh Fields" button on the data tab. Third button on the right of the Dataset.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 28, 2004 at 3:18 pm
Thanx.
But as my sp was executing dynamic query.I had to manually enter the fields.The refresh fields button doesn't work.
SSM
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply