You are viewing limited content. For full access, please sign in.

Question

Question

Show File Path in Crystal Reports

asked on December 8, 2015

I have a crystal report that lists invoices and I would like to be able to show the file path of the invoices of the invoices in another column of the report.  

DECLARE @entryID INT = 35793

SELECT dbo.toc.name AS DocumentName, dbo.doc.pagenum + 1 AS PageNum, dbo.vol.fixpath + '\' + 
SUBSTRING(CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), dbo.doc.storeid),2),1,2) + '\' + 
SUBSTRING(CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), dbo.doc.storeid),2),3,2) + '\' +
SUBSTRING(CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), dbo.doc.storeid),2),5,2) + '\' +
CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), dbo.doc.storeid),2) + '.TIF' AS FullPathAndFilename
FROM dbo.doc  
LEFT JOIN dbo.toc ON dbo.doc.tocid = dbo.toc.tocid
LEFT JOIN dbo.vol ON dbo.toc.vol_id = dbo.vol.vol_id
WHERE dbo.doc.tocid = @entryID
ORDER BY dbo.doc.pagenum

After searching on the answers site, I found this query which finds the file path of a specific document that you input the tocid for.  I am having some trouble having this query apply to all of the documents listed in the Crystal Report.  Any help would be greatly appreciated. 

0 0

Replies

replied on December 9, 2015

I have never used Crystal Reports before as we use SSRS internally. From what I read, looks like the way to access parameters in the query  in CR is by using the syntax "{?ParameterName}". If you are using a multi select, then you will need to join the selections using:

"[" & Join({?ParameterName},",") & "]"

and put that into a formula in a field on the report. Then in your query you would say:

Where dbo.doc.tocid in {?ParameterName}

Hopefully that helps get you in the right direction.

0 0
replied on December 18, 2015

Did you get this working?

0 0
replied on December 28, 2015

Thank you for your suggestion.  I have not gotten it to work yet but I will post on here when I find the solution

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.