|
Hello There;
I am trying to view my report files on CrystalReport viewer in ASP.NET programmatically by using the code blow;
Note that Reports are located on a file server.
CrystalReportSource reportsource = new CrystalReportSource();
CrystalDecisions.Web.Report report = new CrystalDecisions.Web.Report();
Guid reportid = new Guid(Request.QueryString["GUID"]);
string path = Server.MapPath("/Reports/") + dc.Reports.Where(k => k.OID == reportid).First().FileContent;
report.FileName = path;
reportsource.Report = report;
CrystalReportViewer1.ReportSource = reportsource;
It is loaded to the viewer perfectly. However, if I attempt to go to the next page or trying to set parameter via parameters panel or if it has any group tree or parameter, when I try to expand any node of the group tree, it says No valid report source is available. but if I do it via CrystaReportSource wizard there is no problem at all.
what do I miss here?
thanks for your help.
regards.
Note: I could not find any crystal report forum category to post my question, that is why I have posted here...
|
|
|
|
|
|
have you found the answer to this?, I'm having the same trouble and not being able to get it fixed.
|
|
|
|
|
Hi,
We are building an ASP.NET application and would like to follow the best practices. Some of the best practices are:
----------------------------------------------------------------------
Server side Code:
- Use catch blocks to trap & log low level errors too.
- Use Cache objects to populate dropdowns etc. where we won’t expect the changes in the underlying data/database.
- Incase of error logging framework, provide emailing alerts along with logging the errors.
----------------------------------------------------------------------
HTML code:
- Don’t write inline CSS.
- Place the JavaScript code (If needed by the page) at the end of the page unless the page needs it for load time actions.
----------------------------------------------------------------------
Now coming to the point, Would you please share these best practice points if you have a comprehensive list of them already?
Many Thanks,
Regards.
Anusha.
|
|
|
|
|
This way no one is going to post anything.. I think better to search in google.
|
|
|
|
|
Anusha.1980 wrote: Hi,
We are building an ASP.NET application and would like to follow the best practices. Some of the best practices are:
----------------------------------------------------------------------
Server side Code:
- Use catch blocks to trap & log low level errors too.
- Use Cache objects to populate dropdowns etc. where we won’t expect the changes in the underlying data/database.
- Incase of error logging framework, provide emailing alerts along with logging the errors.
----------------------------------------------------------------------
HTML code:
- Don’t write inline CSS.
- Place the JavaScript code (If needed by the page) at the end of the page unless the page needs it for load time actions.
----------------------------------------------------------------------
Now coming to the point, Would you please share these best practice points if you have a comprehensive list of them already?
Bloody hell. Please tell me you're not getting paid if any of this was a revelation for you ? I don't even agree with all of this, but it's pretty baseline stuff.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hi All,
I am working on a application in C#. There is a start menu folder and a short cut in that folder is being created and translated as per the language selected during installation. Now what I want that these start menu folder and short cut file should be removed. I am overriding the uninstall event but its not being fired.
Please suggest something.
Regards
|
|
|
|
|
How is this remotely related to ASP.NET ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I developed a small website using express edition and MS SQL server 2005(sql server management studio express). Now iam planning to host the application.To publish website with express edition is possible?
What is difference between Proffesional and standard editions of visual studio?
To publish a website standard edition is enough?
And now coming to SQL server whether licensed key is required?
Thanks in advance
Regards,
Prathap
|
|
|
|
|
You can copy the files to server and it should work. You need a licensed version of SQL server on the server. .NET framework can be installed directly as it is free.
Best wishes,
Navaneeth
|
|
|
|
|
prathapcode wrote: What is difference between Proffesional and standard editions of visual studio
Lots of bells and whistles, but nothing that would stop you developing or publishing a website.
prathapcode wrote: And now coming to SQL server whether licensed key is required?
That's a whole different question. However, most webhosts provide a SQL Server database as part of their package, so you don't need to buy anything there, unless you are self hosting the site.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
in below code value of fontName is 'Lucida Console'
BaseFont baseFont = BaseFont.CreateFont(fontName.ToString(), Encoding.ASCII.EncodingName, false);
I'm getting error while executing above code written in asp.net written below:
'Lucida Console' with 'US-ASCII' is not recognized.
thanks
You get the best out of others when you give the best of yourself.
modified on Friday, November 6, 2009 9:36 AM
|
|
|
|
|
What is the steps of web-based payments processing system like e-shoping.
Actually I am asking to provide me some tips on security, standardizing or any relative issue.
|
|
|
|
|
You can find many by googling. First do that and choose which one to use and if've you problem in that we're here to help
|
|
|
|
|
How can send mail other email address.?
Ankur Tyagi ji
|
|
|
|
|
Take the subject of your post and run it in google, you will get thousands of hits, many with example code.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Here is the routine I use:
public static void SendUserEmail(MembershipUser mu, string body, string subject, string from)
{
if (string.IsNullOrEmpty(from))
{
from = "NoReply";
}
try
{
MailMessage mail = new MailMessage();
mail.Body = body;
mail.IsBodyHtml = true;
mail.To.Add(new MailAddress(mu.Email));
mail.From = new MailAddress(from + strEmailAccountBase, from + strEmailAccountBase, Encoding.UTF8);
mail.Subject = subject;
mail.SubjectEncoding = Encoding.UTF8;
mail.Priority = MailPriority.Normal;
SmtpClient smtp = new SmtpClient();
smtp.Host = ConfigurationManager.ConnectionStrings["EmailProvider"].ConnectionString;
NetworkCredential nc = GetEmailCredentials();
if (nc != null)
{
smtp.Credentials = nc;
}
else
{
}
smtp.Send(mail);
}
catch (Exception ex)
{
throw new ApplicationException("Could not send email", ex);
}
}
Your web.config connection string entry should be along the lines of:
<add name="EmailProvider" connectionString="smtp.YOURMAILPROVIDER.COM"/>
GetEmailCredentials you will have to write yourself; if your host does not require credentials then just return null.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I am using a telerik tabstrip. After i edit or perform button click etc it doesn't refresh the tab and doesn't display the recent changes. So every time i make any change i have to refresh the browser and then go back to that tab and see the changes.
What would be the best way to refresh the tab automatically after any activity performed within the tab(add/edit/delete)so that it shows me latest change plus it should be pointing to the right tab after refresh.
Thank You
Andyyy
|
|
|
|
|
AndyInUK wrote: I am using a telerik tabstrip
You Better Ask them rather than posting it here..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
HI Experts,
The output of my code is not coming in tabular way,which i want to display it in table form..
already i have written code for that...
For referance please see the code below....
<br />
<br />
StringBuilder strHTMLContent = new StringBuilder();<br />
<br />
cmd = new SqlCommand("select * from Area ", sqlcon);<br />
sqlcon.Open();<br />
SqlDataReader odr = cmd.ExecuteReader();<br />
while (odr.Read())<br />
{<br />
strHTMLContent.Append("<table align='Center'>".ToString());<br />
strHTMLContent.Append("<tr>".ToString());<br />
strHTMLContent.Append("<td style='width: 300px'></td>".ToString());<br />
<br />
strHTMLContent.Append(odr["AreaId"].ToString());<br />
strHTMLContent.Append(odr["AreaCode"].ToString());<br />
strHTMLContent.Append(odr["AreaDesc"].ToString());<br />
<br />
<br />
strHTMLContent.Append("</tr>".ToString());<br />
strHTMLContent.Append("</table>".ToString());<br />
strHTMLContent.Append("<br><br>".ToString());<br />
}<br />
sqlcon.Close();<br />
<br />
strHTMLContent.Append("<p align='Center'> Note : This is dynamically generated HTML document </p>".ToString());<br />
<br />
<br />
HttpContext.Current.Response.Write(strHTMLContent);<br />
<br />
|
|
|
|
|
for lines where your dynamically adding the values of the database, use the ToString() method, but not for the literals:
rhtbhegade wrote:
strHTMLContent.Append("<table align='Center'>".ToString());
strHTMLContent.Append("<tr>".ToString());
strHTMLContent.Append("<td style='width: 300px'></td>".ToString());
should read:
strHTMLContent.Append("<table align='Center'>");
strHTMLContent.Append("<tr>");
strHTMLContent.Append("<td style='width: 300px'></td>");
Then at the very end of the once your datareader is finished, convert the string builder to a sting.
HttpContext.Current.Response.Write(strHTMLContent.ToString());
Hope this helps!
[update] You'll also want to inject the dynamic stuff inside the table data elements:
strHTMLContent.Append("<table align='Center'><tr>");
strHTMLContent.Append("<td style='width: 300px'>" + odr["AreaId"].ToString() + "</td>");
that's probably most likely why it's not coming out in the 'grid' form you were expecting.
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
modified on Friday, November 6, 2009 3:14 PM
|
|
|
|
|
Thanks Expert......very much..
|
|
|
|
|
rhtbhegade wrote: Thanks Expert......very much
You have to mark it as answer..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
hi
I got this code from googling
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.pstrength-min.1.2.js">
</script>
<script type="text/javascript">
$(function() {
$('.password').pstrength();
});
</script>
and css :
.password {
font-size : 12px;
border : 1px solid #cc9933;
width : 200px;
font-family : arial, sans-serif;
}
.pstrength-minchar {
font-size : 10px;
}
but function in script is not working
plz help....
|
|
|
|