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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long string parameters from VFP6 to Crystal Reports 8

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
We make client/server applications in Visual Foxpro 6.0 and use Crystal Reports 8.0 as report designer. Microsoft SQL-server is the databaseserver.

In a list we want to use the multiselect principle: the user can select more than one line, then press right-mouse button and print a report. To send the selected lines to the reports, we create a parameter like:

thisform.OleControl1.ParameterFields(0) = "parPointers;'100','101','102';1"

This maens that we want to print something of the selected lines with pointers 100,101,102. OleControl1 is the crystal reports ActiveX-object on our form.

We have the following problem: if the "array" ('100','101','102') becomes to long (that is when the user selects to much lines at a time), we get an error from crystal reports like "invalid parameter field". The reason for this is that the parameter-string becomes to long (longer than the maximum string length)...

What can be the solution for this problem, or do we have to use another principle?

Thanks a lot,
BOLLE MARNICK,
Informat.
 
>> we get an error from crystal reports like "invalid parameter field". The reason for this is that the parameter-string becomes to long (longer than the maximum string length)...

What can be the solution for this problem, or do we have to use another principle? <<

I don't know what the best way of solving this would be, but what I'd do is trap the error(s) and if you get it, break the set of lines into shorter chunks (or send a message to the user to pick a smaller chunk.)

OTOH, I don't know enough about Crystal Reports to know how much info it will take. Is the problem that you need to send it data in smaller chunks, is it that it can only hold so much data or is it simply the VFP limit on string length? If it's the last, could you switch to using a memo field instead of a string?

Finally, couldn't you parse the data and store it in a text file and then direct Crystal Reports to use this file to get its data? Then there wouldn't be any limit to how long it could be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top