Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 82911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:41:28+00:00 2026-05-10T21:41:28+00:00

Background: we have an application that generates reports from HTML (that may or may

  • 0

Background: we have an application that generates reports from HTML (that may or may not have inline scripting). The HTML source is normally stored as a blob in the database.

There is now the need to hard-code a particular report into the application (i.e. so that it is not database dependent). I first tried it the brute force way (cutting and pasting the whole report into a const string and appending a whole lot of & vbNewLine & _ to it; that didn’t work because there appears to be a limit to the number of & _ that can be used. I thought of compressing everything into (more or less) a single line, but not only would that hurt readability, it also wouldn’t work for the inline scripting.

Something just occurred to me while writing this: I could open the file (containing the HTML I want to hardcode) programmatically and write the file’s contents into a string. I’ll give that a go now…

Can anyone suggest a better/more elegant way of doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:41:28+00:00Added an answer on May 10, 2026 at 9:41 pm

    I ended up embedding the HTML file into a resource (res) file and loading it up from there using LoadResData. I asked another question relating to the loading up of HTML files from res files (and got a pretty good answer too). Note that another option could be to embed the HTML (or any other text file) as a Custom Resource; this way you’ll be able to reference the resource by name (i.e. the name of the Custom Resource) when using LoadResData rather than a number (which may not mean too much to someone who comes along and tries to understand your code). Note also that if you want to load the HTML into a string (as I do), you’ll need to call StrConv on the result returned by LoadResData (LoadResData returns an array of bytes).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If you rotate point (px, py) around point (ox, oy)… May 11, 2026 at 3:11 pm
  • added an answer Update As of MySQL 5.6 and later, InnoDB tables supports… May 11, 2026 at 3:11 pm
  • added an answer Problem went away when my hard drive died :) May 11, 2026 at 3:11 pm

Related Questions

Background: We have an application that has been in the works for over a
Background I have an application written in native C++ over the course of several
We have an application that downloads some files in the background. Our application pops
Background: We have an offshore group working up a Silverlight 2 prototype for us.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.