Click here to Skip to main content
15,936,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hey all
I am developing a desktop based application for test generation in multiple subjects having superscript, subscripts, mathematical equations and chemical equations. I tried to store it using Rich text box with equation editor. I succeed in storing it in .rtf format and show back in Windows forms but...
"It cannot be shown in Crystal reports, i changed the format of that field to RTF Text but some records are shown while other hides..."
Can you anyone give me proper solution for Storing that type of data and show it in Crystal reports or other reporting Tool? or any other way to store that data and generate test papers,(keeping in view that it will be a Desktop application)?

Engr.Zabih Ullah

What I have tried:

Equation Editor
Rich text box
Crystal reports
Sql server table field datatype Nvarchar(max)
Updated 3-Jan-17 19:47pm
Suvendu Shekhar Giri 4-Jan-17 1:40am    
Check following links for reference, if they help-
How to store mathematical expressions/explanations into database[^]

1 solution

Your solution of storing the equation in RTF format and then showing it in a RTF field sounds completely feasible so I'd say it's already a proper solution.

However, Crystal Reports has limitations concerning RTF tags so this could be the source of the problem. For supported tags, have a look at 1214798 - What RTF tags are supported in Crystal Reports? | SAP Knowledge Base Article[^]

If the support for RTF in Crystal is not enough for your needs, perhaps you could convert the RTF into an image and display the image in the report. For more information, have a look at this conversation: [C#] RTF text to bitmap image? Any easy way around?[^]

If changing the report tool is really an option for you, I'd give for example DevExpress or SyncFusion a try...
Share this answer
Maciej Los 4-Jan-17 1:52am    
Wendelius 4-Jan-17 14:30pm    
Thank you Maciej!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900