June 2, 2008 at 1:20 am
I want to have a dropdown box which lists the 12 months, and when i select a particular month i want my report to be shown for that particular month .i cannot use the report parameters as it doesnt satisfy my requirement because if i tak a report parameter i need to click on the view report button everytime .According to my reqiurement i need to make a report which is later integrated with asp.net ......so i was thinking that cant i have a drop down box in the aspx page and get the report in the report viewercontrol according to the selected months in the dropdown box?
but ....i dont know how to this
i need an urgent solution for this problem ...
thans
June 2, 2008 at 9:18 am
In that case you may be able to utilize URL reporting. Send in the report parameter to the url. Via URL reporting you can turn off the parameter heading area, etc. So I think a solution like this could work.
June 2, 2008 at 11:51 pm
thans for the reply .
Since i am using a stored procedure which expects a parameter which is the value of month ...........i.e,suppose i give 2 then i will get the details for the 2nd month vice versa....wen i created a dataset for this sp a parameter named @month got created automatically......in the preview wen i give the number(1 or 2 or so on) in the text box and then wen i click on the button view report it is showing me the report.
Now ............since i want to integrate this report with an aspx page.
i used a report viewer control.i gave a dropdown box in the aspx page .
so that wen i select the month number from the drop down box i must get the corresponding report for that month n the report viewer .
for this to happen i handled the selectedindexchanged event in the following manner.
protected void drpmonth_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect(string.Format("http://localhost/reportserver?id=@month" + drpmonth.SelectedValue, drpmonth.SelectedValue), true);
}
but it is of no use ...........
bcoz wen i select a number from the dropdown box it is just redirecting me to the report ..........
can sumbody help ............
i need an urgent response.....
thans in advance.
June 3, 2008 at 6:28 am
Response.redirect will move the entire page.
instead you would want to do
rptviewer.location("url to report + param values)
or something similar.
June 3, 2008 at 10:01 pm
thans for the reply ......
i checked with the above code but there is no location named property or method hence i used the following code in the selectindexchanged event for the dropdownbox(which lists the months)
protected void drpmonth_SelectedIndexChanged(object sender, EventArgs e)
{
ReportViewer1.ServerReport.ReportPath="/MS.IT.TreasuryScorecardReports/MetricReport+@month";
}
i even tried the following code
ReportViewer1.ServerReport.ReportPath = "/MS.IT.TreasuryScorecardReports/MetricReport&rs:Command=Render";
in the below code i gave the month as 2 bcoz i want the default report to shown for the 2 nd month
ReportViewer1.ServerReport.ReportPath="/MS.IT.TreasuryScorecardReports/MetricReport&Month=2";
when i execute the website it is running without any errors it is also displaying the report but when i select the month from the dropdown box it gives the following error........
The path of the item "/MS.IT.TreasuryScorecardReports/MetricReport+@month" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath)
i dont get this error.........
since last few days i have trying to get it up and running ........
but i am getting sum or the other error.........
plzzzzzz if sumbody can help me in this i wud be really thankfull to them...actually i am running out of time..
thans in advance
June 4, 2008 at 3:35 am
i tried the following code also
protected void drpmonth_SelectedIndexChanged(object sender, EventArgs e)
{
string param = "&month=" + drpmonth.SelectedValue;
ReportViewer1.ServerReport.ReportPath= "/MS.IT.TreasuryScorecardReports/MetricReport" + param;
}
it gives the same error when i select any month from the dropdown box ,following is the error
The path of the item "/MS.IT.TreasuryScorecardReports/MetricReport&month=10" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath)
i really dont understand were things are giving up .......
sumbody plz help me ....
thans in advance
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply