|
|
Thanks for replying. I am looking a solution for Asp.net. However, this is mentioned for client side applications.
I would like to know also which is a better way:
1. Display stored image as a blob format on gridview is faster or
2. Re-create blob image on the disk first and then point loction.
Thanks
|
|
|
|
|
|
I'm calling and aspx page with a color param. I need this color to be passed on the querystring, so I call the aspx as:
somepage.aspx?color=#FFFFFF&...
The color parameter in the querystring is set by ColorTranslator.ToHtml(Color)
I think here the problem is the # symbol. Is there a problem passing # as a parameter? How can i get back my Color object from this querystring ?
I tried :
if (!string.IsNullOrEmpty(Context.Request.QueryString["color"]))
Color = ColorTranslator.FromHtml(Context.Request.QueryString["color"]);
but for some reason the above if statement evaluates to false. How can I fix this ?
TIA
|
|
|
|
|
This seems to work:
protected void Page_Load(object sender, EventArgs e)
{
String Color;
if (Request.QueryString["color"] != null)
{
Color = Request.QueryString["color"];
}
}
protected void Button1_Click1(object sender, EventArgs e)
{
String URL = "Default.aspx?color=" + Server.UrlEncode("#FFFFFF");
Response.Redirect(URL);
}
Steve Wellens
|
|
|
|
|
You mean
paper67 wrote: if (!string.IsNullOrEmpty(Context.Request.QueryString["color"]))
Evaluates to false ?
Did you put the QueryString correctly.
Use HttpUtility.UrlEncode before sending the color code. And after fetching use HttpUtility.UrlDecode to get the color code back properly.
|
|
|
|
|
From the asp.net page, I would like to view the reporting services reports i.e. the .rdl files.
I am using a reportviewer to access one of the reports as follows. Notice that I have hardcoded the name of the .rdl report.
Question:
There are several reports. The names are stored in a table in the database. Do you know how I can populate a listbox with the names of the reports but do not know how to show the selected report in the viewer. Notice that at present I am hardcoding just one name and not sure how to be able to show the selected report
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote"
Font-Names="Verdana" Font-Size="8pt" Height="1000px" Width="1000px" >
<ServerReport ReportServerUrl="http://reportserver/reportserver"
ReportPath="/reportfiles/myReport" />
</rsweb:ReportViewer>
Any thoughts please?
thanks
|
|
|
|
|
 You can try below code because what i did in the code is added reportviewer control dynamically to div control on page
