Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit to number of records when Performing Save As for Export

Status
Not open for further replies.

datadognj

IS-IT--Management
Sep 26, 2002
2
US
Greetings,

I have an end user who has written a Report Smith report that we want to use as a detail level data source in another database. When testing it using a limited number of records (by selection criteria) the Save As function to CSV format performed well and the results were accurate. However, when the criteria is remiocved and the number of records grows substantially (180000+) the Save as funsction produces output without data and seems to stop around 31000 records into the save. This happens with Text and PD formats as well. It feels like a default limit setting to me.

Question - Is this a setting or is it hardcoded? If it can be modified, where can I do that (RSMITH.INI)? Thanks in advance!

Ken Holland
Centennial Communications
Wall, NJ
kholland@CentennialCorp.com

 
It is hard coded. I forget if it is bytes or records but it is something like 32767 (bytes I think). This is one of those magic hex numbers. It has been this way as long as I have worked with ReportSmith (I started with version 2.0 when I was a Borland ReportSmith field engineer).

Hope this helps...

Charles@CharlesCook.com CharlesCook.com
ADP - PeopleSoft
ReportSmith - Crystal Reports - SQR - Query
Reporting - Interfaces - Data Mining
 
I forgot, you can get around this using a macro to write the file. CharlesCook.com
ADP - PeopleSoft
ReportSmith - Crystal Reports - SQR - Query
Reporting - Interfaces - Data Mining
 
As an additional bit of information, if you have an extremely long field (I need a record with a length of 270 bits), I found in V4.0 that saving as text will truncation the field at 256. I had to use a macro to get around this also.
 
256 another magic hex number... CharlesCook.com
ADP - PeopleSoft
ReportSmith - Crystal Reports - SQR - Query
Reporting - Interfaces - Data Mining
 
Thanks for the feedback. Any examples of a macro for the workaround available?

thanks,

Ken Holland
 
I will send you something this weekend. I will need to dig around a CD of my reports to find it. CharlesCook.com
ADP - PeopleSoft
ReportSmith - Crystal Reports - SQR - Query
Reporting - Interfaces - Data Mining
 
Here is a very simple example macro. You would link this macro to the After Report Open Event.

Sub CREATE_FILE()

Rem File name to be used
FileName = "C:\MOTM.TXT"

Rem Get the next free file number, this is used for file I/O
FileNumber = FreeFile

Rem If the file is found delete it
If Dir(FileName) <> &quot;&quot; Then Kill FileName

Rem Open the file for output lock the file while it is open
Open FileName For Output Access Write Lock Read Write As FileNumber

Rem Get the first record in the report
GetRandom 1

Rem Loop through all of the records in the report
For i = 1 to TotalRecords()

Rem Write the record to the file
Print #FileNumber,Field(&quot;CSTMR_ID&quot;)+&quot;,&quot;+SumField$(&quot;DATE&quot;,&quot;INVOICES.DBF&quot;,1,&quot;Maximum&quot;)

Rem Get the next record
GetNext

Rem Loop
Next i

MsgBox &quot;File Created&quot;

End Sub
CharlesCook.com
ADP - PeopleSoft
ReportSmith - Crystal Reports - SQR - Query
Reporting - Interfaces - Data Mining
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top