|
-
Sep 4th, 2005, 07:34 PM
#1
Thread Starter
New Member
retrieve, edit, update and save report template
I am trying to use vb6 , access and crystal report to
develop a program that can retrieve, edit and update report template.
Let say the a report has head title, content and data like:
===============================================
ABC company
This company is engaged in shipping service. This year
total sales is $50,000. There is no change in the nature of this activity during the year under review.........(etc etc etc)
==================================================
The blue color text is the data that retrieve from Access while the rest text is editable and need to provided user simple word's function like Font size, spacing and etc.
User can retrieve previous year report, edit it and save as a new report template. The blue color text (value) is locked not editable and data may change depend which year data is selected by user.
I am doing this by using a rich text (Wordpad) control in VB 6.0. First I made a report template then store it in Access memo attribute as rich text script. The data value is typed as special characters like &&&thisYearAmount&&&. When user select a report, it will retrive related data from Access then replace these special characters. The coding is like:
***************************
dim tmpReport as string
dim yrAmt as integer
dim yrShareHolder as string
tmpReport = adoRpt("shReport") //report template, wordscript in memo
yrAmt = adoRpt("shSalesAmt")
yrShareHolder = adoRpt("shShareHolder")
tmpReport = replace(tmpReport, "&&&thisYearAmount&&&", yrAmt)
tmpReport = replace(tmpReport, "&&&thisYrShareHold&&&", yrShareHolder)
*****************************
After that the report will shown in rich text control. User can edit this report and then store as new report in database. User may edit this report next time then save to another new report next time.
My problem is, I dont know how to keep the original variable (like &&&thisYearAamount&&&) when user save this report into database. Also i think that this is a very not effective program because how if there is more than 50 or even 100 data in the report? To prevent user change the blue color text, I m using the keypress/ keydown function see if the current cursos is on a blue color text it will prevent user to make any change.
Can i really do this report program by vb6, access and crystal report? Can someone show me is there any similiar tutorial or program code that i can refer to?
Thanks a lot for reading this thread and i am really appreciate it if u could help.
Last edited by Mark_Cyl; Sep 5th, 2005 at 08:02 AM.
-
Sep 6th, 2005, 08:30 AM
#2
Re: retrieve, edit, update and save report template
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|