Storing Crystal Reports files in a database?

I have an interface interface that speaks and manages a SQL Server database, and one of the things that it can do is to run reports about the data in the database.

This interface can be installed on several computers, and so far I have only saved reports in the installation folder, but this means that every time you add a new report, you have to manually copy each user interface installed there.

I was thinking of storing .rpt files in the database itself (like Blobs) and have some mechanism for the user interface for them if necessary, as a way to centralize reports and fix this problem.

Has anyone tried this and it works well? Or, if you have not done so, can you come up with something that I must take into account before moving on? Are there any tips, tricks, or caveats that you might think of that could be useful to me?

+5
source share
4 answers

Great question! This seems like a coincidence, as we have actually implemented this over the past six months.

As you said, we store the rpt file in the database, but we do this in Server 2005 as an image type. It works very well, and as the database goes, there really aren't any reservations that come to mind.

, API. #, BinaryReader rpt , . byte ..

, 2008, Server 2005, Server 2008. , .

, !

+3

( DBCC!), sql server 2008 , , . , . http://www.runasradio.com/default.aspx?showNum=74

, 25- FILESTREAM, , MSDN. http://msdn.microsoft.com/en-us/library/cc949109.aspx.

, , BLOB 256 () (, ) , BLOB 1 () , 256 1 "". BLOB (, varbinary (max)) 2 () BLOB.

+1

, BLOB SQL Server, ORACLE, SQLITE, MYSQL Server , . , , , ?

I want to do the same, but the only thing I can think of is to pull the file out of the database, create a physical file in the Temp folder, and then use the physical address of the new file to create the Report crystal. Is there a way to create a Crystal Report from a memory stream or byte array?

+1
source

The .RPT file can be saved in the database (sql) by specifying it as image.Store bytes of the array in the database, and then get it as a stream. (TIP: treat it as an image file.)

-1
source

All Articles