sometimes we need to show our text or we can say header text in vertical. and we try using rotate property but it not works.. so to do so we have got a perfect solution to make browser fool.
we can do be using below steps:
1. take a label/text.
2. set your font size as required
3. now set make its height large and set width in such a manner so only one character can be displayed.
4. go to format font->spacing->character spacing exactly: and enter something like 20/25
and done....
solution by: Rajesh Rolen
Show Text Vertical in Crystal Reports in Asp.Net
Labels: ASP.NET , Crystal Report
Crystal Report in asp.net
To create crystal report in asp.net follow below steps
1. take a crystal report viewer on page (i have given name "crv" to it)
then write below code in code behind file.
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
private void showreport()
{
ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("MyReportName.rpt"));
report.SetDataSource(objrep.ReportDataSource);
SetTableLocation(report.Database.Tables);
crv.ReportSource = report; //crv is your Crystal report viewer's name.
}
private void SetTableLocation(Tables tables)
{
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = @"DBSERVER2\SQL2005";
connectionInfo.DatabaseName = "dbMEAVer5web";
connectionInfo.UserID = "sa";
connectionInfo.Password = "admin55";
foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
{
TableLogOnInfo tableLogOnInfo = table.LogOnInfo;
tableLogOnInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogOnInfo);
}
}
Solution by: Rajesh Rolen
Labels: ASP.NET , Crystal Report
Custom Page Size Crystal Report by Code
Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
oRpt.Load(Server.MapPath("CrystalReport.rpt"))
oRpt.PrintOptions.PaperOrientation = [Shared].PaperOrientation.Portrait
oRpt.PrintOptions.PaperSize = [Shared].PaperSize.PaperEnvelope10
CrystalReportViewer1.ReportSource = oRpt
Labels: Crystal Report
Custom Page Size Crystal Report by Code
Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
oRpt.Load(Server.MapPath("CrystalReport.rpt"))
oRpt.PrintOptions.PaperOrientation = [Shared].PaperOrientation.Portrait
oRpt.PrintOptions.PaperSize = [Shared].PaperSize.PaperEnvelope10
CrystalReportViewer1.ReportSource = oRpt
Labels: Crystal Report