Wednesday, March 7, 2012

Crystal Report

I am using VB 6 with MS Access as Back End. I saved a path name of a text file in a field of Access MDB. I am using Crystal report 8 for creating reports. Will anybody help me to print the contents of the file stored in the field in the crystal report? (For eg the field contains the value "c:\project\test.txt" How to print the contents in the "detail" portion of the crystal report. When I select the field, the file name comes not the contents). Pl. help me.
Meenakshi.RMeenakshi,
I dont think there is a way to do exactly you want. But you can use heperlink option. Right Click on any field; Goto Format Field and Select HyperLink and File and Select the text file. When running the report, if you click that Field, then the text file will be opened.|||Madhi,
Each record has a different text file. With your suggestion, I have to make a permanent link to that text file. How to get different text file links? pl. guide.
Meenakshi.R|||Meenakshi,
If each record has to show different file, then you can use formula.
Do the same procedure that I told you except that instead of selecting the file, there is button labelled x-2 near text box. Click that and if the field it self represents the file name, then write this
{FieldName}|||Madhi,
I tried with your option. But when the report is run, the value stored in the field (ie) the file name comes without any hyperlink. No provision for clicking. Kindly guide me.

Meenakshi.R|||Which version of Crystal Report are you using?|||Sir,
The version of the crystal report is 8.0
Meenakshi.R|||Meenakshi,
I dont know where it goes wrong
Refer this (http://support.businessobjects.com/library/kbase/articles/c2006151.asp)|||Madhi,
Referred the article. Done as per the instructions. But still I am getting the field value only without the hyperlink. Any other solution?

Meenakshi.R|||I have a report where each record brings back a field with the path of a different image file. Each record in the details section prints out the word "Image" as a link, which I have set up as follows:

1. Created a formula which has nothing more in it than the word "Image". Placed into details section of report.
2. Click Format Field on this formula, go to Hyperlink tab. Choose 'A Website on the Internet', then open the formula box for Website Address.
3. In here, place the field from the database.

My images are available via a http server, but you may choose to use one of the other options there instead (eg 'A File' instead of 'A Website on the Internet'.|||Hai,
Created a formula. Placed in the detail section. Using format option, I have made a hyperlink by choosing the option Hyperlink from a file. With the formula button (hyperlink screen), I specified the field value. During run time, the formula name comes (but without hyperlink option). What to do?|||Should work, try debugging. I'd suggest copying the formula you are using to create the hyperlink into a regular formula and seeing what comes out, ie what it is trying to use to create this hyperlink. You might find that it has an invalid path, or is coming back blank, etc...|||Tried tried. I saved the report with field in the detail section by choosing "a file" from the hyperlink option, run the report, the field value stored in the field comes without hyperlink option. When viewing the report in design view, the hyperlink option shows 'a website on the internet'. I don't know why? pl. explain in detail.
Meenakshi.R|||My suggestion is that your file path is invalid. Test to see what CR thinks is in that field, for starters.

Ie, if you have a url stored in your database field and http:// already exists, you could end up with something like http://http://google.com

In my report, I can click on the field to open a file, provided that file path is correct. I typed C:\temp\test.txt into the File Name box. However, changing it to C:\temp\test1.txt simply does nothing as this file does not exist.

Also note that the field may be a hyperlink but will appear to be just a regular field until you mouse over. (ie, if you want it to appear as a hyperlink should then you will have to underline and colour it yourself).|||Sir,
I have created a fresh report and do all the things. When I click the preview button in Crystal report screen, I am able to click the hyperlink, and the corresponding file stored in the field gets opened. When this report is accessed via a VB program coding, simply the file name is displayed and I could not click the hyperlink. Pl. help me.

Meenakshi.R

No comments:

Post a Comment