Note that there are some explanatory texts on larger screens.

plurals
  1. POParse strange field in Crystal Reports
    text
    copied!<p>I'm using Crystal Reports Basic for Visual Studio 2008 to generate a report from a database. In the database there is a "structured data" field called data. It is a way of representing a Hashtable and the format is:</p> <pre> XLLLKeyYMMMValue where: X is the length of the length of the Key L is the length of the Key Y is the length of the length of the Value M is the length of the Value </pre> <p>so if I were to encode</p> <pre> Name = John Robert Oxley Age Of Poor Little Developer = 27 </pre> <p>I would have.</p> <pre> Name (L = 4 therefore X = 1) John Robert Oxley (M = 17 therefore Y = 2) Age Of Poor Little Developer (L = 28 therefore X = 2) 27 (M = 2 therefore Y = 1) </pre> <p>so the field for this record would contain</p> <pre> 14Name223John Robert Oxley228Age Of Poor Little Developer1227 </pre> <p>There are a number of fields that I know I want in the report. They may not be in the data field in the table however. Now for my questions</p> <ul> <li>I'm guessing I have to create a custom function parseStructuredData(data, field) which returns the field I want or null if not present.</li> <li>Are there any resources on the net for custom functions or a book that I should buy for Crystal Reports (preferably ebook) as I have very little experience?</li> <li>Then do I use a "Formula Field" to put it on the report?</li> </ul> <p><strong>Update</strong> This is running on MS SQL server but I would prefer not to use a stored procedure to parse the data as I don't want to modify the database.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload