Mitchel's Forums

Subject: Dotnetnuke and CrystalReport
Prev Next
You are not authorized to post a reply.

AuthorMessages
rudiantoUser is Offline
New Poster
New Poster
Posts:4

09/16/2008 9:57 PM  

Dear Mr Mitchel Sellers,

Could you help me, I've a problem when developing Dotnetnuke module for customer reporting, used VS 2005, crystalreport  and sql server 2000. it's run very well, but why data with image format it's disappear on my crystalreport, i tried to run it under asp.net without DNN module and it's successfully (data with image format appear). could you help me where's the problem, it's my source code :

private

void BindReport()if (Session["CanId"].ToString() != BiCommon.EMPTY_VALUE) null)

{

DsReport =

DsReport =

newDataSet();this._biApplicant.GetApplicantReportDS(Convert.ToInt16(Session["JobReqId"].ToString()), Convert.ToInt16(Session["CanId"].ToString()), Session["Status"].ToString());

 

{

 

if (DsReport.TablesΎ].RowsΎ]["Photo"].ToString() != "")string FilePath = PortalSettings.HomeDirectory + "ImagePhoto\\" + DsReport.TablesΎ].RowsΎ]["Photo"].ToString();

 

{

 

{

LoadImage(DsReport.TablesΎ].RowsΎ],

}

}

}

CrystalDecisions.CrystalReports.Engine.

doc.Load(PortalSettings.HomeDirectoryMapPath +

if (DsReport.TablesΎ].RowsΎ]["Photo"].ToString() != "")if (File.Exists(FilePath))"BinaryPhoto", FilePath);ReportDocument doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();"RPTFile\\Applicant.rpt");//(PortalSettings.HomeDirectoryMapPath + "RPTFile\\Applicant.rpt");//("C:\\R.U.D.I.A.N.T.O\\SOURCE\\CrystalReport\\MitsuiReportCenter\\ReportCenter\\ReportCenter\\RPTFile\\Applicant.rpt");

doc.SetDataSource(DsReport);

crvwApplicant.ReportSource = doc;

crvwApplicant.DataBind();

Session[

}

}

 

{

 

"Flag"] = true;privatevoid LoadImage(DataRow objDataRow, string strImageField, string FilePath)try

{

 

 

fs.Read(Image, 0,

fs.Close();

objDataRow[strImageField] = Image;

}

 

{

 

}

}

FileStream fs = newFileStream(FilePath, System.IO.FileMode.Open,System.IO.FileAccess.Read);byte[] Image = newbyte[fs.Length]Convert.ToInt32(fs.Length));catch (Exception exc)Exceptions.ProcessModuleLoadException(this, exc);

Best Regard,

Rudianto (Indonesia)

 

 

{

 

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

09/17/2008 8:50 AM  
I am not very familiar with Crystal Reports, but My guess is that your file path is incorrect. Use Server.MapPath() to get the filesystem path. Just give it an application rooted path using the ~/ syntax and you should be fine.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
rudiantoUser is Offline
New Poster
New Poster
Posts:4

09/18/2008 1:01 AM  

Thanx for your respond, yeah i found the answer yesterday,

i tried to run it on my browser and than click "view browser",

i get a querystring as follow :

"/DNN/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_94347c46-ef53-4081-a61f-9b2faf9d25e0.png"

i think to read an image from crystalreport, ie browser refrence to this querystring,  

than i  compare web.config file from browser that can show an image (asp.net not under DNN Module) and

web.config from DNN module, i got different at this tag :httpHandlers>

<

addverb="GET"path="CrystalImageHandler.aspx"type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

httpHandlers>

i added  this tag to my web.config and i can show it from my DNN Module....

I hope it can help person with 've the same problem.......

 

<

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

09/19/2008 11:01 AM  
Great! I'm glad that you got it working!

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > Dotnetnuke and CrystalReport



ActiveForums 3.7