ASPHostCentral.com Crystal Report Hosting BLOG

All about Crystal Report 2010 Hosting and Crystal Report 2008 Hosting articles

Crystal Report Hosting :: Dynamic Images at runtime in Crystal Report XI using ASP.Net 2.0

clock June 9, 2011 17:46 by author Administrator

This article helps to display dynamic Images in crystal report Using ASP.Net 2.0.

We can use two methods to dynamically change the picture in the crystal report either the Image stored in the database as a BLOB and as a picture available in the local path.

Method I: Using recordset

1. Add a recordset and add a table in that. Add a column of System.Byte[] (Only System.Byte is available in the data type of data Table, Manually add the System.Byte[] in that. System.Byte not allowed for images).Then use the below code

2. Design the report with that dataset. You can add this System.Byte[] column as part of your main data table which have the all data or add a separate data table with a System.Byte[] and a key column that link to the main data table.

3. Add the below code

private ds_Images Images1;
rptTest crReportDocument = new rptTest(); // rptTest is your crystal report name

protected void btnShowReport_Click(object sender, EventArgs e)
{
ImageTable(); crReportDocument.Database.Tables["tblImages"].SetDataSource(Images1.Tables[0].DataSet);
string ExportPathFinal;
ExportPathFinal = ExportPath + "\\" + "TEMP" + "\\";
if (Directory.Exists(ExportPathFinal) == false) Directory.CreateDirectory(ExportPathFinal);

//Export Crystal Report to PDF
ExportOptions crExportOptions = new ExportOptions();
DiskFileDestinationOptions crDiskFileDestinationOptions = new DiskFileDestinationOptions();
crExportOptions = crReportDocument.ExportOptions;
crDiskFileDestinationOptions.DiskFileName = ExportPathFinal + "MyreportTest.pdf";

//Set the required report ExportOptions properties
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat; // Or any other Format
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
crReportDocument.Export();

string ExportPathFinal1 = ExportPath1 + "\\" + "TEMP" + "\\";
string pathToPDFfile = ExportPathFinal1 + "MyreportTest.pdf";
Response.Redirect(pathToPDFfile, true);
//Close and dispose of report
crReportDocument.Close();
crReportDocument.Dispose();
GC.Collect();
}

private void ImageTable()
{
ds_Images Images1 = new ds_Images();
string fileName = @"\\img\a.JPG";
fileName = Server.MapPath(fileName.Trim());
DataRow row;
Images1.Tables[0].TableName = "tblImages";
Images1.Tables[0].Columns.Clear();
Images1.Tables[0].Columns.Add("img", System.Type.GetType("System.Byte[]"));
row = Images1.Tables[0].NewRow();
FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
row[0] = br.ReadBytes(Convert.ToInt32(br.BaseStream.Length));
row[1] = 1;
Images1.Tables[0].Rows.Add(row);
br = null;
fs.Close();
fs = null;
}

Method II: Using Picture Object of Crystal Report

Using the Dynamic Graphic Location of picture OLE object of crystal report, we can change picture dynamically at run-time.

1. Create a parameter field in the report with string data type.
2 In the report Add a picture OLE object. inside report right click->Insert->OLE object- >select Bitmap Image
3 Right click the OLE picture object and select Format Object- >select Picture tab ->Graphic location -> inside it drag the parameter field.

in the front end just pass the Image URL to the report

ParameterDiscreteValue crParameterimgLocation;
string img_url = @"\\images/newImages/nevadadot.JPG";
img_url = Server.MapPath(img_url);
crParameterField = crParameterFields["imgLocation"];
crParameterValues = crParameterField.CurrentValues;
this.crParameterimgLocation = new ParameterDiscreteValue();
this.crParameterimgLocation.Value = img_url;

//Add current value for the parameter field
crParameterValues.Add(crParameterimgLocation);

Note: while passing the Image URL do not put put single quotes.

We can use either method to display the Images in the report dynamically.

In Crystal Reports XI, the 'Dynamic Image Location' feature does not work with images in GIF format. Why does this behavior occur and how can you resolve it?" This drawback matches to the recordset method too.

"To debug the issue

This behavior occurs because Crystal Reports XI does not fully support the GIF file format. To resolve this behavior, use a supported image format when working with the 'Dynamic Image Location' feature. Supported image formats are Joint Photographic Experts (JPG), bitmap (BMP), Tagged Image File Format (TIF) and Portable Network Graphics (PNG)."

Any comments appreciated

Currently rated 1.5 by 4 people

  • Currently 1.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Crystal Report v13 Hosting with ASPHostCentral.com

clock May 11, 2011 20:28 by author Administrator
ASPHostCentral.com, a premier provider in advanced Windows and ASP.NET hosting service, proudly announces the availability of the latest Crystal Report v13 hosting on our newest Windows Server 2008 Hosting Platform.

You can start hosting your Crystal Report v13 project on our environment from as just low as $4.49/month only. For more details about this product, please visit our product page at
http://www.asphostcentral.com/Crystal-Report-2010-Hosting.aspx     

"
Crystal Reports has been a part of Visual Basic since 1993, and a part of Visual Studio since its first release in 2002. Crystal Reports has been a very successful component of these products. With the release of Visual Studio 2010, SAP and Microsoft have mutually decided to change how we deliver this important component to the .NET developer community going forward," said Tom Heinrich, General Manager of ASPHostCentral.


Crystal Reports for Visual Studio 2010 will contain many new features compared to Crystal Reports Basic for Visual Studio 2008
," said ASPHostCentral.com Senior Support Specialist, Ryan Dalgish.

