File does not begin with %pdf-

I am getting this error when i open an rpt file as  pdf format using inet crystal clear tool.

Please help me ......thanks a lotttt....
dll="dll=pdssqletimesheet";
			database = "CTL_eTimeSheet";
			orientation = "default_Orientation=2";
			papersize ="default_PaperSize=1";
			prompt1="promptTSID=<%=StrTimeSheetId%>";
			prompt2="promptflag=<%=strFlag%>";
			reporturl = "../crystal/etimesheet/"; 
			reportaddress1 =reporturl+"etsweeklypreview.rpt?"+dll+"&"+prompt1+"&"+prompt2+"&"+"database="+database+"&";
			reportaddress2 = orientation+"&"+papersize+"&init=pdf";
			reportaddress = reportaddress1+reportaddress2;
			location.href = reportaddress;

Open in new window

czutshiAsked:
Who is Participating?
 
BarsMonsterCommented:
Well, it is clear that it expects to see .PDF file here, %pdf is a marker of beginning of PDF document. SO most likely you cannot feed .rpt file this way.
0
 
czutshiAuthor Commented:
I'm getting this error only for two files and rest of the files are openning in pdf format.
0
 
BarsMonsterCommented:
And ofcourse Acrobat reader can open it, right?
0
 
czutshiAuthor Commented:
Yes. All files are openning in the Acrobat reader still.... two files are not openning and displaying the error....I dunno what to do to solve the issue.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.