views:

502

answers:

3

I am using crystal reports in my project(Frontend:Visual Basic and Backend:SQL).In my project i have to mail the crystal report(which is a Request for Quotation Report) to vendors which i attach as a .rpt file and send it through Microsoft Outlook.The problem is that once i send a saved .rpt file to a vendor say ABC,the .rpt file which i have to send to another vendor doesnt get refreshed or updated.The same report that i send to vendor ABC goes to the next vendor too.Can u please help me as to how can i refresh the .rpt file through VB code itself?

A: 

As it seems that the report is different for each vendor, you'll have to recreate it for each of them. So you could just delete the old RPT file after sending the email and before recreating the report for the next vendor. This should make sure that you have correct data in every report.

MicSim
A: 

hey thanks for the idea but i need to refresh report data through VB code since the Quote No. send to each vendor would be different.hence i cannnot delete the RPT file.plz help me

But you are generating the report yourself from VB, right? What hinders you to do it every time? Or, if you don't have the "quote no" in your report's source tables, just add it to some data table, so it will be also updated in the report.
MicSim
A: 

Do you have to send a .rpt file with saved data? Unless they will re-run the report and have access to the database, I cannot see a good reason for it.

dotjoe