Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Crystal report goes blank Post Reply Post New Topic
Author Message
melanie
Newbie
Newbie


Joined: 16 Oct 2008
Online Status: Offline
Posts: 1
Quote melanie Replybullet Topic: Crystal report goes blank
    Posted: 16 Oct 2008 at 9:09am
Hi, I have a crystal report that looks like the periodic table. When I click one of the "squares" it opens another crystal report with more details. This is working fine and has been for months. Now I have been asked to add an enhancement which will place a hyperlink in the second report that will open a document (.txt, .pdf, or.doc) which has been attached to that record from another page in our web app.
 
I created a hyperlink field on the report and in the formula editor for the supress property I typed the following:
 
if not isnull, ({CARS_REPORT_AGENT_SUPPORT_CALLS_DETAIL.ATTACHMENT_ID}) and {CARS_REPORT_AGENT_SUPPORT_CALLS_DETAIL.ATTACHMENT_ID} > 0 then
   {?paramURL} +  "GetAttachment.aspx?attachmentId=" + Cstr({CARS_REPORT_AGENT_SUPPORT_CALLS_DETAIL.ATTACHMENT_ID})
 
(Not all records have attachments)
 
Then in the GetAttachment file the following will open the file after getting a blob from the database using the attachment id (.NET C#):
 

Response.BinaryWrite((byte[])dr["FILEATTACHMENT"]);

Response.AddHeader("Content-Disposition",

String.Format("attachment; filename={0}", fileName));

The attachment opens great. The problem is after I close it, both my reports go blank. I can select the report window and hit F5 and the report will refresh correctly, but obviously, I can't give it to the client like this.

Any suggestions are appreciated. Hope you are all having a good day.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.014 seconds.