and its working file for me
protected void bRunReport_Click1(object sender, EventArgs e)
{
if (Page.IsValid)
{
divRptView.Controls.Clear();
#region reportviewer setting
ReportViewer ReportViewer1 = new ReportViewer();
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.ID = "ReportViewer1";
ReportViewer1.Font.Bold = false;
ReportViewer1.Font.Name = "Arial";
ReportViewer1.ShowExportControls = false;
ReportViewer1.ShowBackButton = false;
ReportViewer1.SizeToReportContent = true;
ReportViewer1.BackColor = System.Drawing.Color.WhiteSmoke;
ReportViewer1.LocalReport.DataSources.Clear();
#endregion reportviewer setting
string _reportID = string.Empty;
bool isnull = true;
#region snapshot
else if (ddlListofReports.SelectedValue == "1")
{
_reportID = "snapshot";
List<snapshot> slist = new snapshot().GetCustomersForCountry(this.ddljobsSnapshot.SelectedValue);
ReportViewer1.LocalReport.ReportPath = "Admin\\ReportDesigns\\" + _reportID + ".rdlc";
if (slist != null)
{
if (slist.Count > 0)
{
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("snapshot1", slist));
isnull = false;
}
}
}
#endregion snapshot
#region VoiceAgentUtilization
else if (ddlListofReports.SelectedValue == "2")
{
DateTime _dcstarttime = Convert.ToDateTime(this.txtAgetnFromDate.Text);
string _dcstarttimestr = _dcstarttime.ToLongDateString() + " " + _dcstarttime.ToLongTimeString();
DateTime _dctotime = Convert.ToDateTime(this.txtAgentTodate.Text);
_reportID = "VoiceAgentUtilization";
List<AgentDetailed> alist = new AgentDetailed().getAgentReport(this.dcagent.SelectedItem.ToString(), _dcstarttime, _dctotime);
ReportViewer1.LocalReport.ReportPath = "Admin\\ReportDesigns\\" + _reportID + ".rdlc";
if (alist != null)
{
if (alist.Count > 0)
{
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("AgentDetailed1", alist));
isnull = false;
ReportParameter starttime = new ReportParameter("StartTime", _dcstarttimestr);
ReportParameter endtime = new ReportParameter("EndTime", _dctotime.ToString());
ReportParameter Agent = new ReportParameter("Agent", this.dcagent.SelectedItem.ToString());
ReportParameter[] p = { starttime, endtime, Agent };
ReportViewer1.LocalReport.EnableExternalImages = true;
ReportViewer1.LocalReport.SetParameters(p);
}
}
}
#endregion VoiceAgentUtilization
if (!isnull)
{
lblMessageBox.Visible = false;
if (ddlListofReports.SelectedValue != "11")
{
divRptView.Controls.Add(ReportViewer1);
ReportViewer1.Height = 290 + (25 * 10);
ReportViewer1.Width = Unit.Percentage(91);
ReportViewer1.ShowRefreshButton = false;
ReportViewer1.Visible = true;
ReportViewer1.ShowPrintButton = true;
ReportViewer1.SizeToReportContent = true;
ReportViewer1.LocalReport.Refresh();
}
}
else
{
lblMessageBox.Visible = true;
lblMessageBox.Text = "No Records are avaliable.";
ReportViewer1.Visible = false;
}
}
}
|
|
|
|
|
|
Hello all.
My prev post is some what not formatted, and i am unable to delete also
i got one doubt that, each page has its own response rt??
here i am trying to open the pages in loop,
my code is
for (int i =0 ; i <=1 ;i++)
{
response.write("<script language='javascript'> window.open('page1.aspx',</script>")
}
in my page load of page1.aspx.
i gave like object.exporttohttpresponse(pdf format)
he my loop gets stopped, my question here is i am giving the response of the new page, but why my loops getting stopped and my parent page is still loading due to the post back happend.
i dont understand , guys help me
|
|
|
|
|
maybe I can help you if you explained more.
do you want to open many pages from on page?
|
|
|
|
|
hi,
thanks for your reply.
actually my requirement is to print multiple Crystal report documents at one stretch, as i am unable to concatenate the Crystal report document as well as i tried a lot to convert the Crystal report document to the memory stream an tried
response.binarywrite(memorystream.toarray()),
in the above method i got only the last report document exported to pdf,
so i decided to create an seperatepage.aspx (window)
by which i kept the report document in the session and in the page load of that seperatepage.aspx i exported that reported document to http response,
in the loop
that is,
for (int i =0; i < reportdocument.length;i++)
{
session["reportdoc"] = reportdocument[i];
response.write(" window.open("seperatepage.aspx"))
}
in the page load of the seperatepage.aspx,
((reportdocument)session["reportdoc"]).exporttohttpresponse(pdf format);
hope you can get me now?
|
|
|
|
|
If you want the output of all of the pages on one page the you should call server.Execute on each page rather than generate a script tag for each page.
|
|
|
|
|
If you want the output of all of the pages on one page the you should call server.
i dont really understand by what means you are talking about?
how can i do that then? please read my requirement in the above message,is it possible to do that in your way, if so can you please explain little more how to do the same
waiting for you reply thanks in advance
|
|
|
|
|
|
Hello all.
i got one doubt that, each page has its own response rt??
here i am trying to open the pages in loop,
my code is
for (int i =0 ; i <=1 ;i++)
{
response.write("
|
|
|
|
|
How is it possible to browse to one of the .rdl reports in the sql server reporting services on the report server?
At present I can succesfully browse to the report by:
http://servername/reports
then I see a folder called "ReportFiles" which holds the reports (.rdl files)
then I click on one of the .rdl files in there to see the report.
I have managed to do this using the reportviewer.
The question now is, do you know why I do not get some of the functionalities such as export or the backbutton inside the viewer control whereas if I do not use the browser, and just browse to the report usingthe url outside the asp.net, I then get these functionalities.
Any thoughts please?
Thanksmodified on Thursday, February 11, 2010 9:31 AM
|
|
|
|
|
The functionalities are all there. Thank you.
|
|
|
|
|
i cant get you , which one you are talking about?
|
|
|
|
|
This is now solved.
All the functionalities seem to be present.
Thank you
|
|
|
|
|
Hi,
I want to build my own widget and put it in my website. How can I do this?
Thanking You!
Rock Star
|
|
|
|
|
<button>I am a Widget</button>
If you want a more complex widget you would have to give a tad bit more detail.
|
|
|
|
|
Hello,
I want to make a picture transparent. Because, I want get back the picture appear.This file is jpg extension.
How do i, thanks.
|
|
|
|
|
Consult with someone who knows photoshop or any other photo editing tool.
|
|
|
|
|
Thanks , but I do not do Photoshop. I do it on Asp.Net.
|
|
|
|