The demonstrations can be found at 
http://crystalreportdemo.ASPHostCentral.com/

For more details, please visit:
http://www.asphostcentral.com/Joomla-Hosting.aspx  


About ASPHostCentral.com:
ASPHostCentral is a premier web hosting company where you will find low cost and
reliable web hosting services. Whether you're an enterprise level business or a small business entity or someone who just wants to host his own personal website - we have a suitable web hosting solution for you.
For more information, visit
http://www.ASPHostCentral.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Crystal Report 2010 Hosting with ASPHostCentral.com

clock January 13, 2011 14:31 by author Administrator

ASPHostCentral.com offers the latest Crystal Report for Visual Studio 2010 application to all our new and existing customers. This application must be request via our Help Desk System and it will be ready between 1 to 24 hours. What you need to make sure is that you understand the requirements for installing the application itself (such as whether SQL database is needed, etc).

Crystal Reports has been a part of Visual Basic since 1993, and a part of Visual Studio since its first release in 2002. Crystal Reports has been a very successful component of these products. With the release of Visual Studio 2010, SAP and Microsoft have mutually decided to change how we deliver this important component to the .NET developer community going forward

Crystal Reports for Visual Studio 2010

Starting on Friday, April 16th, the beta version of Crystal Reports for Visual Studio 2010 will be available as a separate download from this site. Just like when Crystal Reports was integrated into the Visual Studio installation, this download will continue to be free

Crystal Reports for Visual Studio 2010 will contain many new features compared to Crystal Reports Basic for Visual Studio 2008. This blog on the SAP Developer Network goes into more detail on the new features and how they benefit report designers, .NET developers, and report consumers

Both SAP and Microsoft believe this change in delivery method will allow for faster innovation of our respective products, and more value for our mutual customers   

Crystal Report 2010 Product Demonstrations

ASPHostCentral.com provides a demonstration or showcase of Crystal Report to all our customers. This demonstration is to show that we are able to host Crystal Report 2010, Crystal Viewer and other underlying Crystal Report components. The demonstration of Crystal Report can be found at: http://crystalreportdemo.ASPHostCentral.com

Currently rated 2.0 by 30 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Crystal Report 2010 Hosting :: New Features in Crystal Report 2010

clock October 10, 2010 16:18 by author Administrator

Ever since Visual Basic 2 released in 1993, Crystal Reports has been an integral part of the Microsoft developer experience.   Up until this article is released, Crystal Report 2010 has not yet come up. The developers on BusinessObjects are still working on the beta version and the full release is due on Q3 2010.

Even though this product has not been fully released yet, we can take a “sneak preview” of changes made on this Crystal Report 2010 version, what exciting new features we can expect and things that remain on this version. This article will elaborate Crystal Report 2010 product feature in a concise way. For anyone that is looking to host Crystal Report, you can consider asphostcentral.com as your
crystal report hosting provider.

Things that change on Crystal Report 2010:

- Crystal Reports will no longer be included in Visual Studio 2010
- Instead, Crystal Reports for Visual Studio 2010 will be provided by SAP as a
free download, no registration required
-
Because its now delivered separately, the delivery dates don't exactly line up
- A production release will be no later than Q3 2010
- The EULA for Crystal Reports for Visual Studio 2010 will match the Crystal Reports 2008 EULA.  The only material change when comparing the EULA with Visual Studio 2008 is that free external redistribution for web applications is no longer included.  Its purchased separately with the
Crystal Reports Developer Advantage runtime license
- The MSM runtime will be unavailable.  MSI and ClickOnce will be the supported deployment methods for the runtime engine



Things that do not change on Crystal Report 2010:

- Unlimited internal distribution of thick client and server applications that embed the Crystal Reports for Visual Studio 2010 runtime is included - same as Visual Studio 2008
- Unlimited external distribution of thick client applications that embed the Crystal Reports for Visual Studio 2010 runtime is included - same as Visual Studio 2008
- Both 32-bit and 64-bit runtimes are available.  This is unchanged compared to Crystal Reports Basic for Visual Studio 2008, but the presence of a 64-bit runtime is a major net new feature for Crystal Reports 2008 customers



New Features in Crystal Report 2010:

- New WPF Viewer
- New XLSX export to take advantage of the big grid for data-only Excel exports
- Improved report viewing experience provides more interactivity to end users of your reports
- New read-only RPT file called RPTR that allows you to control who can see the internals of your report design.  You create a RPTR file by exporting it from an RPT.  After that, RPTR files can only be opened by the report viewers.  oUR Report designer tools will refuse to open RPTR files - protecting your internal business logic in the report
- Improved embedded report designer - for example you can now create dynamic, cascading parameters
- Various .NET API improvements to improve the migration for COM-based RDC customers
- Lighter weight English-only runtime for reduced deployment size
- More flexible MSI deployment to replace MSM use cases

In conclusion

Visual Studio 2010 allows developers to:
- Receive Crystal Reports in a different manner than before
- Continue to benefit from a free version of Crystal Reports that's fully integrated with Visual Studio
- Get a significant upgrade in features compared to Visual Studio 2008
- See slight modifications to licensing that will mostly impact those who redistribute web applications externally



 

Currently rated 1.5 by 14 people

  • Currently 1.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Crystal Report Hosting

ASPHostCentral is a premier web hosting company where you will find low cost and reliable web hosting. We have supported the latest Crystal Report 2010 (v13 and v14) hosting. We have also supported the latest ASP.NET 4.5 hosting and ASP.NET MVC 4 hosting. We have supported the latest SQL Server 2012 Hosting and Windows Server 2012 Hosting too!

 

Sign in