A
A
Andrey Osty2012-04-24 21:31:09
.NET
Andrey Osty, 2012-04-24 21:31:09

Is it possible to create this in Crystal Reports?

I'm looking for a tool to solve a problem, and the problem is the following. Write a non-GUI application that would crawl into the database and generate a report in the form of *.pdf. The report itself has static fields (header, column headings) and dynamically filled fields from the database. So I think I can make a report template on Crystal Reports, then fill it with data from the database and convert the resulting report to * .pdf. So I thought about whether I chose the right path, until I figure out how to implement this without a GUI and whether it is possible at all. Share your experience or advice. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
agsqwe, 2012-04-24
@agsqwe

Perhaps you should look towards SQL Server Reporting Services and do without third-party tools. You can get PDF through the web service.

M
mongohtotech, 2012-10-07
@mongohtotech

Good afternoon!
Yes it is possible. This is how we do dynamic distribution of pdf files with analytical information to branches - each branch has its own information.
VB.NET example (CrystaReports version - 2008):

‘генерируем объект ReportDocument из файла
Dim myReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
myReport.FileName = myAppPath + "\report1.rpt"

‘при необходимости меняем RecordSelectionFormula
myReport.RecordSelectionFormula = "{Store} = " + CStr(myStore)

‘обновляем отчет 
myReport.Refresh()

‘делаем экспорт в pdf
myReport.ExportToDisk([Shared].ExportFormatType.PortableDocFormat, myAppPath + "\" + strDate + "\Report for Store " + CStr(myStore) + " " + strDate + ".pdf")

Using the code, you can make a console application and run it on a schedule, or you can use it in the ETL package of SSIS (MS SQL Server Integration Services).
The method is good because the report can always be changed without the participation of developers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question