I used Log On Server as ODBC-Ms Access Database.
After saving the report,if any field changes,the report doesnt change.
I need to design reports which change according to the database.
I use these reports from VB.
How should I go about this.
Printable View
I used Log On Server as ODBC-Ms Access Database.
After saving the report,if any field changes,the report doesnt change.
I need to design reports which change according to the database.
I use these reports from VB.
How should I go about this.
Might need more info, but a possible cause is that you have save data with report ticked under the file menu. Try unticking this and as a second step, under the database menu, select verify database.
Free API code
If I use this statement
crt1.WindowShowRefreshBtn = True
in the CrystalReport control of VB, and then press it, the data doesnt get refreshed.
If I use the same Refresh button in Seagate Crystal Report Designer, the data gets updated.
How can I create a report that gets updated automatically
Same issue here. Has anyone succeeded in solving this issue.
Thanks.
I don't know what connections you are using!!!! if OCX than;
Refresh the data before showing the report.
Something like this
crystalreport.discardsavechange=true
I am not sure, pls try this
Hello Sonamg,Quote:
Originally posted by Sonamg
I don't know what connections you are using!!!! if OCX than;
Refresh the data before showing the report.
Something like this
crystalreport.discardsavechange=true
I am not sure, pls try this
Thank you for replying back. Well, if you are talking about CRXReprt.DiscardSavedData ; then though I have applied this option ,it still does not display the new data.
I am not sure if it is OCX or something else. How can I check on this ??
This is what I am trying to do :
I have a VB form through which I pass parameters and execute the Stored Procedure. This will then update the fields in TTX file . I have invoked a report based on this TTX file.
I used the same code to invoke another report which is refreshing report (based on the TTX file) properly.Whereas ,there is this other report which uses a similar piece of code and,rather updates the contents of the TTX file properly ; but it does not display the refreshed data ;unless I unload the VB application and restart it ;whereby it shows the updated TTX file.
Also,on clicking the "Refresh" button on the CR Viewer from the VB Call does not help at all ;although if I am open the report using the Report Designer tool and use Refresh button from within,report works fine.
( I referred to quiet a few posts and found out that "Save data with report" should be unchecked and, CRXReprt.DiscardSavedData should discard prev. data ; but both of them don't seem to be working on this particular report. )
These are my observations related to the report which is not working properly :
There is this piece of code which displays different results in 2 scenarios :
VB Code:
Set ADORset = ADOCmd.Execute Debug.Print "State of ADORset : " & ADORset.State
Scenario 1: Working report
-------------------------------------
Case a) On running the application and passing the default parameters for the 1st time, report displays proper data as the ADORset.State sets to 1 .
Case b) Without unloading the application , and trying to pass different parameters for the report ADORset.State set to 1 and report displays proper result.
Scenario 2: Not Properly Working report
----------------------------------------------------
Case a) On running the application and passing the default parameters for the 1st time, report displays proper data(in this case,no data) as the ADORset.State sets to 0 .
Case b) Without unloading the application , and trying to pass different parameters for the report whereby ADORset.State is set to 1,report does not display proper result.
Case c) Although , if I unload the application and then re-load it and then ,pass the same parameters as in Case (b) , the report shows proper data.
Case d) Applied Case ( 2 a ) , followed by Case ( 1 a) ,followed by Case ( 2 b ) reflects proper output for the 2nd report.
I referred to a post at Crystal Decisions : http://support.crystaldecisions.com/forums/message.asp?fid=78&sk=32&ps=25&pn=1&mid=5095 wherein it is suggested :
but I could not exactly follow how this can be achieved.Quote:
I usually create SQL stored procedures for my Crystal Reports. I add an extra parameter which I call RequestTime varchar(6). The stored procedure doesn't use this value. When I call the report on the web, I set the current time in the format "HHMMSS" to this parameter. This forces the report to always refresh. (Report is also set not to save data)
'coz the report which is working properly has a Datetime field defined in the SP and is one of the parameters. But,the other report has no datetime field as the parameter.And,I am not sure what steps he is trying to suggest above.